@linzjs/lui 13.0.0 → 13.1.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 (96) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/dist/assets/icons/publish.svg +3 -0
  4. package/dist/assets/svg-content.d.ts +5 -40
  5. package/dist/assets/svg-content.tsx +74 -45
  6. package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.d.ts +1 -0
  7. package/dist/components/LuiIcon/LuiIcon.d.ts +1 -42
  8. package/dist/components/LuiMenu/LuiMenu.d.ts +1 -0
  9. package/dist/components/lol/LOLActiveFirmMessage.d.ts +1 -0
  10. package/dist/components/lol/LOLAppLauncherMenu.d.ts +1 -0
  11. package/dist/components/lol/LOLAuthorisedLink.d.ts +1 -0
  12. package/dist/components/lol/LOLLogoutLink.d.ts +1 -0
  13. package/dist/components/lol/MockBackendUtils.d.ts +3 -3
  14. package/dist/index.js +71278 -3
  15. package/dist/index.js.map +1 -0
  16. package/dist/lui.esm.js +54441 -3695
  17. package/dist/lui.esm.js.map +1 -1
  18. package/package.json +21 -18
  19. package/dist/components/LuiBadge/LuiBadge.stories.d.ts +0 -9
  20. package/dist/components/LuiBadge/LuiBadge.test.d.ts +0 -1
  21. package/dist/components/LuiBanner/LuiBanner.stories.d.ts +0 -11
  22. package/dist/components/LuiBanner/LuiBanner.test.d.ts +0 -1
  23. package/dist/components/LuiButton/LuiButton.stories.d.ts +0 -28
  24. package/dist/components/LuiButton/LuiButton.test.d.ts +0 -1
  25. package/dist/components/LuiButton/LuiButtonGroup.stories.d.ts +0 -6
  26. package/dist/components/LuiErrorPage/LuiErrorPage.stories.d.ts +0 -7
  27. package/dist/components/LuiExpandableBanner/LuiExpandableBanner.stories.d.ts +0 -7
  28. package/dist/components/LuiExpandableBanner/LuiExpandableBanner.test.d.ts +0 -1
  29. package/dist/components/LuiFilterContainer/LuiFilterContainer.stories.d.ts +0 -18
  30. package/dist/components/LuiFilterContainer/LuiFilterContainer.test.d.ts +0 -1
  31. package/dist/components/LuiFilterMenu/LuiFilterMenu.test.d.ts +0 -1
  32. package/dist/components/LuiFooter/LuiFooter.stories.d.ts +0 -7
  33. package/dist/components/LuiFooter/LuiFooter.test.d.ts +0 -1
  34. package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.stories.d.ts +0 -21
  35. package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInputWithFormik.stories.d.ts +0 -18
  36. package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.stories.d.ts +0 -8
  37. package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.test.d.ts +0 -1
  38. package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInput.stories.d.ts +0 -24
  39. package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInputWithFormik.stories.d.ts +0 -18
  40. package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.stories.d.ts +0 -35
  41. package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.stories.d.ts +0 -34
  42. package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.test.d.ts +0 -2
  43. package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInputWithFormik.stories.d.ts +0 -22
  44. package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.stories.d.ts +0 -39
  45. package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.test.d.ts +0 -2
  46. package/dist/components/LuiFormElements/LuiTextInput/LuiTextInputWithFormik.stories.d.ts +0 -22
  47. package/dist/components/LuiFormikForms/LuiFormikCheckbox/LuiFormikCheckbox.test.d.ts +0 -5
  48. package/dist/components/LuiFormikForms/LuiFormikForms.integration.test.d.ts +0 -1
  49. package/dist/components/LuiFormikForms/LuiFormikForms.stories.d.ts +0 -20
  50. package/dist/components/LuiFormikForms/LuiFormikRadioButton/LuiFormikRadioButton.test.d.ts +0 -1
  51. package/dist/components/LuiFormikForms/LuiFormikSelect/LuiFormikSelect.test.d.ts +0 -1
  52. package/dist/components/LuiFormikForms/LuiFormikTextInput/LuiFormikTextInput.test.d.ts +0 -1
  53. package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.stories.d.ts +0 -112
  54. package/dist/components/LuiForms/LuiFormSection/LuiFormSectionHeader.stories.d.ts +0 -5
  55. package/dist/components/LuiForms/LuiFormSection/LuiFormSectionHeader.test.d.ts +0 -1
  56. package/dist/components/LuiHeader/LuiHeader.stories.d.ts +0 -49
  57. package/dist/components/LuiHeader/LuiHeader.test.d.ts +0 -1
  58. package/dist/components/LuiHeaderMenu/LuiHeaderMenus.test.d.ts +0 -1
  59. package/dist/components/LuiIcon/LuiIcon.stories.d.ts +0 -11
  60. package/dist/components/LuiIcon/LuiIcon.test.d.ts +0 -1
  61. package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.stories.d.ts +0 -13
  62. package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.test.d.ts +0 -1
  63. package/dist/components/LuiMenu/LuiMenu.stories.d.ts +0 -20
  64. package/dist/components/LuiMenu/LuiMenu.test.d.ts +0 -1
  65. package/dist/components/LuiModal/LuiModal.stories.d.ts +0 -13
  66. package/dist/components/LuiModal/LuiModal.test.d.ts +0 -1
  67. package/dist/components/LuiModal/LuiModalContext.test.d.ts +0 -1
  68. package/dist/components/LuiShadow/LuiShadow.stories.d.ts +0 -7
  69. package/dist/components/LuiStaticMessage/LuiStaticMessage.stories.d.ts +0 -12
  70. package/dist/components/LuiStaticMessage/LuiStaticMessage.test.d.ts +0 -1
  71. package/dist/components/LuiTabs/LuiTabs.stories.d.ts +0 -7
  72. package/dist/components/LuiTabs/LuiTabs.test.d.ts +0 -1
  73. package/dist/components/LuiToastMessage/LuiToastMessage.auto.stories.d.ts +0 -19
  74. package/dist/components/LuiToastMessage/LuiToastMessage.test.d.ts +0 -1
  75. package/dist/components/LuiTooltip/LuiTooltip.stories.d.ts +0 -10
  76. package/dist/components/LuiUpdateSplashModal/LuiUpdateSplashModal.stories.d.ts +0 -7
  77. package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.test.d.ts +0 -1
  78. package/dist/components/common/ResponsiveUtils.test.d.ts +0 -1
  79. package/dist/components/lol/LOLActiveFirmMessage.test.d.ts +0 -1
  80. package/dist/components/lol/LOLAppLauncherMenu.test.d.ts +0 -56
  81. package/dist/components/lol/LOLAuthorisedLink.test.d.ts +0 -43
  82. package/dist/components/lol/LOLCommonDrawerMenu.test.d.ts +0 -43
  83. package/dist/components/lol/LOLComponents.stories.d.ts +0 -55
  84. package/dist/components/lol/LOLDrawerMenuFirmSwitcher.test.d.ts +0 -1
  85. package/dist/components/lol/LOLFirmSwitcher.test.d.ts +0 -43
  86. package/dist/components/lol/LOLLogoutLink.test.d.ts +0 -1
  87. package/dist/components/lol/LOLUserLastLogin.test.d.ts +0 -1
  88. package/dist/components/lol/contexts/LOLGlobalClientRefContext.test.d.ts +0 -1
  89. package/dist/components/lol/contexts/LOLUserContext.test.d.ts +0 -1
  90. package/dist/contexts/UIMessagingContextProvider.tests.d.ts +0 -1
  91. package/dist/hooks/__tests__/useClickedOutsideElement.test.d.ts +0 -1
  92. package/dist/lui.cjs.development.js +0 -20518
  93. package/dist/lui.cjs.development.js.map +0 -1
  94. package/dist/lui.cjs.production.min.js +0 -2
  95. package/dist/lui.cjs.production.min.js.map +0 -1
  96. package/dist/needs-revision/LuiHtml.stories.d.ts +0 -32
@@ -1 +0,0 @@
1
- {"version":3,"file":"lui.cjs.production.min.js","sources":["../src/components/LuiBanner/LuiBanner.tsx","../src/components/LuiButton/LuiButton.tsx","../src/components/LuiToastMessage/LuiToastMessage.tsx","../src/contexts/LuiMessagingContextProvider.tsx","../src/components/LuiExpandableBanner/LuiExpandableBanner.tsx","../src/components/LuiTabs/LuiTabs.tsx","../src/components/LuiTabs/LuiTab/LuiTab.tsx","../src/assets/svg-content.tsx","../src/components/LuiIcon/LuiIcon.tsx","../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../src/components/LuiError/LuiError.tsx","../src/components/LuiFormElements/LuiTextInput/LuiTextInput.tsx","../src/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.tsx","../src/components/LuiFormikForms/LuiFormikFormLabel/LuiFormikFormLabel.tsx","../src/components/LuiFormikForms/LuiFormikTextInput/LuiFormikTextInput.tsx","../src/components/LuiFormikForms/LuiFormikFormSubmitButton/LuiFormikFormSubmitButton.tsx","../src/components/LuiFormikForms/LuiFormikSelect/LuiFormikSelect.tsx","../src/components/LuiBearingInput/LuiBearingInput.tsx","../src/components/LuiLoadingSpinner/LuiLottieLight.tsx","../src/components/LuiLoadingSpinner/LuiLoadingSpinner.tsx","../src/components/LuiForms/LuiComboSelect/LuiComboSelect.tsx","../src/components/LuiShadow/LuiShadow.tsx","../src/components/LuiForms/LuiFormSection/LuiHelpInfo/LuiHelpInfo.tsx","../src/components/common/ResponsiveUtils.ts","../src/components/LuiHeader/LuiHeader.tsx","../src/components/common/Hooks.tsx","../src/components/LuiHeaderMenu/LuiHeaderMenus.tsx","../src/components/LuiModal/LuiModal.tsx","../node_modules/regenerator-runtime/runtime.js","../src/components/lol/contexts/LOLUserContext.tsx","../src/components/LuiFilterContainer/LuiFilterContainer.tsx","../src/components/lol/contexts/LOLGlobalClientRefContext.tsx","../src/components/lol/LOLFirmSwitcher.tsx","../src/components/lol/LOLLogoutLink.tsx","../src/components/lol/LOLUserLastLogin.tsx","../src/components/lol/LOLAuthorisedLink.tsx","../src/components/lol/LOLAppLauncherMenu.tsx","../src/components/lol/LOLDrawerMenuFirmSwitcher.tsx","../src/components/lol/LOLCommonDrawerMenu.tsx","../src/components/LuiTooltip/LuiTooltip.tsx","../src/components/lol/LOLActiveFirmMessage.tsx","../src/components/lol/contexts/LOLUserContextSupport.ts","../src/components/LuiBadge/LuiBadge.tsx","../src/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.tsx","../src/components/LuiMenu/LuiMenu.tsx","../src/components/LuiErrorPage/LuiErrorPage.tsx","../src/components/LuiFilterMenu/LuiFilterMenu.tsx","../src/components/LuiFooter/LuiFooter.tsx","../src/components/LuiForms/LuiFormSection/LuiFormSectionHeader.tsx","../src/components/LuiFormikForms/LuiFormikCheckbox/LuiFormikCheckbox.tsx","../src/components/LuiFormikForms/LuiFormikForm.tsx","../src/components/LuiFormikForms/LuiFormikRadioButton/LuiFormikRadioButton.tsx","../src/components/LuiFormikForms/LuiFormikRadioGroup/LuiFormikRadioGroup.tsx","../src/components/LuiFormElements/LuiRadioInput/LuiRadioInput.tsx","../src/components/LuiFormElements/LuiSelectInput/LuiSelectInput.tsx","../src/components/LuiStaticMessage/LuiStaticMessage.tsx","../src/components/LuiTabs/LuiTabsGroup/LuiTabsGroup.tsx","../src/components/LuiTabs/LuiTabsPanel/LuiTabsPanel.tsx","../src/components/LuiTabs/LuiTabsPanelSwitch/LuiTabsPanelSwitch.tsx","../src/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.tsx","../src/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.tsx","../src/hooks/useClickedOutsideElement.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n\ntype Props = {\n level: 'success' | 'info' | 'warning' | 'error';\n children: ReactNode;\n};\n\nexport const LuiBanner = (props: Props): JSX.Element => {\n return (\n <div className=\"lui-msg-banner-container\">\n <LuiBannerContent level={props.level}>{props.children}</LuiBannerContent>\n </div>\n );\n};\n\nexport const LuiBannerContent = (props: Props): JSX.Element => {\n let materialIcon = getMaterialIconForLevel(props.level);\n\n return (\n <div className={`lui-msg-${props.level} lui-msg-dynamic-banner`}>\n <i className=\"lui-msg-status-icon material-icons-round\">{materialIcon}</i>\n <div>{props.children}</div>\n </div>\n );\n};\n\nexport function getMaterialIconForLevel(\n level: 'success' | 'info' | 'warning' | 'error'\n) {\n switch (level) {\n case 'success':\n return 'check_circle';\n case 'info':\n return 'info';\n case 'warning':\n return 'warning';\n case 'error':\n return 'error';\n }\n}\n","import React, { MouseEvent, PropsWithChildren, ReactNode, Ref } from 'react';\nimport clsx from 'clsx';\n\ninterface LuiButtonProps extends PlainButtonProps {\n href?: string;\n openInNewTab?: boolean;\n level?:\n | 'text'\n | 'plain-text'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'error';\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n size?: 'sm' | '' | /* medium */ 'lg';\n}\n\ninterface PlainButtonProps {\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n disabled?: boolean;\n style?: React.CSSProperties;\n onClick?: (e: MouseEvent) => void;\n name?: string;\n title?: string;\n 'data-testid'?: string;\n className?: string;\n buttonProps?: any;\n ref: Ref<HTMLButtonElement>;\n children: ReactNode;\n}\n\nconst PlainButton = React.forwardRef<\n HTMLButtonElement,\n PlainButtonProps & { level: string; size: string }\n>((props, ref) => {\n return (\n <button\n {...props.buttonProps}\n type={props.type}\n title={props.title}\n disabled={props.disabled}\n name={props.name}\n onClick={props.onClick}\n className={clsx(\n 'lui-button',\n `lui-button-${props.level}`,\n `lui-button-${props.size}`,\n props.className\n )}\n data-testid={props['data-testid']}\n style={props.style}\n ref={ref}\n >\n {props.children}\n </button>\n );\n});\n\nexport const LuiButton = React.forwardRef<\n HTMLButtonElement,\n PropsWithChildren<LuiButtonProps>\n>((props, ref) => {\n const _level = props.level ? props.level : 'primary';\n const size = props.size ? props.size : 'med';\n\n if (props.href) {\n let aProps: any = {\n href: props.href,\n 'data-testid': props['data-testid'],\n name: props.name,\n title: props.title,\n className: clsx(\n 'lui-button',\n `lui-button-${props.level}`,\n `lui-button-${props.size}`,\n props.className\n ),\n style: props.style,\n };\n\n if (props.openInNewTab) {\n aProps.target = '_blank';\n aProps.rel = 'noopener noreferrer';\n }\n\n return <a {...aProps}>{props.children}</a>;\n }\n\n return (\n <PlainButton\n type={props.type}\n title={props.title}\n disabled={props.disabled}\n name={props.name}\n onClick={props.onClick}\n level={_level}\n size={size}\n data-testid={props['data-testid']}\n style={props.style}\n className={props.className}\n buttonProps={props.buttonProps}\n ref={ref}\n >\n {props.children}\n </PlainButton>\n );\n});\n\nexport const LuiButtonGroup: React.FC<{ children: any }> = (props) => {\n return (\n <div className=\"lui-button-group\" data-testid={'button-group'}>\n {props.children.map((child: React.FC, i: number) => {\n return (\n <div key={i} className={'lui-button-wrapper'}>\n {child}\n </div>\n );\n })}\n </div>\n );\n};\n","import React, { useState, useEffect } from 'react';\nimport { getMaterialIconForLevel } from '../LuiBanner/LuiBanner';\n\nexport type ILuiToastMessageLevels = 'success' | 'info' | 'warning' | 'error';\n\ninterface ILuiToastMessageProps {\n /** \"success\" | \"info\" | \"warning\" | \"error\" */\n level: ILuiToastMessageLevels;\n /** 0 means it will not disolve @default 4000 */\n displayTimeout?: number;\n /** allows the consumer to control when Toast fades @default true */\n display?: boolean;\n /** adds an X in the corner @default false */\n requireDismiss?: boolean;\n /** called when all said and done, allows the consumer to remove from React Dom */\n onClose?: () => void;\n children?: React.ReactNode;\n type?: 'button' | 'submit' | 'reset';\n}\n\nexport const LuiToastMessage: React.FC<ILuiToastMessageProps> = ({\n level,\n displayTimeout = 4000,\n display = true,\n requireDismiss,\n onClose,\n children,\n type,\n}: ILuiToastMessageProps) => {\n const [className, setClassname] = useState('lui-msg-toast-show');\n const [fadeOutTimer, setFadeOutTimer] = useState<number | undefined>(\n undefined\n );\n const [removeTimer, setRemoveTimer] = useState<number | undefined>(undefined);\n\n let materialIcon = getMaterialIconForLevel(level);\n\n const callOnCloseAfterDissolved = () => {\n // This is so the caller can remove it from the dom\n if (onClose) {\n const timer = window.setTimeout(onClose, displayTimeout);\n setRemoveTimer(timer);\n }\n };\n\n useEffect(() => {\n // clear timers if previously set\n fadeOutTimer && clearTimeout(fadeOutTimer);\n removeTimer && clearTimeout(removeTimer);\n setClassname('lui-msg-toast-show');\n\n if (!requireDismiss && displayTimeout !== 0) {\n // set a new timer\n const timer = window.setTimeout(() => {\n setClassname('lui-msg-toast-hide');\n callOnCloseAfterDissolved();\n }, displayTimeout);\n setFadeOutTimer(timer);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [requireDismiss, displayTimeout, children]);\n\n useEffect(() => {\n if (!display) {\n setClassname('lui-msg-toast-hide');\n callOnCloseAfterDissolved();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [display]);\n\n return (\n <div\n role=\"status\"\n data-testid={className}\n className={`lui-msg-${level} lui-msg-toast lui-msg-toast-dismissable ${className}`}\n >\n <i className=\"lui-msg-status-icon material-icons-round\">{materialIcon}</i>\n {children}\n <button\n aria-label=\"Close dialog\"\n type={type || 'button'}\n onClick={() => {\n setClassname('lui-msg-toast-hide');\n callOnCloseAfterDissolved();\n }}\n >\n <i className=\"material-icons-round\">close</i>\n </button>\n </div>\n );\n};\n","import React, { createContext, useContext, useState } from 'react';\nimport { LuiToastMessage } from '../components/LuiToastMessage/LuiToastMessage';\n\nexport type MessageLevel = 'success' | 'info' | 'warning' | 'error';\nexport type MessageType = 'toast';\n\nexport interface IUIMessagingContext {\n showMessage: (props: ShowMessageProps) => void;\n}\n\nconst UIMessagingContext = createContext<IUIMessagingContext>({\n // @ts-ignore\n showMessage: (props: ShowMessageProps) => {},\n});\n\nexport function useShowLUIMessage() {\n return useContext(UIMessagingContext).showMessage;\n}\n\nexport interface ShowMessageProps {\n message: string | JSX.Element;\n messageType: MessageType;\n messageLevel: MessageLevel;\n requireDismiss?: boolean;\n}\n\nexport const LuiMessagingContextProvider: React.FC = (props) => {\n const [_message, setMessage] = useState<string | JSX.Element>();\n const [_messageType, setMessageType] = useState<MessageType>();\n const [_messageLevel, setMessageLevel] = useState<MessageLevel>('success');\n const [_requireDismiss, setRequireDismiss] = useState<boolean>(true);\n\n const showMessage = (props: ShowMessageProps) => {\n setMessage(props.message);\n setMessageType(props.messageType);\n setMessageLevel(props.messageLevel);\n setRequireDismiss(\n props.requireDismiss === undefined\n ? props.messageLevel === 'error'\n : props.requireDismiss\n );\n };\n\n const renderMessage = () => {\n switch (_messageType) {\n case 'toast':\n return (\n <LuiToastMessage\n onClose={() => {\n setMessage(undefined);\n }}\n level={_messageLevel}\n requireDismiss={_requireDismiss}\n >\n <span data-testid={'toastMessageShow'}>\n {typeof _message === 'string' ? <h2>{_message}</h2> : _message}\n </span>\n </LuiToastMessage>\n );\n default:\n return null;\n }\n };\n\n return (\n <UIMessagingContext.Provider value={{ showMessage }}>\n {_message && renderMessage()}\n {props.children}\n </UIMessagingContext.Provider>\n );\n};\n","import React, { ReactNode, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nexport interface Expandable {\n className?: string;\n label: string;\n labelPrefix?: ReactNode;\n}\n\nexport const LuiExpandableBanner: React.FC<Expandable> = (props) => {\n const display = useRef(null);\n\n const [collapse, setCollapse] = useState(true);\n const collapseSection = (element: any) => {\n // get the height of the element's inner content, regardless of its actual size\n const sectionHeight = element.scrollHeight;\n // on the next frame (as soon as the previous style change has taken effect),\n // explicitly set the element's height to its current pixel height, so we\n // aren't transitioning out of 'auto'\n requestAnimationFrame(() => {\n element.style.height = sectionHeight + 'px';\n // on the next frame (as soon as the previous style change has taken effect),\n // have the element transition to height: 0\n requestAnimationFrame(() => {\n element.style.height = 0 + 'px';\n });\n });\n\n // mark the section as \"currently collapsed\"\n setCollapse(true);\n };\n\n const expandSection = (element: any) => {\n // get the height of the element's inner content, regardless of its actual size\n const sectionHeight = element.scrollHeight;\n // have the element transition to the height of its inner content\n element.style.height = sectionHeight + 'px';\n // when the next css transition finishes (which should be the one we just triggered)\n setTimeout(() => {\n element.style.height = 'auto';\n }, 500);\n // mark the section as \"currently not collapsed\"\n setCollapse(false);\n };\n\n const expandFunction = () => {\n const section = display.current;\n if (collapse) {\n expandSection(section);\n } else {\n collapseSection(section);\n }\n };\n\n return (\n <>\n <div className={clsx('lui-expand-container', props.className)}>\n {props.labelPrefix}\n <div\n className={'lui-expand-header'}\n onClick={expandFunction}\n style={{ width: '100%' }}\n >\n <h3>{props.label}</h3>\n <i\n className={clsx(\n collapse\n ? 'lui-expand-icon material-icons-round'\n : 'lui-expand-icon material-icons-round lui-expand-icon-transform'\n )}\n >\n {'expand_more'}\n </i>\n </div>\n </div>\n <div className={'lui-collapse-text'} ref={display}>\n {props.children}\n </div>\n </>\n );\n};\n","import React, { useState } from 'react';\ninterface ILuiTabsContext {\n activePanel: string | null;\n setActivePanel: (activePanel: string) => void;\n}\n\nexport const LuiTabsContext = React.createContext<ILuiTabsContext>({\n activePanel: null,\n setActivePanel: () => {},\n});\n\nexport const LuiTabs: React.FC<{\n defaultPanel: string;\n}> = (props) => {\n let [activePanel, setActivePanel] = useState<string>(props.defaultPanel);\n return (\n <div className=\"LuiTabs\">\n <LuiTabsContext.Provider value={{ activePanel, setActivePanel }}>\n {props.children}\n </LuiTabsContext.Provider>\n </div>\n );\n};\n","import React from 'react';\nimport clsx from 'clsx';\n\ninterface LuiTabProps {\n onClick: () => void;\n active: boolean;\n id: string;\n ariaControls: string;\n children: React.ReactNode;\n}\n\nexport const LuiTab: React.FC<LuiTabProps> = (props) => {\n return (\n <button\n className={clsx('LuiTab', props.active && 'LuiTab--active')}\n id={props.id}\n role=\"tab\"\n aria-selected={props.active}\n aria-controls={`${props.ariaControls}`}\n onClick={props.onClick}\n >\n {props.children}\n </button>\n );\n};\n","// NOTE: This is a generated file, nothing you do here matters\n// The source of the all.svg file is located at './src/all.svg'\n// The script that generates this file is located at tools/svg-generator.js\n// To rebuild this file run 'yarn run generate-svgs'\nimport React from 'react';\n\n// @TODO This is a generated file, nothing is safe.\n\nexport const ic_account_circle = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 19.219q1.594 0 3.352-.938T18 15.984q-.047-1.313-2.109-2.203T12 12.89t-3.891.867T6 15.984q.891 1.359 2.648 2.297t3.352.938zm0-14.203q-1.219 0-2.109.891T9 8.016t.891 2.109 2.109.891 2.109-.891T15 8.016t-.891-2.109T12 5.016zm0-3q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016z\" />\n </svg>\n);\n\nexport const ic_add_circle = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M17.016 12.984v-1.969h-4.031V6.984h-1.969v4.031H6.985v1.969h4.031v4.031h1.969v-4.031h4.031zM12 2.016q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016z\" />\n </svg>\n);\n\nexport const ic_add_circle_outline = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648T12 3.986 6.352 6.353t-2.367 5.648 2.367 5.648T12 20.016zm0-18q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016zm.984 4.968v4.031h4.031v1.969h-4.031v4.031h-1.969v-4.031H6.984v-1.969h4.031V6.984h1.969z\" />\n </svg>\n);\n\nexport const ic_arrow_back = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M20.016 11.016v1.969H7.828l5.578 5.625L12 20.016 3.984 12 12 3.984l1.406 1.406-5.578 5.625h12.188z\" />\n </svg>\n);\n\nexport const ic_arrow_back_ios = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M17.836 3.891 9.727 12l8.109 8.109-1.781 1.781-9.891-9.891 9.891-9.891z\" />\n </svg>\n);\n\nexport const ic_arrow_drop_down = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M6.984 9.492h10.031l-5.016 5.016z\" />\n </svg>\n);\n\nexport const ic_arrow_drop_up = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M6.984 14.508 12 9.492l5.016 5.016H6.985z\" />\n </svg>\n);\n\nexport const ic_arrow_forward_ios = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"m5.93 4.125 2.156-2.109L18.07 12l-9.984 9.984-2.156-2.109L13.852 12z\" />\n </svg>\n);\n\nexport const ic_attachment = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M2.016 12.023q0-2.297 1.594-3.914t3.891-1.617h10.5q1.641 0 2.813 1.195t1.172 2.836-1.172 2.813-2.813 1.172H9.517q-1.031 0-1.781-.727t-.75-1.758.75-1.781 1.781-.75h7.5v2.016H9.423q-.422 0-.422.492t.422.492h8.578q.797 0 1.406-.586t.609-1.383-.609-1.406-1.406-.609h-10.5q-1.453 0-2.484 1.031t-1.031 2.484 1.031 2.461 2.484 1.008h9.516v2.016H7.501q-2.297 0-3.891-1.594t-1.594-3.891z\" />\n </svg>\n);\n\nexport const ic_border_color = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M0 20.016h24V24H0v-3.984zM20.719 4.031 18.75 6 15 2.25 16.969.281Q17.25 0 17.672 0t.703.281l2.344 2.344q.281.281.281.703t-.281.703zm-2.953 2.953L7.735 17.015h-3.75v-3.75L14.016 3.234z\" />\n </svg>\n);\n\nexport const ic_check = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M8.789 15.891 19.383 5.297l1.406 1.406-12 12-5.578-5.578 1.406-1.406z\" />\n </svg>\n);\n\nexport const ic_check_circle = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"m9.984 17.016 9-9-1.406-1.453-7.594 7.594-3.563-3.563L5.015 12zm2.016-15q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016z\" />\n </svg>\n);\n\nexport const ic_check_circle_outline = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648T12 3.986 6.352 6.353t-2.367 5.648 2.367 5.648T12 20.016zm0-18q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016zm4.594 5.578L18 9l-8.016 8.016L5.015 12l1.406-1.406 3.563 3.563z\" />\n </svg>\n);\n\nexport const ic_clear = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M18.984 6.422 13.406 12l5.578 5.578-1.406 1.406L12 13.406l-5.578 5.578-1.406-1.406L10.594 12 5.016 6.422l1.406-1.406L12 10.594l5.578-5.578z\" />\n </svg>\n);\n\nexport const ic_corporate_fare = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 6.984V3H2.016v18h19.969V6.984h-9.984zm-2.016 12h-6v-1.969h6v1.969zm0-3.984h-6v-2.016h6V15zm0-3.984h-6V9h6v2.016zm0-4.032h-6V5.015h6v1.969zm10.032 12H12V9h8.016v9.984zM18 11.016h-3.984v1.969H18v-1.969zM18 15h-3.984v2.016H18V15z\" />\n </svg>\n);\n\nexport const ic_create = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"m20.719 7.031-1.828 1.828-3.75-3.75 1.828-1.828Q17.25 3 17.672 3t.703.281l2.344 2.344q.281.281.281.703t-.281.703zM3 17.25 14.063 6.187l3.75 3.75L6.75 21H3v-3.75z\" />\n </svg>\n);\n\nexport const ic_error = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12.984 12.984v-6h-1.969v6h1.969zm0 4.032V15h-1.969v2.016h1.969zm-.984-15q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016z\" />\n </svg>\n);\n\nexport const ic_error_outline = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648T12 3.986 6.352 6.353t-2.367 5.648 2.367 5.648T12 20.016zm0-18q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016zm-.984 4.968h1.969v6h-1.969v-6zm0 8.016h1.969v2.016h-1.969V15z\" />\n </svg>\n);\n\nexport const ic_expand_less = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"m12 8.297 6 6-1.406 1.406L12 11.109l-4.594 4.594L6 14.297z\" />\n </svg>\n);\n\nexport const ic_expand_more = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M16.594 8.297 18 9.703l-6 6-6-6 1.406-1.406L12 12.891z\" />\n </svg>\n);\n\nexport const ic_filter_list = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M6 12.984v-1.969h12v1.969H6zM3 6h18v2.016H3V6zm6.984 12v-2.016h4.031V18H9.984z\" />\n </svg>\n);\n\nexport const ic_flag = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M13.875 5.508H19.5v9.984h-7.031l-.375-1.969H6.469v6.984H4.5V3.491h9z\" />\n </svg>\n);\n\nexport const ic_forward = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 8.016V3.985l8.016 8.016L12 20.017v-4.031H3.984V8.017H12z\" />\n </svg>\n);\n\nexport const ic_insert_invitation = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M18.984 19.992V9.023H5.015v10.969h13.969zm-3-18H18v2.016h.984q.797 0 1.406.609t.609 1.406v13.969q0 .797-.609 1.406t-1.406.609H5.015q-.844 0-1.43-.586t-.586-1.43V6.022q0-.797.586-1.406t1.43-.609h.984V1.991h2.016v2.016h7.969V1.991zm1.032 11.016v5.016H12v-5.016h5.016z\" />\n </svg>\n);\n\nexport const ic_insert_photo = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M8.484 13.5 5.015 18h13.969l-4.5-6-3.469 4.5zM21 18.984q0 .797-.609 1.406t-1.406.609H5.016q-.797 0-1.406-.609t-.609-1.406V5.015q0-.797.609-1.406T5.016 3h13.969q.797 0 1.406.609T21 5.015v13.969z\" />\n </svg>\n);\n\nexport const ic_keyboard_arrow_down = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M7.406 8.297 12 12.891l4.594-4.594L18 9.703l-6 6-6-6z\" />\n </svg>\n);\n\nexport const ic_keyboard_arrow_left = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M15.703 16.594 14.297 18l-6-6 6-6 1.406 1.406L11.109 12z\" />\n </svg>\n);\n\nexport const ic_keyboard_arrow_right = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M8.297 16.594 12.891 12 8.297 7.406 9.703 6l6 6-6 6z\" />\n </svg>\n);\n\nexport const ic_keyboard_arrow_up = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M7.406 15.703 6 14.297l6-6 6 6-1.406 1.406L12 11.109z\" />\n </svg>\n);\n\nexport const ic_navigate_before = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M15.703 7.406 11.109 12l4.594 4.594L14.297 18l-6-6 6-6z\" />\n </svg>\n);\n\nexport const ic_navigate_next = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"m9.703 6 6 6-6 6-1.406-1.406L12.891 12 8.297 7.406z\" />\n </svg>\n);\n\nexport const ic_people_outline = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M16.5 6.516q-.797 0-1.406.586t-.609 1.383.609 1.406 1.406.609 1.406-.609.609-1.406-.609-1.383-1.406-.586zm0 5.484q-1.453 0-2.484-1.031t-1.031-2.484 1.031-2.461T16.5 5.016t2.484 1.008 1.031 2.461-1.031 2.484T16.5 12zm-9-5.484q-.797 0-1.406.586t-.609 1.383.609 1.406T7.5 10.5t1.406-.609.609-1.406-.609-1.383T7.5 6.516zM7.5 12q-1.453 0-2.484-1.031T3.985 8.485t1.031-2.461T7.5 5.016t2.484 1.008 1.031 2.461-1.031 2.484T7.5 12zm14.016 5.484v-1.219q0-.469-1.664-1.125t-3.352-.656q-1.219 0-3 .563.516.609.516 1.219v1.219h7.5zm-9 0v-1.219q0-.469-1.664-1.125T7.5 14.484t-3.352.656-1.664 1.125v1.219h10.031zm3.984-4.5q2.016 0 4.266.914t2.25 2.367v2.719H.985v-2.719q0-1.453 2.25-2.367t4.266-.914q2.203 0 4.5 1.031 2.297-1.031 4.5-1.031z\" />\n </svg>\n);\n\nexport const ic_person = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 14.016q2.531 0 5.273 1.102t2.742 2.883v2.016H3.984v-2.016q0-1.781 2.742-2.883t5.273-1.102zM12 12q-1.641 0-2.813-1.172T8.015 8.015t1.172-2.836T12 3.984t2.813 1.195 1.172 2.836-1.172 2.813T12 12z\" />\n </svg>\n);\n\nexport const ic_person_add = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M15 14.016q2.531 0 5.273 1.102t2.742 2.883v2.016H6.984v-2.016q0-1.781 2.742-2.883t5.273-1.102zM6 9.984h3V12H6v3H3.984v-3h-3V9.984h3v-3H6v3zM15 12q-1.641 0-2.813-1.172t-1.172-2.813 1.172-2.836T15 3.984t2.813 1.195 1.172 2.836-1.172 2.813T15 12z\" />\n </svg>\n);\n\nexport const ic_remove_circle = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M17.016 12.984v-1.969H6.985v1.969h10.031zM12 2.016q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016z\" />\n </svg>\n);\n\nexport const ic_remove_circle_outline = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648T12 3.986 6.352 6.353t-2.367 5.648 2.367 5.648T12 20.016zm0-18q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055T12 21.986t-7.055-2.93-2.93-7.055 2.93-7.055T12 2.016zm-5.016 9h10.031v1.969H6.984v-1.969z\" />\n </svg>\n);\n\nexport const ic_send = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M1.5 21v-6.984L16.5 12l-15-2.016V3l21 9z\" />\n </svg>\n);\n\nexport const ic_publish = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M5 4h14v2H5zm0 10h4v6h6v-6h4l-7-7l-7 7zm8-2v6h-2v-6H9.83L12 9.83L14.17 12H13z\" />\n </svg>\n);\n\nexport const ic_view_week = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M13.476 5.016q.422 0 .727.281t.305.703v12q0 .422-.305.703t-.727.281h-3q-.422 0-.703-.281T9.492 18V6q0-.422.281-.703t.703-.281h3zm7.032 0q.422 0 .703.281t.281.703v12q0 .422-.281.703t-.703.281h-3q-.422 0-.727-.281T16.476 18V6q0-.422.305-.703t.727-.281h3zm-14.016 0q.422 0 .703.281T7.476 6v12q0 .422-.281.703t-.703.281h-3q-.422 0-.703-.281T2.508 18V6q0-.422.281-.703t.703-.281h3z\" />\n </svg>\n);\n\nexport const ic_warning = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12.984 14.508v-4.031h-1.969v4.031h1.969zm0 3.984v-2.016h-1.969v2.016h1.969zm-12 3L12 2.508l11.016 18.984H.985z\" />\n </svg>\n);\n\n// END OF FILE\n","import clsx from 'clsx';\nimport * as React from 'react';\n\n// This component will import assets from the svg content file that is a code compilation our simple icons\n// At this stage new icons need their width and height removed and replaced with\n// The new icon is added to the export list for a bit of sense checking (could use * I guess)\n// Icons then biffed in an object\n// They are then typed by magic methods I read on stackoverflow (key of type of) that I will forget instantly\n// Nice thing is that for both the size and the icons they should autocomplete/typeahead\n//\n// Use these to replace the material <i> things as you find them\n// Classname gets optionally added. use this to add fill css property to change colour\n\n// @TODO Make this automagic during generate-svgs script\nimport {\n ic_account_circle,\n ic_add_circle_outline,\n ic_add_circle,\n ic_arrow_back_ios,\n ic_arrow_back,\n ic_arrow_drop_down,\n ic_arrow_drop_up,\n ic_arrow_forward_ios,\n ic_attachment,\n ic_border_color,\n ic_check_circle_outline,\n ic_check_circle,\n ic_check,\n ic_clear,\n ic_corporate_fare,\n ic_create,\n ic_error_outline,\n ic_error,\n ic_expand_less,\n ic_expand_more,\n ic_filter_list,\n ic_flag,\n ic_forward,\n ic_insert_invitation,\n ic_insert_photo,\n ic_keyboard_arrow_down,\n ic_keyboard_arrow_left,\n ic_keyboard_arrow_right,\n ic_keyboard_arrow_up,\n ic_navigate_before,\n ic_navigate_next,\n ic_people_outline,\n ic_person_add,\n ic_person,\n ic_publish,\n ic_remove_circle_outline,\n ic_remove_circle,\n ic_send,\n ic_view_week,\n ic_warning,\n} from '../../assets/svg-content';\n\nexport const ICONS = {\n ic_account_circle,\n ic_add_circle_outline,\n ic_add_circle,\n ic_arrow_back_ios,\n ic_arrow_back,\n ic_arrow_drop_down,\n ic_arrow_drop_up,\n ic_arrow_forward_ios,\n ic_attachment,\n ic_border_color,\n ic_check_circle_outline,\n ic_check_circle,\n ic_check,\n ic_clear,\n ic_corporate_fare,\n ic_create,\n ic_error_outline,\n ic_error,\n ic_expand_less,\n ic_expand_more,\n ic_filter_list,\n ic_flag,\n ic_forward,\n ic_insert_invitation,\n ic_insert_photo,\n ic_keyboard_arrow_down,\n ic_keyboard_arrow_left,\n ic_keyboard_arrow_right,\n ic_keyboard_arrow_up,\n ic_navigate_before,\n ic_navigate_next,\n ic_people_outline,\n ic_person_add,\n ic_person,\n ic_publish,\n ic_remove_circle_outline,\n ic_remove_circle,\n ic_send,\n ic_view_week,\n ic_warning,\n};\n\ntype IconSize = keyof typeof ICON_SIZES;\ntype IconStatus = keyof typeof ICON_STATUS;\nexport type IconName = keyof typeof ICONS;\n\nexport interface LuiIconProps {\n /**\n * The `ic_string` name\n */\n name: IconName;\n alt: string;\n size?: IconSize;\n status?: IconStatus;\n className?: string;\n title?: string;\n spanProps?: any;\n}\n\nexport const ICON_SIZES = {\n xs: 'LuiIcon--xs',\n sm: 'LuiIcon--sm',\n md: 'LuiIcon--md',\n lg: 'LuiIcon--lg',\n xl: 'LuiIcon--xl',\n ns: 'LuiIcon--noSize',\n};\n\nexport const ICON_STATUS = {\n none: '',\n error: 'LuiIcon--error',\n warning: 'LuiIcon--warning',\n success: 'LuiIcon--success',\n interactive: 'LuiIcon--interactive',\n disabled: 'LuiIcon--disabled',\n};\n\nexport const LuiIcon = ({\n name,\n className,\n size = 'ns',\n title,\n alt,\n status = 'none',\n spanProps,\n}: LuiIconProps) => {\n const iconSVG = ICONS[name];\n\n if (!iconSVG) {\n console.warn(`No icon found for: ${iconSVG}`);\n return null;\n }\n\n return (\n <span\n className={clsx(\n 'LuiIcon',\n className,\n size && ICON_SIZES[size],\n status && ICON_STATUS[status]\n )}\n data-icon={name}\n title={title}\n aria-label={alt}\n {...spanProps}\n >\n {iconSVG}\n </span>\n );\n};\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export default n;\n","import React from 'react';\nimport { LuiIcon } from '../LuiIcon/LuiIcon';\nimport '../../scss/Components/LuiError/LuiError.scss';\n\ninterface ILuiError {\n error?: string | boolean;\n className: string;\n}\n\nexport const LuiError = ({ error, className }: ILuiError) => (\n <div className={`LuiError ${className}-error`}>\n <LuiIcon\n className={`LuiError-errorIcon ${className}-errorIcon`}\n alt={'Error'}\n name=\"ic_error\"\n size=\"md\"\n status=\"error\"\n />\n {error && (\n <span className={`LuiError-errorText ${className}-errorText`}>\n {error}\n </span>\n )}\n </div>\n);\n","import React, {\n ChangeEventHandler,\n InputHTMLAttributes,\n useState,\n} from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport clsx from 'clsx';\nimport { LuiIcon } from '../../LuiIcon/LuiIcon';\n\nexport interface LuiTextInputProps {\n onChange?: ChangeEventHandler<HTMLInputElement>;\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n error?: string;\n hideLabel?: boolean;\n label: JSX.Element | string;\n /**\n * A red star will be shown next to the label, no validation will be performed based on this prop.\n */\n mandatory?: boolean;\n /**\n * A padlock will be displayed on right side of input\n */\n showPadlockIcon?: boolean;\n value: string;\n}\n\nexport function useGenerateOrDefaultId(idFromProps?: string) {\n const [id] = useState(idFromProps ? idFromProps : uuidv4());\n return id;\n}\n\nexport const LuiTextInput = (props: LuiTextInputProps): JSX.Element => {\n const id = useGenerateOrDefaultId(props.inputProps?.id);\n\n return (\n <div className={clsx('LuiTextInput', props.error && 'hasError')}>\n <label className={'LuiTextInput-label'} htmlFor={id}>\n {props.mandatory && <span className=\"LuiTextInput-mandatory\">*</span>}\n <span\n className={\n 'LuiTextInput-label-text ' +\n clsx(props.hideLabel ? 'LuiScreenReadersOnly' : '')\n }\n >\n {props.label}\n </span>\n <span className=\"LuiTextInput-inputWrapper\">\n <input\n type={'text'}\n className={\n (props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '') +\n clsx('LuiTextInput-input')\n }\n min=\"0\"\n value={props.value}\n onChange={props.onChange}\n {...props.inputProps}\n id={id}\n />\n </span>\n\n {/* Error message */}\n {props.error && (\n <span className=\"LuiTextInput-error\">\n <LuiIcon\n alt=\"error\"\n name=\"ic_error\"\n className=\"LuiTextInput-error-icon\"\n size=\"sm\"\n status=\"error\"\n />\n {props.error}\n </span>\n )}\n </label>\n </div>\n );\n};\n","import React, { useState } from 'react';\nimport clsx from 'clsx';\nimport { LuiIcon } from '../../LuiIcon/LuiIcon';\n\nexport interface LuiFileInputBoxProps {\n fileDescription: string;\n acceptedExtensions: string[]; // without dots\n fileFormatText?: string;\n onValidFileSelected: (file: File) => void; // file picked\n showMustSelectFileError?: boolean; // set to true if a file was not selected but must be\n customFileErrorMessage?: string; // If provided will override the error message\n width?: number;\n height?: number;\n}\n\nexport const LuiFileInputBox = (props: LuiFileInputBoxProps): JSX.Element => {\n const [file, setFile] = useState<File>();\n const [hasFileFormatError, setHasFileFormatError] = useState<boolean>(false);\n\n const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n // Logic to go here to check extensions and setHasFileFormatError\n\n setHasFileFormatError(false);\n const files = e.target.files;\n // File upload box is configured to only accept 1 file, we can't have more than one here\n if (files && files.length === 1) {\n const selectedFile = files[0];\n const supportedFileTypes = props.acceptedExtensions.map((ext) =>\n ext.toUpperCase()\n );\n const fileName = selectedFile.name;\n if (!supportedFileTypes.includes(getFileNameExtension(fileName))) {\n setHasFileFormatError(true);\n setFile(undefined);\n } else {\n setFile(selectedFile);\n props.onValidFileSelected(selectedFile);\n }\n }\n };\n\n const hasError = hasFileFormatError || props.showMustSelectFileError === true;\n\n return (\n <div\n className={clsx(\n 'LuiFileInputBox-upload',\n hasError && 'LuiFileInputBox-upload-error'\n )}\n style={{ width: props.width || 320, height: props.height || 320 }}\n >\n <input\n role=\"button\"\n aria-label=\"File Upload\"\n type=\"file\"\n className=\"LuiFileInputBox-upload-input\"\n accept={props.acceptedExtensions\n .map((extension) => `.${extension}`)\n .join(',')}\n onChange={onChange}\n />\n\n <>\n {hasError ? (\n <div className=\"LuiFileInputBox-upload-container\">\n <>\n <div className={'LuiFileInputBox-upload-icon-error'}>\n <LuiIcon name=\"ic_error_outline\" size={'ns'} alt=\"Error\" />\n </div>\n {props.customFileErrorMessage ? (\n <p>{props.customFileErrorMessage}</p>\n ) : (\n <p className=\"LuiFileInputBox-upload-text\">\n You must select a file with extension of{' '}\n {extensionsAsHumanReadableList(props.acceptedExtensions)}.\n </p>\n )}\n </>\n </div>\n ) : (\n <FileUploadInfo\n fileName={file?.name}\n fileFormatText={props.fileFormatText}\n fileDescription={props.fileDescription}\n />\n )}\n </>\n </div>\n );\n};\n\n// Only exported for chromatic\nexport interface FileUploadInfoProps {\n fileName: string | undefined;\n fileDescription: string;\n fileFormatText: string | undefined;\n}\n\n// Only exported for chromatic\nexport const FileUploadInfo = (props: FileUploadInfoProps): JSX.Element => {\n const DragAndDropInstruction = () => (\n <p className=\"LuiFileInputBox-upload-text\">\n Drag and drop your {props.fileDescription} into the box\n <br />\n <span>(or upload file manually)</span>\n </p>\n );\n\n const WaitingForFileSelection = (): JSX.Element => (\n <>\n <div className={'LuiFileInputBox-upload-icon-upload'}>\n <LuiIcon name=\"ic_publish\" size={'ns'} alt=\"Upload\" />\n </div>\n <DragAndDropInstruction />\n {props.fileFormatText && (\n <p className=\"LuiFileInputBox-upload-text LuiFileInputBox-upload-text-no-padding\">\n {props.fileFormatText}\n </p>\n )}\n </>\n );\n\n const UploadSuccess = (): JSX.Element => (\n <>\n <div className={'LuiFileInputBox-upload-icon-success'}>\n <LuiIcon name=\"ic_check_circle_outline\" size={'ns'} alt=\"Success\" />\n </div>\n <p className=\"LuiFileInputBox-upload-file-name\">{props.fileName}</p>\n <DragAndDropInstruction />\n </>\n );\n\n return (\n <div className=\"LuiFileInputBox-upload-container\">\n {props.fileName ? <UploadSuccess /> : <WaitingForFileSelection />}\n </div>\n );\n};\n\n/**\n * Get the extension from a filename in upper-case.\n *\n * @param fileName File-name to get extension from\n * @return fileName extension in upper-case if found else empty string\n */\nexport const getFileNameExtension = (fileName: string): string => {\n const idx = fileName.lastIndexOf('.');\n return idx === -1 ? '' : fileName.substr(idx + 1).toUpperCase();\n};\n\n/**\n * Convert an array of extensions to a human readable string in upper-case.\n * e.g. JPG, TIFF or BMP.\n *\n * @param extensions List of extensions to convert.\n * @return Extensions in a human readable string in upper-case.\n */\nexport const extensionsAsHumanReadableList = (extensions: string[]): string => {\n const uppercaseExtensions = extensions.map((extension) =>\n extension.toUpperCase()\n );\n if (!extensions.length) return '';\n if (extensions.length === 1) return uppercaseExtensions[0];\n\n return `${uppercaseExtensions.slice(0, -1).join(', ')} or ${\n uppercaseExtensions[extensions.length - 1]\n }`;\n};\n","import React from 'react';\nimport clsx from 'clsx';\n\nexport const LuiFormikFormLabel: React.FC<{\n for: string;\n label: string;\n className?: string;\n required?: boolean;\n tooltip?: string;\n}> = (props) => (\n <div\n className={clsx(\n 'LuiFormLabel-wrapper',\n props.className && `${props.className}`\n )}\n >\n {props.children}\n <label className=\"LuiFormLabel\" htmlFor={props.for}>\n {props.required && <span className=\"lui-required-input-icon\">*</span>}\n {props.label}\n </label>\n {props.tooltip && <i className=\"material-icons-round\">help</i>}\n </div>\n);\n","import clsx from 'clsx';\nimport {\n connect,\n ErrorMessage,\n Field,\n FormikContextType,\n getIn,\n useFormikContext,\n} from 'formik';\nimport React, { ReactNode } from 'react';\nimport { LuiCommonInputProps } from '../LuiFormikForm';\nimport { LuiFormikFormLabel } from '../LuiFormikFormLabel/LuiFormikFormLabel';\n\nexport const LuiFormikTextInput = connect<\n {\n name: string;\n label?: string;\n className?: string;\n helperInfo?: ReactNode;\n tooltip?: string;\n validate?: (value: string) => string | undefined;\n onValueChange?: (newValue: {\n value: string;\n formik: FormikContextType<any>;\n }) => void;\n validateOnChange?: boolean;\n multiLine?: boolean;\n } & LuiCommonInputProps\n>((props) => {\n const error = getIn(props.formik.errors, props.name);\n const touch = getIn(props.formik.touched, props.name);\n const showError = touch && error;\n const { setFieldValue } = useFormikContext();\n\n const multiLineToggle = (field: any): JSX.Element =>\n !props.multiLine ? (\n <input\n id={props.name}\n data-testid={props.name}\n {...field}\n type=\"text\"\n {...props.inputProps}\n onChange={(event) => {\n setFieldValue(\n props.name,\n event.target.value,\n props.validateOnChange ?? true\n );\n if (props.onValueChange) {\n props.onValueChange({\n value: event.target.value,\n formik: props.formik,\n });\n }\n }}\n />\n ) : (\n <textarea\n id={props.name}\n data-testid={props.name}\n {...field}\n rows={1}\n {...props.inputProps}\n onChange={(event) => {\n setFieldValue(\n props.name,\n event.target.value,\n props.validateOnChange ?? true\n );\n if (props.onValueChange) {\n props.onValueChange({\n value: event.target.value,\n formik: props.formik,\n });\n }\n }}\n />\n );\n\n return (\n <div className={clsx(props.className && `${props.className}`)}>\n {props.label && (\n <LuiFormikFormLabel\n required={props.required}\n label={props.label}\n for={props.name}\n tooltip={props.tooltip}\n />\n )}\n {props.helperInfo}\n <Field name={props.name} validate={props.validate}>\n {({ field }: any) => {\n return (\n <div className={clsx(showError && 'lui-input-error')}>\n <ErrorMessage\n name={props.name}\n render={() => (\n <i className=\"lui-form-status-icon material-icons-round\">\n error\n </i>\n )}\n />\n {multiLineToggle(field)}\n <ErrorMessage\n name={props.name}\n className={'lui-error-msg'}\n component=\"p\"\n />\n </div>\n );\n }}\n </Field>\n </div>\n );\n});\n","import { connect } from 'formik';\nimport React from 'react';\nimport { LuiButton } from '../../LuiButton/LuiButton';\n\nexport const LuiFormikFormSubmitButton = connect<{\n className?: string;\n disabled?: boolean;\n 'data-testid'?: string;\n}>((props) => {\n return (\n <LuiButton\n type=\"submit\"\n className={props.className}\n level=\"primary\"\n data-testid={props['data-testid']}\n disabled={!!props.disabled}\n >\n {props.children}\n </LuiButton>\n );\n});\n","import clsx from 'clsx';\nimport { connect, ErrorMessage, Field, getIn } from 'formik';\nimport React from 'react';\nimport { LuiFormikFormLabel } from '../LuiFormikFormLabel/LuiFormikFormLabel';\nimport { LuiCommonInputProps } from '../LuiFormikForm';\n\nexport const LuiFormikSelect = connect<\n {\n name: string;\n label: string;\n className?: string;\n defaultValue?: string;\n helperInfo?: () => React.Component;\n tooltip?: string;\n validate?: (value: string) => string | undefined;\n } & LuiCommonInputProps\n>((props) => {\n const error = getIn(props.formik.errors, props.name);\n const touch = getIn(props.formik.touched, props.name);\n const showError = touch && error;\n\n return (\n <div className={props.className}>\n {props.label && (\n <LuiFormikFormLabel\n className={'lui-margin-bottom-xxs'}\n for={props.name}\n label={props.label}\n required={!!props.required}\n tooltip={props.tooltip}\n />\n )}\n {props.helperInfo}\n <div\n className={clsx('lui-input-wrapper', showError && 'lui-input-error')}\n >\n <ErrorMessage\n name={props.name}\n render={() => (\n <i className=\"lui-form-status-icon material-icons-round\">error</i>\n )}\n />\n\n <Field\n disabled={props.disabled}\n defaultValue={props.defaultValue}\n name={props.name}\n id={props.name}\n validate={props.validate}\n as=\"select\"\n {...props.inputProps}\n >\n {props.children}\n </Field>\n\n <ErrorMessage\n name={props.name}\n className={'lui-error-msg'}\n component=\"p\"\n />\n </div>\n </div>\n );\n});\n","import { Field, getIn, useFormikContext } from 'formik';\nimport clsx from 'clsx';\nimport React, { ReactNode, useState } from 'react';\nimport { LuiCommonInputProps } from '../LuiFormikForms/LuiFormikForm';\nimport { LuiFormikFormLabel } from '../LuiFormikForms/LuiFormikFormLabel/LuiFormikFormLabel';\n\ninterface LuiBearingInputProps {\n name: string;\n label?: string;\n helperInfo?: ReactNode;\n tooltip?: string;\n value: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n validationError?: string;\n onValidate?: (error: string | null) => void;\n}\n\nexport const LuiBearingInput: React.FC<\n LuiBearingInputProps & LuiCommonInputProps\n> = (props) => {\n interface Bearing {\n sign: '+' | '-';\n degrees: number;\n minutes: number;\n seconds: number;\n }\n\n const maxDecimal = 1;\n const maxAfterDP = 4 + maxDecimal;\n\n const parseBearing = (decimalIsh: string): Bearing => {\n const sign = decimalIsh.startsWith('-') ? '-' : '+';\n const parts = decimalIsh.split('.');\n const degrees = Math.abs(parseInt(parts[0])) || 0;\n let remainder = parts.length > 1 ? parts[1] : '0000';\n while (remainder.length < 4) {\n remainder += '0';\n }\n\n const minutes = parseInt(remainder.substr(0, 2));\n const seconds = parseFloat(\n `${remainder.substr(2, 2)}.${\n remainder.length > 4 ? remainder.substr(4, 2) : '0'\n }`\n );\n\n return { sign, degrees, minutes, seconds };\n };\n\n const validateBearing = (bearing: Bearing): string | null => {\n const signedDegrees =\n bearing.sign === '-' ? bearing.degrees * -1 : bearing.degrees;\n if (signedDegrees < -360 || signedDegrees > 360)\n return 'Degrees must be between -360 and 360';\n if (bearing.minutes < 0 || bearing.minutes >= 60)\n return 'Minutes must be between 0 and 59';\n if (bearing.seconds < 0 || bearing.seconds >= 60)\n return 'Seconds must be between 0 and 59';\n\n //Everything is good, setValidToSubmit truthy to submit\n //here ---\n\n return null;\n };\n\n const formatBearing = (decimalIsh: string): string => {\n const { sign, degrees, minutes, seconds } = parseBearing(decimalIsh);\n const displaySign =\n degrees === 0 && minutes === 0 && seconds === 0 ? '' : sign;\n\n return `${displaySign} ${degrees}° ${padToTwo(minutes)}' ${padToTwo(\n seconds\n )}\"`;\n };\n\n const onChange = (event: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = event.target.value;\n if (\n newValue === '' ||\n newValue === '-' ||\n newValue.match(RegExp(`^-?[0-9]+(\\\\.[0-9]{0,${maxAfterDP}})?$`))\n ) {\n props.onChange && props.onChange(event);\n } else {\n console.log('Invalid value');\n }\n };\n\n function padToTwo(number: number): string {\n return number <= 9 ? '0' + number : number.toString();\n }\n\n const parsedBearing = parseBearing(props.value);\n const internalError = validateBearing(parsedBearing);\n const error: string | null = internalError || props.validationError || null;\n const showError = error !== null;\n props.onValidate && props.onValidate(internalError);\n\n return (\n <>\n {props.label && (\n <LuiFormikFormLabel\n required={!!props.required}\n label={props.label}\n for={props.name}\n tooltip={props.tooltip}\n />\n )}\n {props.helperInfo}\n\n <div\n className={clsx('lui-margin-top-xs', showError && 'lui-input-error')}\n >\n {showError && (\n <i className=\"lui-form-status-icon material-icons-round\">error</i>\n )}\n\n <div className={'lui-bearing-input-wrapper'}>\n <input\n id={props.name}\n type=\"text\"\n disabled={props.disabled}\n {...props.inputProps}\n onChange={onChange}\n value={props.value}\n />\n <div className={'lui-bearing-display'}>\n {formatBearing(props.value || '0')}\n </div>\n </div>\n\n {showError && <p>{error}</p>}\n </div>\n </>\n );\n};\n\ninterface LuiBearingFormikInputProps {\n name: string;\n label: string;\n}\n\nexport const LuiBearingFormikInput: React.FC<\n LuiBearingFormikInputProps & LuiCommonInputProps\n> = (props) => {\n let ctx = useFormikContext();\n const [error, setError] = useState<string | null>(null);\n\n function validateBearing() {\n return error;\n }\n\n function onValidate(error: string | null): void {\n setError(error);\n }\n\n return (\n <>\n <Field name={props.name} validate={validateBearing}>\n {(renderProps: { field: any }) => {\n return (\n <LuiBearingInput\n name={props.name}\n {...renderProps.field}\n validationError={getIn(ctx?.errors, props.name)}\n required={true}\n onValidate={onValidate}\n inputProps={props.inputProps}\n />\n );\n }}\n </Field>\n </>\n );\n};\n","import React from 'react';\n\nimport lottie from 'lottie-web/build/player/lottie_light';\n\ninterface LuiLottieLightProps {\n animationData: any;\n loop: boolean;\n autoplay: boolean;\n rendererSettings: any;\n style: any;\n}\n\n/**\n * Very trivial react wrapper for Lottie-web light. Using lottie-web directly rather than with `react-lottie` or\n * `lottie-react` reduces our bundle size and enables use to use lottie-web in light mode.\n */\nexport const LuiLottieLight = ({\n animationData,\n style,\n rendererSettings,\n autoplay,\n loop,\n}: LuiLottieLightProps) => {\n const element = React.useRef<HTMLDivElement>(null);\n const lottieInstance = React.useRef<any>();\n\n React.useEffect(() => {\n if (element.current) {\n lottieInstance.current = lottie.loadAnimation({\n animationData,\n container: element.current,\n rendererSettings,\n autoplay,\n loop,\n });\n }\n }, [animationData, autoplay, loop, rendererSettings]);\n\n return <div style={style} ref={element}></div>;\n};\n","import React from 'react';\nimport loaderData from '../../animations/loader.json';\nimport loaderDataEaster from '../../animations/loader-easter.json';\nimport loaderDataChristmas from '../../animations/loader-xmas.json';\nimport { LuiLottieLight } from './LuiLottieLight';\n\n// This prevents spinners from animating and causing diffs in chromatic\nconst autoplay = !isChromatic();\n\ninterface LuiLoadingSpinnerBaseProps {\n animationData: any;\n}\n\nconst LuiLoadingSpinnerBase = (props: LuiLoadingSpinnerBaseProps) => {\n return (\n <div\n style={{\n position: 'absolute',\n top: '50%',\n left: '50%',\n zIndex: 1000,\n marginLeft: '-74px',\n marginTop: '-74px',\n }}\n data-testid=\"loading-spinner\"\n >\n <LuiLottieLight\n animationData={props.animationData}\n loop={true}\n autoplay={autoplay}\n rendererSettings={{\n preserveAspectRatio: 'xMidYMid slice',\n }}\n style={{ height: 148, width: 148 }}\n />\n </div>\n );\n};\n\n/**\n * A LuiSpinner with a status message beneath it.\n */\nexport const LuiStatusSpinner: React.FC = (props) => {\n return (\n <div className={'LuiStatusSpinner'}>\n <LuiLoadingSpinner />\n <div\n style={{\n position: 'absolute',\n top: '50%',\n left: '50%',\n marginLeft: '-150px', // half the width\n marginTop: '74px',\n }}\n >\n <div\n style={{\n textAlign: 'center',\n width: '300px',\n }}\n >\n {props.children}\n </div>\n </div>\n </div>\n );\n};\n\ninterface LuiMiniSpinnerProps {\n size: number;\n // To allow data-testid, onClick, etc\n divProps?: any;\n}\nexport const LuiMiniSpinner = (props: LuiMiniSpinnerProps) => {\n return (\n <div {...props.divProps}>\n <LuiLottieLight\n animationData={loaderData}\n loop={true}\n autoplay={autoplay}\n rendererSettings={{\n preserveAspectRatio: 'xMidYMid slice',\n }}\n style={{ height: props.size, width: props.size }}\n />\n </div>\n );\n};\n\nexport const LuiLoadingSpinner = () => {\n return <LuiLoadingSpinnerBase animationData={loaderData} />;\n};\nexport const LuiLoadingSpinnerEaster = () => {\n return <LuiLoadingSpinnerBase animationData={loaderDataEaster} />;\n};\nexport const LuiLoadingSpinnerChristmas = () => {\n return <LuiLoadingSpinnerBase animationData={loaderDataChristmas} />;\n};\n\n// this function was extracted from chromatic/isChromatic. It was causing TS issues for the consumer\nexport function isChromatic(): boolean {\n return !!(\n window?.navigator.userAgent.match(/Chromatic/) ||\n window?.location.href.match(/chromatic=true/)\n );\n}\n","import React, { forwardRef } from 'react';\nimport Select, { GroupBase, Props, SelectInstance } from 'react-select';\nimport { LuiMiniSpinner } from '../../LuiLoadingSpinner/LuiLoadingSpinner';\nimport colors from '../../../scss/Foundation/Variables/ColorVars.scss';\nimport clsx from 'clsx';\nimport { useGenerateOrDefaultId } from '../../LuiFormElements/LuiTextInput/LuiTextInput';\nimport CreatableSelect from 'react-select/creatable';\nimport { LuiIcon } from '../../LuiIcon/LuiIcon';\n\nexport type LuiComboSelectProps<\n Option extends LuiComboSelectOption = LuiComboSelectOption,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>\n> = Partial<Props<Option, IsMulti, Group>> & {\n label: JSX.Element | string;\n hideLabel?: boolean;\n isCreateable?: boolean;\n error?: string;\n};\n\nexport type LuiComboSelectOption = {\n label: string;\n value: string;\n};\n\n/**\n * A wrapper around React Select with Lui styling\n */\nexport const LuiComboSelect = forwardRef(LuiComboSelectActual);\n\n// declare the indicator in here so it gets the types from\n// the function declaration\nconst LuiLoadingIndicator = () => <LuiMiniSpinner size={25} />;\n\nfunction LuiComboSelectActual<\n Option extends LuiComboSelectOption = LuiComboSelectOption,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>\n>(\n givenProps: LuiComboSelectProps<Option, IsMulti, Group>,\n ref: React.Ref<SelectInstance<Option, IsMulti, Group>> | null\n): JSX.Element {\n const props: LuiComboSelectProps<Option, IsMulti, Group> = Object.assign(\n {\n noOptionsMessage: (i: { inputValue: string }) =>\n `No options found containing '${i.inputValue}'`,\n },\n givenProps\n );\n props.components = {\n LoadingIndicator: LuiLoadingIndicator,\n ...props.components,\n };\n // box-shadow: \"-8px 0px 0 0 #cc0000\";\n // border-radius: \"4px\";\n const id = useGenerateOrDefaultId(props?.id);\n const selectProp: Partial<Props<Option, IsMulti, Group>> = {\n inputId: id,\n ...props,\n classNamePrefix: 'LuiComboSelect',\n theme: (theme) => ({\n ...theme,\n colors: {\n ...theme.colors,\n primary: colors['color-blue-75'],\n primary75: colors['color-blue-50'],\n primary50: colors['color-blue-25'],\n primary25: colors['color-blue-05'],\n neutral90: colors['grey-80'],\n neutral80: colors['grey-80'],\n neutral70: colors['grey-80'],\n neutral60: colors['grey-60'],\n neutral50: colors['grey-60'],\n neutral40: colors['$gray'],\n neutral30: colors['$gray'],\n neutral20: colors['grey-20'],\n neutral10: colors['grey-10'],\n neutral5: colors['grey-05'],\n danger: colors['error'],\n dangerLight: colors['error-bg'],\n },\n }),\n styles: {\n control: (provided, state) => ({\n ...provided,\n /* matches style of .LuiTextInput-input */\n border: state.isFocused ? '1px solid #053d52' : '1px solid #b2b2b2',\n '&:hover, &:active': {\n borderColor: '#053d52',\n },\n }),\n indicatorSeparator: (provided) => ({\n ...provided,\n width: 0,\n }),\n input: (provided) => ({\n ...provided,\n height: '40px',\n minHeight: '40px',\n fontWeight: 400,\n input: {\n height: '38px !important',\n },\n }),\n singleValue: (provided) => ({\n ...provided,\n color: '#414042',\n fontWeight: 400,\n }),\n placeholder: (provided) => ({\n ...provided,\n /* please keep this in sync with FormVars.scss/mixin.formPlaceholder */\n fontWeight: 'normal',\n fontStyle: 'italic',\n color: colors['input-placeholder'],\n }),\n option: (provided, { isSelected }) => ({\n ...provided,\n color: colors['input-text'],\n backgroundColor: isSelected ? colors['selection'] : colors['white'],\n }),\n },\n };\n\n return (\n <label\n htmlFor={id}\n className={clsx('LuiComboSelect-label', props.error && 'hasError')}\n >\n <span\n className={clsx(\n 'LuiSelect-label-text',\n props.hideLabel ? 'LuiScreenReadersOnly' : ''\n )}\n >\n {props.label}\n </span>\n {props.isCreateable ? (\n <CreatableSelect\n formatCreateLabel={(inputValue) => inputValue}\n createOptionPosition=\"first\"\n ref={ref}\n {...selectProp}\n />\n ) : (\n <Select ref={ref} {...selectProp} />\n )}\n {/* Error message */}\n {props.error && (\n <span className=\"LuiComboSelect-error\">\n <LuiIcon\n alt={'Error'}\n name=\"ic_error\"\n className=\"LuiComboSelect-error-icon\"\n size=\"sm\"\n status=\"error\"\n />\n {props.error}\n </span>\n )}\n </label>\n );\n}\n","import clsx from 'clsx';\nimport React from 'react';\n\nexport const LuiShadow = (props: {\n children: React.ReactNode;\n className?: string;\n}): JSX.Element => {\n return (\n <div className={clsx('LuiShadow', props.className)}>{props.children}</div>\n );\n};\n","import React, { ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { LuiIcon } from '../../../LuiIcon/LuiIcon';\n\ninterface IHelpInfoProps {\n info: string | ReactNode;\n}\n\nexport const HelpInfo: React.FC<IHelpInfoProps> = (props: IHelpInfoProps) => (\n <div className={clsx('lui-small', 'HelpInfo')}>\n <LuiIcon\n name=\"ic_error_outline\"\n className={'HelpInfo-icon'}\n size=\"sm\"\n alt=\"Extra Information\"\n />\n <div className={'HelpInfo-info'}>{props.info}</div>\n </div>\n);\n","import { ClassDictionary } from 'clsx';\n\nexport type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport type Range = {\n from?: Size;\n upto?: Size;\n};\n\nconst sizes: Size[] = ['xs', 'sm', 'md', 'lg', 'xl'];\n\nexport const buildHideClassDict = ({\n from = 'xs',\n upto = 'xl',\n}: Range): ClassDictionary => {\n const inRange = (size: Size): boolean => {\n const idx = sizes.indexOf(size);\n return idx >= sizes.indexOf(from) && idx <= sizes.indexOf(upto);\n };\n return {\n 'lui-hide-xs': inRange('xs'),\n 'lui-hide-sm': inRange('sm'),\n 'lui-hide-md': inRange('md'),\n 'lui-hide-lg': inRange('lg'),\n 'lui-hide-xl': inRange('xl'),\n };\n};\n","import React, {\n createContext,\n forwardRef,\n PropsWithChildren,\n ReactElement,\n useContext,\n} from 'react';\nimport logo from '../../assets/images/linz-logo-col-n-white-txt.svg';\nimport motif from '../../assets/images/linz-motif.svg';\nimport clsx from 'clsx';\nimport { useEscapeFunction, usePageClickFunction } from '../common/Hooks';\nimport { buildHideClassDict, Range } from '../common/ResponsiveUtils';\n\ntype HeaderSize = 'normal' | 'small';\n\ninterface HeaderProps {\n headingText?: string;\n size?: HeaderSize;\n /** The URL or path that the LINZ logo will link to. If unset, the logo will not be a link. */\n homeLink?: string | (() => void);\n transparent?: boolean;\n sticky?: boolean;\n}\n\nconst LuiHeader: React.FC<HeaderProps> = ({\n headingText,\n size = 'small',\n homeLink,\n transparent,\n children,\n sticky = true,\n}) => {\n const logoElement =\n size === 'normal' ? (\n <img className=\"linz-logo\" alt=\"LINZ Logo\" src={logo} />\n ) : (\n <img className=\"linz-motif\" alt=\"LINZ Logo\" src={motif} />\n );\n\n let logoContainer: JSX.Element = logoElement;\n if (typeof homeLink === 'string') {\n logoContainer = <a href={homeLink}>{logoElement}</a>;\n } else if (typeof homeLink === 'function') {\n logoContainer = (\n <div\n className=\"clickable\"\n onClick={() => {\n homeLink();\n }}\n >\n {logoElement}\n </div>\n );\n }\n\n return (\n <header\n className={clsx({\n 'lui-header': true,\n 'lui-header-transparent': transparent,\n 'lui-header-small': size === 'small',\n 'lui-header-sticky': sticky,\n })}\n >\n <div className=\"lui-header-row\">\n <div className=\"lui-header-col\">\n <div className=\"lui-header-logo\">{logoContainer}</div>\n {headingText && (\n <div className=\"lui-header-title\">\n <h1>{headingText}</h1>\n </div>\n )}\n </div>\n <div className=\"lui-header-col\">{children}</div>\n </div>\n </header>\n );\n};\n\ninterface ILuiIcon {\n /**\n * The material-ui icon name (see https://material.io/resources/icons/?search=account_c&style=round)\n */\n icon?: string;\n\n /**\n * Hides the menu item on screens specified\n */\n hide?: Range;\n}\n\ninterface ILuiHeaderMenuItem extends ILuiIcon {\n /**\n * The label that will show up beside (right) the icon, if not specified then it won't show up\n */\n label?: string | ReactElement;\n\n /**\n * The string that will show up as a notification badge which will show up at the upper right corner of the icon.\n */\n badge?: string;\n\n /**\n * The callback handler to be registered which will be called when menu item is clicked.\n */\n onClick?: () => void;\n\n /**\n * The test id used to reference the html element which is bound to the onClick function.\n */\n 'data-testid'?: string;\n}\n\n/**\n * The \\`LuiHeaderMenuItem\\` is the base component for all menu items that are to be shown in the header.\n * Note that it depends on it being rendered inside a LuiHeader for its styles to apply properly.\n * To configure the item for responsiveness, ensure to set any of the hideOn* properties.\n */\nconst LuiHeaderMenuItem = forwardRef<\n HTMLDivElement,\n PropsWithChildren<ILuiHeaderMenuItem>\n>(\n (\n {\n icon,\n label,\n badge,\n hide,\n onClick,\n 'data-testid': dataTestId = 'menu-item',\n children,\n },\n ref\n ) => {\n const menuItemClasses = clsx(\n 'lui-header-menu-item',\n hide && buildHideClassDict(hide)\n );\n const resolvedIcon = !icon && !label ? 'menu' : icon;\n return (\n <div className={menuItemClasses} ref={ref}>\n <div\n className={clsx('lui-header-menu-icon', onClick && 'clickable')}\n onClick={onClick}\n data-testid={dataTestId}\n >\n {resolvedIcon && (\n <i className=\"material-icons-round md-36\">{resolvedIcon}</i>\n )}\n {label && <div className=\"lui-menu-label\">{label}</div>}\n {badge && <div className=\"badge\">{badge}</div>}\n </div>\n {children}\n </div>\n );\n }\n);\n\ninterface ILuiCloseableHeaderMenuContext {\n isOpen: () => boolean;\n open: () => void;\n close: () => void;\n}\n\nconst LuiCloseableHeaderMenuContext = createContext<ILuiCloseableHeaderMenuContext>(\n {\n isOpen: () => false,\n open: () => {},\n close: () => {},\n }\n);\n\ninterface ILuiCloseableHeaderMenuItem\n extends Omit<ILuiHeaderMenuItem, 'onClick'> {\n open: boolean;\n setOpen: (value: boolean) => void;\n}\n\nconst LuiCloseableHeaderMenuItem: React.FC<ILuiCloseableHeaderMenuItem> = ({\n open,\n setOpen,\n ...props\n}) => {\n useEscapeFunction(() => setOpen(false));\n const menuDiv = usePageClickFunction<HTMLDivElement>(\n (event) => open || event.stopPropagation(),\n (event) => {\n if (!open) {\n event.stopPropagation();\n setOpen(false);\n }\n }\n );\n const menuControls = {\n isOpen: () => open,\n open: () => setOpen(true),\n close: () => setOpen(false),\n };\n const menuItemProps = { onClick: () => menuControls.open(), ...props };\n return (\n <LuiCloseableHeaderMenuContext.Provider value={menuControls}>\n <LuiHeaderMenuItem ref={menuDiv} {...menuItemProps}>\n {props.children}\n </LuiHeaderMenuItem>\n </LuiCloseableHeaderMenuContext.Provider>\n );\n};\n\ninterface ILuiMenuCloseButton extends ILuiIcon {\n 'data-testid'?: string;\n}\n\nconst LuiMenuCloseButton: React.FC<ILuiMenuCloseButton> = ({\n icon = 'close',\n hide,\n 'data-testid': dataTestId = 'close-button',\n}) => {\n const menu = useContext(LuiCloseableHeaderMenuContext);\n const classes = clsx(\n 'material-icons-round',\n 'lui-menu-close-button',\n hide && buildHideClassDict(hide)\n );\n return (\n <i className={classes} onClick={menu.close} data-testid={dataTestId}>\n {icon}\n </i>\n );\n};\n\nexport {\n HeaderSize,\n HeaderProps,\n LuiHeader,\n ILuiIcon,\n ILuiHeaderMenuItem,\n LuiHeaderMenuItem,\n ILuiMenuCloseButton,\n LuiMenuCloseButton,\n ILuiCloseableHeaderMenuItem,\n LuiCloseableHeaderMenuItem,\n LuiCloseableHeaderMenuContext,\n};\n","import { useCallback, useEffect, useRef } from 'react';\n\n/**\n * A hook which allows you to register a handler when the escape key is pressed\n *\n * @param onEscape the handler function\n */\nexport const useEscapeFunction = (onEscape: () => void) => {\n const escFunction = useCallback(\n (event) => {\n if (event.keyCode === 27) {\n onEscape();\n }\n },\n [onEscape]\n );\n useEffect(() => {\n document.addEventListener('keydown', escFunction, false);\n return () => {\n document.removeEventListener('keydown', escFunction, false);\n };\n }, [escFunction]);\n};\n\n/**\n * A hook which allows handling of click event anywhere on the page.\n * Provides a way of handling clicks done inside or outside the element bound to the returned react ref.\n *\n * @param onClickInsideArg handler for mouse clicks inside the element\n * @param onClickOutsideArg handler for mouse clicks outside the element\n * @return a react ref which can be bound to an html element\n */\nexport const usePageClickFunction = <H extends Element>(\n onClickInsideArg: (event: MouseEvent) => void,\n onClickOutsideArg: (event: MouseEvent) => void\n) => {\n const elementRef = useRef<H>(null);\n const onClickInside = useCallback(onClickInsideArg, []);\n const onClickOutside = useCallback(onClickOutsideArg, []);\n useEffect(() => {\n const handleClick = (e: Event) => {\n if (elementRef.current?.contains(e.target as Node)) {\n onClickInside(e as MouseEvent);\n } else {\n onClickOutside(e as MouseEvent);\n }\n };\n\n // add when mounted\n document.addEventListener('click', handleClick);\n // return function to be called when unmounted\n return () => {\n document.removeEventListener('click', handleClick);\n };\n }, [elementRef, onClickInside, onClickOutside]);\n return elementRef;\n};\n","import React, {\n ReactElement,\n ReactNode,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport {\n ILuiHeaderMenuItem,\n ILuiIcon,\n LuiCloseableHeaderMenuContext,\n LuiCloseableHeaderMenuItem,\n} from '../LuiHeader/LuiHeader';\nimport clsx from 'clsx';\nimport { LuiExpandableBanner } from '../LuiExpandableBanner/LuiExpandableBanner';\n\ninterface ILuiDrawerMenuOption {\n /**\n * The material-ui icon name (see https://material.io/resources/icons/?search=account_c&style=round)\n */\n icon?: string | ReactElement;\n\n /**\n * The label shown beside the icon which is aligned at the left of the drawer\n */\n label: string;\n\n /**\n * The badge which is shown which is aligned at the right of the drawer\n */\n badge?: ReactElement;\n\n /**\n * The function to be bound together with closing the drawer on click\n */\n onClick?: () => void;\n}\n\nconst LuiDrawerMenuOptions: React.FC<ILuiIcon> = ({ children }) => (\n <div className=\"lui-menu-drawer-options\">{children}</div>\n);\n\nconst LuiDrawerMenuOption: React.FC<ILuiDrawerMenuOption> = ({\n icon,\n label,\n badge,\n onClick = () => {},\n}) => {\n const menu = useContext(LuiCloseableHeaderMenuContext);\n return (\n <div\n className=\"lui-menu-drawer-option\"\n onClick={() => {\n menu.close();\n onClick();\n }}\n data-testid={'drawer-option'}\n >\n <div className=\"lui-menu-drawer-option-label\">\n {typeof icon === 'string' ? (\n <i\n className=\"material-icons-round\"\n data-testid={'drawer-option-icon'}\n >\n {icon}\n </i>\n ) : (\n icon\n )}\n {label}\n </div>\n {badge}\n </div>\n );\n};\n\ntype ILuiDrawerMenu = Omit<ILuiHeaderMenuItem, 'onClick'> & {\n hasStickyHeader?: boolean;\n};\n\nconst LuiDrawerMenu: React.FC<ILuiDrawerMenu> = ({ ...restOfProps }) => {\n const { children, hasStickyHeader = true, ...menuPropsCopy } = restOfProps;\n const [open, setOpen] = useState(false);\n const closeableMenuProps = {\n ...menuPropsCopy,\n open,\n setOpen,\n icon: open ? 'close' : 'menu',\n onClick: () => setOpen(!open),\n };\n\n useEffect(() => {\n // Support for non-sticky headers. Scroll back to top when menu is opened\n if (open && !hasStickyHeader) {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n }\n // Disable page scrolling while menu is open\n if (open) {\n document.body.classList.add('lui-menu-drawer-open');\n } else {\n document.body.classList.remove('lui-menu-drawer-open');\n }\n }, [open, hasStickyHeader]);\n\n return (\n <LuiCloseableHeaderMenuItem {...closeableMenuProps}>\n <div\n className={clsx({\n 'lui-menu-drawer': true,\n 'lui-menu-drawer-closed': !open,\n })}\n data-testid={'drawer'}\n aria-hidden={!open}\n >\n {children}\n </div>\n </LuiCloseableHeaderMenuItem>\n );\n};\n\ntype ILuiDropdownMenu = Omit<ILuiHeaderMenuItem, 'onClick'>;\n\nconst LuiDropdownMenu: React.FC<ILuiDropdownMenu> = ({ ...restOfProps }) => {\n const { children, ...menuPropsCopy } = restOfProps;\n const [open, setOpen] = useState(false);\n const closeableMenuProps = { ...menuPropsCopy, open, setOpen };\n\n return (\n <LuiCloseableHeaderMenuItem {...closeableMenuProps}>\n <div\n className={clsx({\n 'lui-menu-dropdown lui-box-shadow': true,\n 'lui-menu-dropdown-closed': !open,\n })}\n data-testid={'dropdown'}\n aria-hidden={!open}\n >\n {children}{' '}\n </div>\n </LuiCloseableHeaderMenuItem>\n );\n};\n\ninterface ILuiDrawerMenuSection {\n /**\n * Optional tile, displays a header if set\n */\n title?: string;\n collapsible?: boolean;\n children: ReactNode;\n}\n\nconst LuiDrawerMenuSection = (props: ILuiDrawerMenuSection): JSX.Element => {\n const { children, title, collapsible } = props;\n return (\n <div>\n {collapsible && (\n <LuiExpandableBanner\n label={title || ''}\n className=\"LuiDrawerMenuSection-header\"\n >\n {children}\n </LuiExpandableBanner>\n )}\n {!collapsible && (\n <>\n {title && (\n <div className=\"LuiDrawerMenuSection-header\">\n <div\n className={'lui-expand-header'}\n style={{ cursor: 'default' }}\n >\n <h3>{title}</h3>\n </div>\n </div>\n )}\n {children}\n </>\n )}\n </div>\n );\n};\n\nconst LuiDrawerMenuDivider = (): JSX.Element => {\n return <hr className=\"LuiDrawerMenuDivider\" />;\n};\n\nexport {\n ILuiDrawerMenu,\n LuiDrawerMenu,\n LuiDrawerMenuOptions,\n ILuiDrawerMenuOption,\n LuiDrawerMenuOption,\n ILuiDropdownMenu,\n LuiDropdownMenu,\n ILuiDrawerMenuSection,\n LuiDrawerMenuSection,\n LuiDrawerMenuDivider,\n};\n","import React, { useEffect, useRef, useCallback } from 'react';\nimport Modal from 'react-modal';\nimport clsx from 'clsx';\nimport { getMaterialIconForLevel } from '../LuiBanner/LuiBanner';\n\ninterface ILuiModal {\n key?: string;\n shouldCloseOnOverlayClick?: boolean;\n onClose?: () => void;\n className?: string;\n maxWidth?: boolean;\n headingText?: string;\n lowContrast?: boolean;\n appendToElement?: () => HTMLElement;\n}\n\nexport const LuiModal: React.FC<ILuiModal> = (props) => {\n const node = useRef(null);\n\n const handleClickOutside = useCallback(\n (e: any) => {\n // current DOES have a contains!\n if (node?.current && (node.current as any).contains(e.target)) {\n // inside click\n return;\n }\n // outside click\n if (props.shouldCloseOnOverlayClick) {\n props.onClose && props.onClose();\n }\n },\n [props]\n );\n\n useEffect(() => {\n document.addEventListener('mousedown', handleClickOutside);\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [handleClickOutside]);\n\n let isTest = false;\n\n // this is here for the tests\n if (process !== undefined) {\n isTest = process?.env?.NODE_ENV === 'test';\n if (!isTest) {\n Modal.setAppElement('#root');\n }\n }\n\n return (\n <Modal\n key={props.key}\n isOpen={true}\n shouldCloseOnOverlayClick={props.shouldCloseOnOverlayClick}\n onRequestClose={props.onClose}\n overlayClassName=\"modal\"\n className={props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim'}\n ariaHideApp={!isTest} // required to prevent warnings that are not applicable in real usage\n // By default, the modal portal will be appended to the document's body, but we might need to append it\n // to another element. For that the React Modal parentSelector prop is used.\n {...(props.appendToElement && {\n parentSelector: props.appendToElement,\n })}\n >\n <div\n ref={node}\n className={clsx(\n 'lui-modal lui-box-shadow',\n props.maxWidth && 'lui-max-width',\n props.headingText && 'lui-modal-no-padding',\n props.className\n )}\n >\n {props.headingText && (\n <LuiModalHeader\n headingText={props.headingText}\n onClose={props.onClose}\n />\n )}\n <div className={clsx(props.headingText && 'lui-modal-container')}>\n {props.children}\n </div>\n </div>\n </Modal>\n );\n};\n\nexport const LuiAlertModal: React.FC<\n { level: 'success' | 'info' | 'warning' | 'error' } & ILuiModal\n> = (props) => {\n let materialIcon = getMaterialIconForLevel(props.level);\n return (\n <LuiModal\n key={props.key}\n shouldCloseOnOverlayClick={props.shouldCloseOnOverlayClick}\n onClose={props.onClose}\n className={clsx(`lui-modal-${props.level}`, props.className)}\n appendToElement={props.appendToElement}\n >\n <i className=\"lui-msg-status-icon material-icons-round\">{materialIcon}</i>\n {props.children}\n </LuiModal>\n );\n};\n\nexport const LuiAlertModalButtons: React.FC = (props) => {\n return <div className=\"modal-btn-row\">{props.children}</div>;\n};\n\ninterface IModalHeader {\n headingText?: string;\n onClose?: () => void;\n}\n\nexport const LuiModalHeader: React.FC<IModalHeader> = (props) => {\n return (\n <header className=\"lui-modal-header\">\n {props.headingText && (\n <div className=\"lui-modal-header-title\">\n <h1>{props.headingText}</h1>\n {props.onClose && (\n <button\n className=\"lui-modal-header-close-btn\"\n onClick={props.onClose}\n >\n <i className=\"material-icons-round lui-modal-header-btn-size\">\n close\n </i>\n </button>\n )}\n </div>\n )}\n </header>\n );\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","import React, { useCallback, useContext, useEffect, useState } from 'react';\nimport { LuiLoadingSpinner } from '../../LuiLoadingSpinner/LuiLoadingSpinner';\nimport { useQuery } from 'react-query';\nimport { userHasAnyPrivilege, userIsInternal } from './LOLUserContextSupport';\n\ninterface IUserContext {\n user: IUser | undefined;\n selectedFirm: IFirm | undefined;\n changeFirm: (firmId: string) => void;\n isInternal: () => boolean;\n hasAnyPrivilege: (privileges: string[]) => boolean;\n}\n\nfunction useLOLUserContext() {\n return useContext(LOLUserContext);\n}\n\nconst LOLUserContext = React.createContext<IUserContext>({\n user: undefined,\n selectedFirm: undefined,\n changeFirm: (firmId: string) => {\n console.error('Called changeFirm before UserContext loaded', firmId);\n },\n isInternal: () => false,\n hasAnyPrivilege: () => false,\n});\n\nfunction LOLUserContextProvider(props: { children: React.ReactNode }) {\n const { isLoading, data, isError } = useGetUserInfo();\n const [selectedFirm, setSelectedFirm] = useState<IFirm>();\n const [ready, setReady] = useState<boolean>(false);\n\n useEffect(() => {\n // User data is still loading\n if (!data?.user) {\n return;\n }\n\n // Clear firm value if there are no firms\n if (data.user.firms.length === 0) {\n setSelectedFirmCache(null, null);\n setReady(true);\n return;\n }\n\n if (\n data.user.firms.length > 0 &&\n (!getSelectedFirmIdCache() ||\n !data.user.firms.find((firm) => firm.id === getSelectedFirmIdCache()))\n ) {\n const firstFirm = data.user.firms[0];\n\n setSelectedFirmCache(firstFirm.id, firstFirm.name);\n setSelectedFirm(firstFirm);\n setReady(true);\n } else {\n // pull firm from cache and use it\n const selectedFirmIdFromCache = getSelectedFirmIdCache();\n const selectedFirmDerivedFromCache = data.user.firms.find(\n (firm) => firm.id === selectedFirmIdFromCache\n );\n setSelectedFirm(selectedFirmDerivedFromCache || undefined);\n setReady(true);\n }\n }, [data]);\n\n const changeFirm = useCallback(\n (firmId: string) => {\n const firm = data?.user?.firms.find((f) => {\n return f.id === firmId;\n });\n\n if (firm === undefined) {\n // tslint:disable-next-line: no-console\n console.error('Looks like firm not in userContext');\n return;\n }\n setSelectedFirmCache(firm.id, firm.name);\n setSelectedFirm(firm);\n },\n [data]\n );\n\n const isInternal = useCallback(() => userIsInternal(data?.user), [data]);\n\n const hasAnyPrivilege = useCallback(\n (privileges: string[]): boolean =>\n userHasAnyPrivilege(privileges, selectedFirm),\n [selectedFirm]\n );\n\n useEffect(() => {\n const onCachedFirmUpdate = (event: StorageEvent) => {\n if (event.storageArea === localStorage && event.key === FIRM_KEY) {\n const selectedFirmId = event.newValue;\n if (selectedFirmId) {\n changeFirm(selectedFirmId);\n }\n }\n };\n\n if (ready) {\n // this only triggers if changed from another tab\n window.addEventListener('storage', onCachedFirmUpdate, false);\n }\n\n // cleanup listener on unmount\n return () => {\n window.removeEventListener('storage', onCachedFirmUpdate, false);\n };\n }, [ready, changeFirm]);\n\n if (isLoading || !ready) {\n return <LuiLoadingSpinner data-testid=\"usercontext-loading-spinner\" />;\n }\n\n if (isError) {\n reAuthUser();\n return <LuiLoadingSpinner data-testid=\"usercontext-error-spinner\" />;\n }\n\n if (data && data.user && data.user.id) {\n return (\n <LOLUserContext.Provider\n value={{\n user: data.user,\n selectedFirm,\n changeFirm,\n isInternal,\n hasAnyPrivilege,\n }}\n >\n {props.children}\n </LOLUserContext.Provider>\n );\n } else {\n reAuthUser();\n return <LuiLoadingSpinner data-testid=\"usercontext-spinner\" />;\n }\n}\n\nfunction useGetUserInfo() {\n return useQuery<IUserResponse, string>(`useGetUserInfo`, async () => {\n const url = `/auth/api/userinfo`;\n const res = await fetch(url);\n\n await checkForStandardErrors(res);\n\n return await res.json();\n });\n}\n\nfunction reAuthUser() {\n const redirectPath = `${window.location.pathname}${window.location.search}${window.location.hash}`;\n window.location.assign(\n `/auth/login?redirectPath=${encodeURIComponent(redirectPath)}`\n );\n}\n\nasync function checkForStandardErrors(res: Response) {\n if (res.status !== 200) {\n reAuthUser();\n }\n}\n\ninterface IUserResponse {\n user: IUser | null;\n}\n\ninterface IUser {\n id: string;\n idHash: string;\n givenNames: string;\n surname: string;\n email: string;\n preferredName: string;\n firms: IFirm[];\n loginType: string;\n roles: string[];\n passwordChangeRequired: boolean;\n lastLogin?: string;\n}\n\ninterface IFirm {\n id: string;\n name: string;\n privileges: Array<string>;\n}\n\nconst FIRM_KEY = 'firmId';\nconst FIRM_NAME_KEY = 'firmName';\n\nfunction getSelectedFirmIdCache(): string | null {\n return window.localStorage.getItem(FIRM_KEY);\n}\n\nfunction setSelectedFirmCache(firmId: string | null, firmName: string | null) {\n if (firmId == null || firmName == null) {\n window.localStorage.removeItem(FIRM_KEY);\n window.localStorage.removeItem(FIRM_NAME_KEY);\n } else {\n window.localStorage.setItem(FIRM_KEY, firmId);\n window.localStorage.setItem(FIRM_NAME_KEY, firmName);\n }\n}\n\nexport {\n IUserResponse,\n LOLUserContext,\n IUser,\n IFirm,\n IUserContext,\n useLOLUserContext,\n LOLUserContextProvider,\n FIRM_KEY,\n FIRM_NAME_KEY,\n};\n","import React, { useState } from 'react';\n\nexport interface IFilterProperties<T> {\n showFilter?: boolean;\n filterFunction: (input: string) => T[];\n renderFunction: (filteredOptions: T[]) => JSX.Element;\n}\n\n/**\n * Filters options and forwards to internal render function.\n * has option for minimum elements to filter\n * @param props\n * @constructor\n */\nexport const LuiFilterContainer = (\n props: IFilterProperties<any>\n): JSX.Element => {\n const { renderFunction, filterFunction, showFilter = true } = props;\n const [filter, setFilter] = useState('');\n\n return (\n <div>\n {showFilter && (\n <div\n className={'LuiFilterContainer-filter-container LuiDeprecatedForms'}\n >\n <input\n type=\"text\"\n placeholder=\"Type to filter\"\n value={filter}\n onChange={(e) => setFilter(e.target.value)}\n />\n </div>\n )}\n {renderFunction(filterFunction(filter))}\n </div>\n );\n};\n","import React, { useCallback, useContext, useEffect, useState } from 'react';\nimport { useLOLUserContext } from './LOLUserContext';\n\nexport interface IGlobalClientRefContext {\n clientRef: string;\n changeClientRef: (ref: string) => void;\n}\n\nexport function useLOLGlobalClientRefContext(): IGlobalClientRefContext {\n return useContext(LOLGlobalClientRefContext);\n}\n\nexport const LOLGlobalClientRefContext = React.createContext<IGlobalClientRefContext>(\n {\n clientRef: '',\n changeClientRef: () => {\n // no-op\n },\n }\n);\n\ninterface LOLGlobalClientRefContextProviderProperties {\n /**\n * If there is no client reference set in the session and this is true, default it to the user id.\n */\n useUserIdAsClientReference?: boolean;\n children: React.ReactNode;\n}\n\nexport const LOLGlobalClientRefContextProvider = (\n props: LOLGlobalClientRefContextProviderProperties\n) => {\n const { useUserIdAsClientReference } = props;\n const { user, selectedFirm } = useLOLUserContext();\n const [clientRef, setClientRef] = useState<string>('');\n const [lastSelectedFirmId, setLastSelectedFirmId] = useState<\n string | undefined\n >(undefined);\n\n const changeClientRef = useCallback((clientRef: string) => {\n setClientRef(clientRef);\n setGlobalClientRefCache(clientRef);\n }, []);\n\n useEffect(() => {\n window.addEventListener('beforeunload', () => {\n setGlobalClientRefCache(null);\n });\n }, []);\n\n useEffect(() => {\n if (!user) {\n return;\n }\n\n const cachedClientRef = getGlobalClientRefCache();\n let clientRef: string = '';\n if (cachedClientRef === null && useUserIdAsClientReference) {\n clientRef = user.id;\n } else if (cachedClientRef !== null) {\n clientRef = cachedClientRef;\n }\n setClientRef(clientRef);\n setGlobalClientRefCache(clientRef);\n setLastSelectedFirmId(selectedFirm?.id);\n }, [user, selectedFirm, useUserIdAsClientReference]);\n\n useEffect(() => {\n if (\n !selectedFirm ||\n !lastSelectedFirmId ||\n selectedFirm.id === lastSelectedFirmId\n ) {\n return;\n }\n\n // Reset client reference when changing firm\n changeClientRef(useUserIdAsClientReference ? user!.id : '');\n setLastSelectedFirmId(selectedFirm.id);\n }, [\n user,\n selectedFirm,\n lastSelectedFirmId,\n changeClientRef,\n useUserIdAsClientReference,\n ]);\n\n return (\n <LOLGlobalClientRefContext.Provider\n value={{\n clientRef,\n changeClientRef,\n }}\n >\n {props.children}\n </LOLGlobalClientRefContext.Provider>\n );\n};\n\nexport const GLOBAL_CLIENT_REFERENCE_KEY = 'globalClientReference';\n\nexport function getGlobalClientRefCache(): string | null {\n return window.sessionStorage.getItem(GLOBAL_CLIENT_REFERENCE_KEY);\n}\n\nexport function setGlobalClientRefCache(clientReference: string | null) {\n if (clientReference === null) {\n window.sessionStorage.removeItem(GLOBAL_CLIENT_REFERENCE_KEY);\n } else {\n window.sessionStorage.setItem(GLOBAL_CLIENT_REFERENCE_KEY, clientReference);\n }\n}\n","import React, { useCallback, useState } from 'react';\nimport { LuiHeaderMenuItem } from '../LuiHeader/LuiHeader';\nimport { IFirm, useLOLUserContext } from './contexts/LOLUserContext';\nimport {\n ILuiDropdownMenu,\n LuiDrawerMenuSection,\n LuiDropdownMenu,\n} from '../LuiHeaderMenu/LuiHeaderMenus';\nimport { LuiFilterContainer } from '../LuiFilterContainer/LuiFilterContainer';\nimport { useLOLGlobalClientRefContext } from './contexts/LOLGlobalClientRefContext';\n\nexport type ILOLFirmSwitcherMenu = Omit<ILuiDropdownMenu, 'icon' | 'label'> & {\n showClientRef?: boolean;\n};\n\nexport const LOLFirmSwitcherMenu: React.FC<ILOLFirmSwitcherMenu> = ({\n showClientRef = false,\n ...restOfProps\n}) => {\n const { user, selectedFirm, changeFirm, isInternal } = useLOLUserContext();\n const { clientRef } = useLOLGlobalClientRefContext();\n const firms = user!.firms;\n\n const clientRefElement = showClientRef ? (\n <>\n <br />\n <span>Client Ref: {clientRef}</span>\n </>\n ) : null;\n\n const label = isInternal() ? (\n <div className=\"LOLFirmSwitcherMenu-header\">\n {user!.id}\n {clientRefElement}\n </div>\n ) : (\n <div className=\"LOLFirmSwitcherMenu-header\">\n {selectedFirm && (\n <>\n <span>{selectedFirm!.name}</span>\n <br />\n </>\n )}\n <span>User ID: {user!.id}</span>\n {clientRefElement}\n </div>\n );\n\n const dropdownMenuProps = {\n ...restOfProps,\n label,\n };\n\n if (firms.length < 2) {\n return <LuiHeaderMenuItem {...dropdownMenuProps} />;\n }\n\n return (\n <LuiDropdownMenu {...dropdownMenuProps}>\n <LOLFirmSwitcherMenuContent\n firms={firms}\n selectedFirm={selectedFirm}\n changeFirm={changeFirm}\n />\n </LuiDropdownMenu>\n );\n};\n\ninterface ILOLFirmSwitcherMenuContent {\n firms: IFirm[];\n selectedFirm: IFirm | undefined;\n changeFirm: (firmId: string) => void;\n collapsible?: boolean;\n minimumFilterCount?: number;\n}\n\nexport const LOLFirmSwitcherMenuContent: React.FC<ILOLFirmSwitcherMenuContent> = ({\n firms,\n selectedFirm,\n changeFirm,\n collapsible = false,\n minimumFilterCount = 5,\n}) => {\n const showFilter = firms.length >= minimumFilterCount;\n\n return (\n <LuiDrawerMenuSection\n title=\"Switch account\"\n collapsible={collapsible && showFilter}\n >\n <FirmSwitcher\n options={firms}\n selectedId={selectedFirm?.id}\n onSelect={async (id) => changeFirm(id)}\n showFilter={showFilter}\n />\n </LuiDrawerMenuSection>\n );\n};\n\ninterface IFirmOption {\n value: IFirm;\n selected: boolean;\n onSelect: (optionId: string) => void;\n disabled: boolean;\n}\n\nexport const FirmOption: React.FC<IFirmOption> = ({\n value: { id, name },\n onSelect,\n selected,\n disabled,\n}) => {\n return (\n <div\n className={'LOLFirmSwitcherMenu-option'}\n onClick={() => onSelect(id)}\n aria-disabled={disabled}\n data-testid={`firm-${id}`}\n >\n <span>{name}</span>\n {selected && <i className=\"material-icons-round\">check_circle</i>}\n </div>\n );\n};\n\ninterface IFirmSwitcher {\n options: IFirm[];\n selectedId: string | undefined;\n onSelect: (itemId: string) => Promise<void>;\n showFilter?: boolean;\n}\n\nconst FirmSwitcher: React.FC<IFirmSwitcher> = ({\n options,\n selectedId,\n onSelect,\n showFilter = true,\n}) => {\n const [busy, setBusy] = useState(false);\n\n const onSelectInternal = async (optionId: string) => {\n if (!busy) {\n setBusy(true);\n await onSelect(optionId);\n setBusy(false);\n }\n };\n\n const filterFunction = useCallback(\n (filterString: string) => {\n const upperCaseFilterString = filterString.trim().toUpperCase();\n return options.filter((firm) =>\n firm.name.toUpperCase().includes(upperCaseFilterString)\n );\n },\n [options]\n );\n\n const renderFunction = (filteredOptions: IFirm[]) => {\n return (\n <>\n {filteredOptions.map((option) => (\n <FirmOption\n key={option.id}\n value={option}\n selected={option.id === selectedId}\n onSelect={onSelectInternal}\n disabled={busy}\n />\n ))}\n </>\n );\n };\n\n return (\n <div className=\"LOLFirmSwitcherMenu\">\n <LuiFilterContainer\n showFilter={showFilter}\n filterFunction={filterFunction}\n renderFunction={renderFunction}\n />\n </div>\n );\n};\n","import React from 'react';\nimport { LuiDrawerMenuOption } from '../LuiHeaderMenu/LuiHeaderMenus';\nimport { useLOLUserContext } from './contexts/LOLUserContext';\n\nexport interface Props {\n redirectPath: () => string;\n}\nexport const LOLLogoutLink = (props: Props): JSX.Element | null => {\n const redirectPathString = props.redirectPath();\n const { user } = useLOLUserContext();\n\n if (!user) {\n return null;\n }\n\n const logout = async () => {\n const res = await fetch('/auth/api/logout');\n if (res.status === 200) {\n window.location.assign(`/auth/login?redirectPath=${redirectPathString}`);\n } else {\n // TODO: determine best handling of logout endpoint returning non-OK\n }\n };\n return <LuiDrawerMenuOption label={`Logout ${user!.id}`} onClick={logout} />;\n};\n","import React from 'react';\nimport { useLOLUserContext } from './contexts/LOLUserContext';\n\nexport const LOLUserLastLogin: React.FC = () => {\n let lastLogin;\n const context = useLOLUserContext();\n\n const lastLoginISO = context?.user?.lastLogin;\n lastLogin = lastLoginISO\n ? new Date(lastLoginISO).toLocaleString('en-NZ')\n : null;\n\n return (\n <div className=\"LOLUserLastLogin lui-padding-left-xxs lui-padding-right-xxs\">\n <small>\n <span>\n <strong>Last login: {lastLogin}</strong>\n </span>\n <br />\n <span>Not you? Please, call us on 0800 665 463</span>\n </small>\n </div>\n );\n};\n","import React from 'react';\nimport { LuiDrawerMenuOption } from '../LuiHeaderMenu/LuiHeaderMenus';\nimport ExternalIcon from '../../assets/images/lui-icon-open-externally.svg';\nimport { useLOLUserContext } from './contexts/LOLUserContext';\nimport clsx from 'clsx';\n\nexport interface LOLAuthorisedLinkProps {\n label: string;\n path: string;\n icon: string;\n activeIcon: string;\n active: boolean;\n /**\n * User must have at least one of these privileges to see the link.\n */\n anyPrivileges: string[];\n openExternally?: boolean;\n}\nexport const LOLAuthorisedLink = (\n props: LOLAuthorisedLinkProps\n): JSX.Element | null => {\n const { hasAnyPrivilege } = useLOLUserContext();\n const {\n icon,\n activeIcon,\n active,\n label,\n path,\n openExternally,\n anyPrivileges,\n } = props;\n\n const onClickHandler = async () => {\n if (openExternally) {\n window.open(path, '_blank');\n } else {\n window.location.assign(path);\n }\n };\n\n if (!hasAnyPrivilege(anyPrivileges)) {\n return null;\n }\n\n return (\n <div className={clsx('LOLAuthorisedLink', active && 'active')}>\n <LuiDrawerMenuOption\n icon={\n <div\n className={\n active\n ? 'LOLAuthorisedLink-icon-active'\n : 'LOLAuthorisedLink-icon'\n }\n >\n <img\n src={active ? activeIcon : icon}\n alt={label}\n style={{ width: '48px', height: '48px' }}\n />\n </div>\n }\n label={label}\n onClick={onClickHandler}\n badge={\n openExternally ? (\n <img\n src={ExternalIcon}\n alt=\"Link opens in a new tab\"\n style={{ width: '16px', height: '16px', marginTop: '16px' }}\n />\n ) : (\n <></>\n )\n }\n />\n </div>\n );\n};\n","import React from 'react';\nimport { LOLAuthorisedLink, LOLAuthorisedLinkProps } from './LOLAuthorisedLink';\nimport SearchIcon from '../../assets/images/lui-icon-search-app-link.svg';\nimport SearchIconActive from '../../assets/images/lui-icon-search-app-link-active.svg';\nimport SurveyIcon from '../../assets/images/lui-icon-survey-app-link.svg';\nimport SurveyIconActive from '../../assets/images/lui-icon-survey-app-link-active.svg';\nimport NOCIcon from '../../assets/images/lui-icon-noc-app-link.svg';\nimport NOCIconActive from '../../assets/images/lui-icon-noc-app-link-active.svg';\nimport TitlesIcon from '../../assets/images/lui-icon-titles-app-link.svg';\nimport TitlesIconActive from '../../assets/images/lui-icon-titles-app-link-active.svg';\nimport { useLOLUserContext } from './contexts/LOLUserContext';\nimport { LuiDrawerMenuSection } from '../LuiHeaderMenu/LuiHeaderMenus';\n\nfunction createLink(\n pathname: string,\n label: string,\n target: string,\n activeIcon: string,\n icon: string,\n anyPrivileges: string[]\n): LOLAuthorisedLinkProps {\n return {\n label,\n path: target,\n icon,\n activeIcon,\n active: pathname.startsWith(target),\n anyPrivileges,\n openExternally: true,\n };\n}\n\nexport interface ILOLAppLauncherMenuProps {\n pathname: string;\n enableNOCLink?: boolean;\n enableSurveyLink?: boolean;\n enableTitlesLink?: boolean;\n}\n\nexport const SEARCH_LABEL = 'Search';\nexport const NOC_LABEL = 'Post registered NoC';\nexport const SURVEY_LABEL = 'Survey';\nexport const TITLES_LABEL = 'Titles';\n\nexport const LOLAppLauncherMenu = (\n props: ILOLAppLauncherMenuProps\n): JSX.Element | null => {\n const { user, isInternal } = useLOLUserContext();\n const {\n pathname,\n enableNOCLink = false,\n enableSurveyLink = false,\n enableTitlesLink = false,\n } = props;\n\n if (!user) {\n return null;\n }\n\n const links: LOLAuthorisedLinkProps[] = [\n createLink(\n pathname,\n SEARCH_LABEL,\n '/search',\n SearchIconActive,\n SearchIcon,\n isInternal() ? [] : ['prv_search_privilege', 'prv_spatial_view']\n ),\n ];\n\n if (!isInternal() && enableNOCLink) {\n links.push(\n createLink(\n pathname,\n NOC_LABEL,\n '/notices',\n NOCIconActive,\n NOCIcon,\n // NOC privileges currently the same as dealings\n [\n 'prv_cancel_with_deal',\n 'prv_create_deal_tin',\n 'prv_edit_modify_deal_tin',\n 'prv_pre_validate_deal',\n 'prv_pre_validate_tin',\n 'prv_release_tin',\n 'prv_sign_tin',\n 'prv_sign_view',\n 'prv_submit_deal',\n 'prv_view_deal_tin',\n 'prv_withdraw_dealing',\n ]\n )\n );\n }\n if (!isInternal() && enableSurveyLink) {\n links.push(\n createLink(\n pathname,\n SURVEY_LABEL,\n '/survey',\n SurveyIconActive,\n SurveyIcon,\n [\n 'prv_create_survey',\n 'prv_exception_process',\n 'prv_survey_sign_submit',\n 'prv_view_survey',\n 'prv_withdraw_survey',\n ]\n )\n );\n }\n if (!isInternal() && enableTitlesLink) {\n links.push(\n createLink(\n pathname,\n TITLES_LABEL,\n '/dealings',\n TitlesIconActive,\n TitlesIcon,\n [\n 'prv_cancel_with_deal',\n 'prv_create_deal_tin',\n 'prv_edit_modify_deal_tin',\n 'prv_pre_validate_deal',\n 'prv_pre_validate_tin',\n 'prv_release_tin',\n 'prv_sign_tin',\n 'prv_sign_view',\n 'prv_submit_deal',\n 'prv_view_deal_tin',\n 'prv_withdraw_dealing',\n ]\n )\n );\n }\n\n return (\n <LuiDrawerMenuSection title=\"Launch app\">\n {links.map((link) => (\n <LOLAuthorisedLink key={link.path} {...link} />\n ))}\n </LuiDrawerMenuSection>\n );\n};\n","import React from 'react';\nimport { useLOLUserContext } from './contexts/LOLUserContext';\nimport { LOLFirmSwitcherMenuContent } from './LOLFirmSwitcher';\n\nexport interface ILOLDrawerMenuFirmSwitcherProperties {\n minimumFilterCount: number;\n}\n\nexport const LOLDrawerMenuFirmSwitcher: React.FC<ILOLDrawerMenuFirmSwitcherProperties> = (\n props\n) => {\n const { minimumFilterCount } = props;\n const { user, selectedFirm, changeFirm } = useLOLUserContext();\n const firms = user?.firms;\n\n if (!firms || !selectedFirm) {\n return null;\n }\n\n if (firms.length < 2) {\n return null;\n }\n\n return (\n <LOLFirmSwitcherMenuContent\n firms={firms}\n selectedFirm={selectedFirm}\n changeFirm={changeFirm}\n collapsible={true}\n minimumFilterCount={minimumFilterCount}\n />\n );\n};\n","import React, { ReactNode } from 'react';\nimport {\n LOLAppLauncherMenu,\n ILOLAppLauncherMenuProps,\n} from './LOLAppLauncherMenu';\nimport { LOLDrawerMenuFirmSwitcher } from './LOLDrawerMenuFirmSwitcher';\nimport { LOLUserLastLogin } from './LOLUserLastLogin';\nimport { LOLLogoutLink } from './LOLLogoutLink';\nimport { useLOLUserContext } from './contexts/LOLUserContext';\nimport {\n LuiDrawerMenuDivider,\n LuiDrawerMenu,\n LuiDrawerMenuOption,\n} from '../LuiHeaderMenu/LuiHeaderMenus';\nimport ExternalIcon from '../../assets/images/lui-icon-open-externally.svg';\n\nexport const LOLDrawerMenu = (props: {\n children: ReactNode;\n hasStickyHeader?: boolean;\n}): JSX.Element => {\n return (\n <LuiDrawerMenu hasStickyHeader={props.hasStickyHeader}>\n <div className=\"LOLDrawerMenu\">\n <div className=\"LOLDrawerMenu-contents\">{props.children}</div>\n <div className=\"LOLDrawerMenu-footer\">\n <LOLUserLastLogin />\n </div>\n </div>\n </LuiDrawerMenu>\n );\n};\n\nexport type ILOLCommonDrawerMenuProps = Omit<\n ILOLAppLauncherMenuProps,\n 'pathname'\n> & {\n appSpecificSections?: ReactNode;\n appSpecificLinks?: ReactNode;\n path: string;\n hasStickyHeader?: boolean;\n showRequestsLink?: boolean;\n};\n\nexport const LOLCommonDrawerMenu = (\n props: ILOLCommonDrawerMenuProps\n): JSX.Element => {\n const {\n appSpecificLinks,\n appSpecificSections,\n path,\n hasStickyHeader,\n showRequestsLink,\n ...restOfProps\n } = props;\n\n return (\n <LOLDrawerMenu hasStickyHeader={hasStickyHeader}>\n {appSpecificSections}\n <LOLAppLauncherMenu pathname={path} {...restOfProps} />\n <LOLDrawerMenuFirmSwitcher minimumFilterCount={5} />\n {showRequestsLink && (\n <>\n <LuiDrawerMenuDivider />\n <LOLCommonMenuRequestsLink />\n </>\n )}\n {appSpecificLinks && (\n <>\n <LuiDrawerMenuDivider />\n {appSpecificLinks}\n </>\n )}\n <LuiDrawerMenuDivider />\n <LOLCommonDrawerMenuAfterLinks path={path} />\n </LOLDrawerMenu>\n );\n};\n\nexport const LOLCommonDrawerMenuAfterLinks = (props: {\n path: string;\n}): JSX.Element | null => {\n const { isInternal } = useLOLUserContext();\n const { path } = props;\n const contextPath = path.substr(0, path.indexOf('/', 1));\n\n const gotoLink = (url: string) => {\n window.location.assign(url);\n };\n\n return (\n <>\n {!isInternal() && (\n <LuiDrawerMenuOption\n label=\"Change password\"\n onClick={() => {\n gotoLink(\n `/manage/my-preferences?redirectPath=${encodeURIComponent(path)}`\n );\n }}\n />\n )}\n <LOLLogoutLink redirectPath={() => contextPath} />\n </>\n );\n};\n\nconst LOLCommonMenuRequestsLink = () => {\n const openRequestsApp = () => {\n window.open('/requests', '_blank');\n };\n\n return (\n <LuiDrawerMenuOption\n label={'Create request'}\n onClick={() => {\n openRequestsApp();\n }}\n badge={\n <img\n src={ExternalIcon}\n alt=\"Link opens in a new tab\"\n style={{ width: '16px', height: '16px', marginTop: '4px' }}\n />\n }\n />\n );\n};\n","import React, { ReactNode, useEffect, useMemo } from 'react';\nimport tippy, { Placement } from 'tippy.js';\nimport 'tippy.js/dist/tippy.css';\nimport 'tippy.js/dist/border.css';\n\nexport interface ILuiTooltipProperties {\n message: string;\n placement?: Placement;\n trigger?: string;\n children: ReactNode;\n animation?: boolean;\n}\n\nlet id = 0;\nconst getKey = () => id++;\n\nexport const LuiTooltip = (props: ILuiTooltipProperties) => {\n const { children, message, placement, trigger, animation = true } = props;\n const id = `LuiToolTip_${useMemo(getKey, [])}`;\n\n if (typeof message !== 'string') {\n throw new Error('LuiTooltip message must be a string!');\n }\n\n useEffect(() => {\n tippy(`#${id}`, {\n content: message,\n arrow: true,\n trigger,\n theme: 'LUI',\n placement,\n offset: [0, 24],\n animation,\n });\n\n return () => {\n (document.getElementById(id) as any)?._tippy?.destroy();\n };\n }, [id, message, placement, trigger, animation]);\n\n return <span id={id}>{children}</span>;\n};\n","import React, { useEffect, useState } from 'react';\nimport { LuiBannerContent } from '../LuiBanner/LuiBanner';\nimport { useLOLUserContext } from './contexts/LOLUserContext';\nimport clsx from 'clsx';\nimport { buildHideClassDict, Range, Size } from '../common/ResponsiveUtils';\n\nexport interface ILOLActiveFirmMessageProperties {\n showFrom?: Size;\n}\n\nexport const LOLActiveFirmMessage = (\n props: ILOLActiveFirmMessageProperties\n): JSX.Element | null => {\n const { selectedFirm, user } = useLOLUserContext();\n const [visible, setVisible] = useState<boolean>(false);\n const hide: Range | undefined =\n props.showFrom !== 'xl' ? { from: props.showFrom || 'sm' } : undefined;\n\n useEffect(() => {\n setVisible(true);\n }, [selectedFirm]);\n\n if (!selectedFirm || !visible || user!.firms.length < 2) {\n return null;\n }\n\n return (\n <div className={clsx(hide && buildHideClassDict(hide))}>\n <LuiBannerContent level={'info'}>\n Active account is {selectedFirm.name}\n <button\n aria-label=\"Close dialog\"\n onClick={() => {\n setVisible(false);\n }}\n >\n <i className=\"material-icons-round\">close</i>\n </button>\n </LuiBannerContent>\n </div>\n );\n};\n","import { IFirm, IUser } from './LOLUserContext';\n\nexport const userHasAnyPrivilege = (\n privileges: string[],\n selectedFirm: IFirm | undefined\n): boolean => {\n return (\n privileges.length === 0 ||\n (selectedFirm !== undefined &&\n selectedFirm.privileges.filter((value) => privileges.indexOf(value) > -1)\n .length > 0)\n );\n};\n\nexport const userIsInternal = (user: IUser | null | undefined): boolean => {\n const loginType =\n ((user?.loginType as any).code as string) || (user?.loginType as string);\n return loginType === 'INTN';\n};\n","import clsx from 'clsx';\nimport React from 'react';\n\nexport interface ILuiBadge {\n children: React.ReactNode;\n size?: 'sm' | 'default' | 'lg';\n backgroundFill?: boolean;\n variation?: 'default' | 'warning';\n}\n\nexport const LuiBadge = (props: ILuiBadge): JSX.Element => (\n <p\n className={clsx(\n 'LuiBadge',\n props.size === 'sm' && 'LuiBadge--sm',\n props.size === 'lg' && 'LuiBadge--lg',\n props.backgroundFill && 'LuiBadge--fill',\n props.variation === 'warning' && 'LuiBadge--warning'\n )}\n >\n {props.children}\n </p>\n);\n","import React from 'react';\nimport clsx from 'clsx';\n\nimport { LuiError } from '../../LuiError/LuiError';\nimport { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';\n\nexport interface LuiCheckboxProps {\n value: string;\n label: JSX.Element | string;\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;\n isChecked: boolean;\n isDisabled?: boolean;\n error?: string;\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n}\n\nexport const LuiCheckboxInput = (props: LuiCheckboxProps) => {\n const id = useGenerateOrDefaultId(props.inputProps?.id);\n\n return (\n <div\n className={clsx('LuiCheckboxInput', {\n 'LuiCheckboxInput--isChecked': props.isChecked,\n 'LuiCheckboxInput--hasError': !!props.error,\n })}\n >\n <label htmlFor={id} className=\"LuiCheckboxInput-group\">\n <input\n className={clsx('LuiCheckboxInput-input')}\n id={id}\n type=\"checkbox\"\n value={props.value}\n onChange={props.onChange}\n checked={props.isChecked}\n disabled={props.isDisabled}\n {...props.inputProps}\n />\n <span className=\"LuiCheckboxInput-label\">{props.label}</span>\n </label>\n\n {/* Error message */}\n {props.error && (\n <LuiError className=\"LuiCheckboxInput\" error={props.error} />\n )}\n </div>\n );\n};\n","import React from 'react';\nimport {\n ControlledMenu,\n ControlledMenuProps,\n Menu,\n MenuProps,\n} from '@szhsin/react-menu';\nimport '@szhsin/react-menu/dist/index.css';\n\n/**\n * A menu controlled by a user-supplied MenuButton. Open/closed state is managed internally. The defaulted style props,\n * menuClassName and offsetY, can be overridden simply by setting them in the usual way.\n */\nexport const LuiMenu = (props: MenuProps): JSX.Element => {\n return <Menu menuClassName={'lui-menu'} offsetY={12} {...props} />;\n};\n\n/**\n * A menu with state managed externally. Can be used quite conveniently as a context menu. The defaulted style props,\n * menuClassName and offsetY, can be overridden simply by setting them in the usual way.\n */\nexport const LuiControlledMenu = (props: ControlledMenuProps): JSX.Element => {\n return <ControlledMenu menuClassName={'lui-menu'} offsetY={12} {...props} />;\n};\n","import React from 'react';\nimport mountainBroken from '../../assets/images/mountain-broken.svg';\n\nexport const LuiErrorPage: React.FC<{\n header?: React.ReactElement;\n footer?: React.ReactElement;\n content?: React.ReactElement;\n}> = (props) => {\n return (\n <div className={'LuiErrorPage'}>\n {props.header}\n <div className={'Container'}>\n <div className=\"LuiErrorPage-wrapper\">\n <div className={'LuiErrorPage-content'}>{props.content}</div>\n\n <div className={'LuiErrorPage-image'}>\n <img src={mountainBroken} alt=\"Mountain broken\" />\n </div>\n </div>\n </div>\n {props.footer}\n </div>\n );\n};\n","import React, { ReactNode, useRef, useState } from 'react';\nimport {\n MenuItem,\n FocusableItem,\n MenuDivider,\n MenuHeader,\n useMenuState,\n ControlledMenu,\n} from '@szhsin/react-menu';\nimport '@szhsin/react-menu/dist/index.css';\n\ntype LuiFilterMenuProps = {\n menuButton: (toggleMenu: () => void) => ReactNode;\n filteredItems: SelectMenuItem[];\n onItemClick: (itemId: string) => void;\n maxRows?: number;\n enabled?: boolean;\n};\n\ninterface SelectMenuItem {\n id: string;\n display: string;\n specialType?: 'div' | 'head';\n}\n\nexport const LuiFilterMenu = (props: LuiFilterMenuProps): JSX.Element => {\n const [filter, setFilter] = useState('');\n\n const { toggleMenu, ...menuProps } = useMenuState();\n const ref = useRef(null);\n\n return (\n <div ref={ref}>\n {props.menuButton(() => {\n switch (props.enabled) {\n case false: {\n toggleMenu(false);\n break;\n }\n default: {\n toggleMenu();\n break;\n }\n }\n })}\n <ControlledMenu\n {...menuProps}\n anchorRef={ref}\n onClose={() => toggleMenu(false)}\n className=\"lui-menu\"\n offsetY={12}\n onChange={(e: any) => {\n e.open && setFilter('');\n }}\n menuStyles={\n props.maxRows !== undefined\n ? { maxHeight: 62 + 34 * props.maxRows, overflowY: 'auto' }\n : {}\n }\n >\n <FocusableItem>\n {({ ref }: any) => (\n <input\n ref={ref}\n type=\"text\"\n placeholder=\"Type to filter\"\n value={filter}\n onChange={(e) => setFilter(e.target.value)}\n />\n )}\n </FocusableItem>\n\n {props.filteredItems\n .filter((item) =>\n item.display.toUpperCase().includes(filter.trim().toUpperCase())\n )\n .map((item) => {\n if (item?.specialType === 'div') {\n return <MenuDivider key={item.id} />;\n } else if (item?.specialType === 'head') {\n return <MenuHeader key={item.id}>{item.display}</MenuHeader>;\n } else {\n return (\n <MenuItem\n key={item.id}\n onMouseDown={(e: any) => {\n props.onItemClick(item.id);\n e.stopPropagation();\n }}\n >\n {item.display}\n </MenuItem>\n );\n }\n })}\n </ControlledMenu>\n </div>\n );\n};\n","import React from 'react';\nimport LinzLogoFooter from '../../assets/images/linz-logo-footer.svg';\nimport NzGovtLogoRev from '../../assets/images/nz-govt-logo-rev.svg';\n\ninterface FooterProps {\n className?: string;\n footerText: string;\n contactNumber?: string;\n contactEmail?: string;\n feedbackFormUrl?: string;\n}\n\nexport const LuiFooter: React.FC<FooterProps> = (props) => {\n return (\n <footer className={'lui-footer'}>\n <div className={'lui-footer-columns'}>\n <h2>{props.footerText}</h2>\n <div className=\"lui-row-divider-xs lui-row-divider-sm\" />\n <div className={'lui-footer-container-right'}>\n <h3>Connect</h3>\n <ul className=\"lui-footer-list\">\n {props.contactNumber && (\n <li>\n <a href={'tel:' + props.contactNumber}>{props.contactNumber}</a>\n </li>\n )}\n {props.contactEmail && (\n <li>\n <a href={'mailto:' + props.contactEmail}>Email</a>\n </li>\n )}\n {props.feedbackFormUrl && (\n <li>\n <a\n href={props.feedbackFormUrl}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n Give feedback\n </a>\n </li>\n )}\n </ul>\n </div>\n </div>\n <div className=\"lui-row-divider-xs lui-row-divider-sm\" />\n <div className={'lui-footer-logo-row'}>\n <div className={'lui-footer-columns'}>\n <div className=\"lui-footer-linz-logo\">\n <a\n href=\"https://www.linz.govt.nz\"\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n <img\n alt=\"Land Information New Zealand (LINZ) - Toitū te whenua\"\n className=\"jss180\"\n src={LinzLogoFooter}\n />\n </a>\n </div>\n <div className=\"lui-footer-nz-govt-logo\">\n <a\n href=\"https://www.govt.nz\"\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n <img\n alt=\"Open New Zealand Government website in new window/tab. \"\n className=\"jss181\"\n src={NzGovtLogoRev}\n />\n </a>\n </div>\n </div>\n </div>\n\n <div className=\"lui-margin-top-md lui-row-divider-xs lui-row-divider-sm lui-row-divider-md lui-row-divider-lg lui-row-divider-xl\">\n <div className={'lui-footer-columns'}>\n <ul className=\"lui-footer-list\">\n <li className={'lui-footer-inline-list-item'}>\n <a href=\"https://www.digital.govt.nz/home/about-digital-govt-nz/contact-us/\">\n Contact\n </a>\n </li>\n <li className={'lui-footer-inline-list-item'}>\n <a href=\"https://www.digital.govt.nz/home/about-digital-govt-nz/privacy/\">\n Privacy\n </a>\n </li>\n </ul>\n\n <div className=\"lui-row-divider-xs\">\n <p className=\"lui-small\">© 2020 Land Information New Zealand</p>\n </div>\n </div>\n </div>\n </footer>\n );\n};\n","import React, { PropsWithChildren, ReactNode } from 'react';\n\nimport { LuiShadow } from '../../LuiShadow/LuiShadow';\nimport { HelpInfo } from './LuiHelpInfo/LuiHelpInfo';\n\nexport interface IFormSectionHeaderProps {\n header: string;\n details?: string | ReactNode;\n link?: string;\n}\n\nexport const LuiFormSectionHeader = (\n props: PropsWithChildren<IFormSectionHeaderProps>\n) => (\n <div className=\"LuiFormSectionHeader\">\n <div className=\"LuiFormSectionHeader-header\">\n <h3 className=\"LuiFormSectionHeader-heading\">{props.header}</h3>\n {props.details && <HelpInfo info={props.details} />}\n </div>\n <LuiShadow className={'LuiFormSectionHeader-details'}>\n {props.children}\n </LuiShadow>\n </div>\n);\n","import clsx from 'clsx';\nimport { useFormikContext, FieldProps, getIn, Field } from 'formik';\nimport React, { ReactNode } from 'react';\nimport { LuiCommonInputProps } from '../LuiFormikForm';\n\nexport function LuiFormikCheckbox(\n props: {\n name: string;\n value: string;\n label: ReactNode;\n htmlFor?: string;\n className?: string;\n } & LuiCommonInputProps\n) {\n let ctx = useFormikContext();\n return (\n <>\n <Field name={props.name}>\n {({ field }: FieldProps) => {\n const showError = getIn(ctx?.errors, props.name);\n\n return (\n <div className={clsx(showError && 'lui-input-error')}>\n <div className=\"lui-input-group-wrapper \">\n {showError && (\n <i className=\"lui-form-status-icon material-icons-round\">\n error\n </i>\n )}\n <div\n className={clsx('lui-checkbox-container', props.className)}\n >\n <input\n {...props.inputProps}\n type=\"checkbox\"\n id={props.value}\n disabled={!!props.disabled}\n checked={field.value}\n {...field}\n />\n {typeof props.label === 'string' ? (\n <label htmlFor={props.value}>{props.label}</label>\n ) : (\n props.label\n )}\n </div>\n </div>\n </div>\n );\n }}\n </Field>\n </>\n );\n}\n","import React from 'react';\nimport { Form, Formik, FormikConfig, FormikValues } from 'formik';\nimport clsx from 'clsx';\n\nexport function LuiFormikForm<\n Values extends FormikValues = FormikValues,\n ExtraProps = {}\n>(props: FormikConfig<Values> & ExtraProps & { className?: string }) {\n // this spreads all keys, except className\n const { className, ...formikProps } = { ...props };\n\n const classNames = clsx(props.className);\n\n return (\n <Formik {...formikProps}>\n <div className={classNames}>\n <Form>{props.children} </Form>\n </div>\n </Formik>\n );\n}\n\nexport interface LuiCommonInputProps {\n inputProps?: object;\n required?: boolean;\n disabled?: boolean;\n}\n","import { useField } from 'formik';\nimport React from 'react';\nimport { LuiCommonInputProps } from '../LuiFormikForm';\n\nexport const LuiFormikRadioButton: React.FC<\n {\n label: string;\n className?: string;\n value: string;\n name: string;\n } & LuiCommonInputProps\n> = (props) => {\n const [field, meta] = useField(props);\n\n return (\n <div className={props.className}>\n {meta.touched && meta.error && (\n <i className=\"lui-form-status-icon material-icons-round\">error</i>\n )}\n <div className={'lui-radio-container'}>\n <input\n disabled={!!props.disabled}\n {...field}\n checked={props.value === field.value}\n value={props.value}\n id={props.value}\n type=\"radio\"\n {...props.inputProps}\n />\n <label htmlFor={props.value}>{props.label}</label>\n </div>\n </div>\n );\n};\n","import camelcase from 'camelcase';\nimport clsx from 'clsx';\nimport { useFormikContext, getIn } from 'formik';\nimport React from 'react';\n\n// TODO: It's annoying that we have to pass name into the RadioGroup and RadioButton\nexport const LuiFormikRadioGroup: React.FC<{\n hint?: string;\n legend: string;\n name: string;\n required?: boolean;\n}> = (props) => {\n let ctx = useFormikContext();\n const error = getIn(ctx.errors, props.name);\n const touch = getIn(ctx.touched, props.name);\n const showError = touch && error;\n\n const describedby = props.hint && camelcase(props?.hint) + 'Id';\n const errorDescribedBy = error && camelcase(error) + 'Id';\n\n return (\n <div\n className={clsx(\n 'lui-fieldsetBlock-form-group',\n showError && 'lui-input-error'\n )}\n >\n <fieldset\n aria-describedby={clsx(\n props.hint && describedby + 'Id',\n showError && errorDescribedBy\n )}\n >\n <legend>\n {props.required && <span className=\"lui-required-input-icon\">*</span>}\n {props.legend}\n </legend>\n {showError && (\n <p id={errorDescribedBy}>\n <span className=\"LuiScreenReadersOnly\"> Error: </span>\n {error}\n </p>\n )}\n {props.hint && (\n <p className=\"lui-fieldset-support-txt small\" id={describedby}>\n {props.hint}\n </p>\n )}\n <div className=\"lui-input-group-wrapper\">{props.children}</div>\n </fieldset>\n </div>\n );\n};\n","import React, { ChangeEventHandler, InputHTMLAttributes } from 'react';\n\nimport { LuiIcon } from '../../LuiIcon/LuiIcon';\nimport clsx from 'clsx';\nimport { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';\n\nexport interface LuiRadioProps {\n onChange: ChangeEventHandler<HTMLInputElement>;\n selectedValue: string;\n options: string[];\n legend?: JSX.Element | string;\n error?: string;\n isOptionDisabled?: (index: number) => boolean;\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n renderLabelFor?: (value: string) => JSX.Element;\n}\n\n// @NOTE Can use LuiRadioInput in block form and pass through your own legend (label)\nexport const LuiRadioInput = (props: LuiRadioProps) => {\n const id = useGenerateOrDefaultId(props.inputProps?.id);\n\n return (\n <>\n <div\n className={clsx('LuiRadioInput', {\n 'LuiRadioInput--hasError': props.error,\n })}\n >\n <fieldset className={'LuiRadioInput-fieldset'}>\n {props.legend && (\n <legend className=\"LuiRadioInput-legend\">{props.legend}</legend>\n )}\n\n {props.options.map((option: string, index: number) => {\n const radioId = `${id}-${index}`;\n const isSelected = props.selectedValue === option;\n\n const isDisabled =\n props.isOptionDisabled && props.isOptionDisabled(index);\n\n return (\n <label\n htmlFor={radioId}\n className={clsx('LuiRadioInput-label', {\n 'LuiRadioInput-label--isDisabled': isDisabled,\n 'LuiRadioInput-label--isSelected': isSelected,\n })}\n key={radioId}\n >\n <input\n disabled={isDisabled}\n className=\"LuiRadioInput-input\"\n type=\"radio\"\n id={radioId}\n name={option}\n value={option}\n checked={isSelected}\n onChange={props.onChange}\n {...props.inputProps}\n />\n {props.renderLabelFor ? props.renderLabelFor(option) : option}\n </label>\n );\n })}\n </fieldset>\n {/* Error message */}\n {props.error && (\n <div className=\"LuiRadioInput-errorMsg\">\n <LuiIcon alt={'error'} name=\"ic_error\" size=\"md\" status=\"error\" />\n <p>{props.error}</p>\n </div>\n )}\n </div>\n </>\n );\n};\n","import React, { ChangeEventHandler, SelectHTMLAttributes } from 'react';\n\nimport { LuiIcon } from '../../LuiIcon/LuiIcon';\nimport clsx from 'clsx';\nimport { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';\n\nexport type SelectOptions = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport interface SelectProps {\n error?: string;\n onChange?: ChangeEventHandler<HTMLSelectElement>;\n options: SelectOptions[];\n value: string;\n mandatory?: boolean;\n hideLabel?: boolean;\n selectProps?: SelectHTMLAttributes<HTMLSelectElement>;\n label: JSX.Element | string;\n placeholderText?: string;\n}\n\nexport const LuiSelectInput = (props: SelectProps) => {\n const id = useGenerateOrDefaultId(props.selectProps?.id);\n\n return (\n <div\n className={clsx(\n 'LuiSelect',\n props.selectProps?.disabled ? 'isDisabled' : '',\n props.error ? 'hasError' : ''\n )}\n >\n <label htmlFor={id} className=\"LuiSelect-label\">\n {props.mandatory && <span className=\"LuiSelect-mandatory\">*</span>}\n <span\n className={clsx(\n 'LuiSelect-label-text',\n props.hideLabel ? 'LuiScreenReadersOnly' : ''\n )}\n >\n {props.label}\n </span>\n <div className=\"LuiSelect-wrapper\">\n <select\n name={id}\n onChange={props.onChange}\n value={props.value}\n className=\"LuiSelect-select\"\n {...props.selectProps}\n >\n {props.placeholderText && (\n <option value=\"\" disabled>\n {props.placeholderText}\n </option>\n )}\n {props.options.map((selection) => (\n <option key={selection.value} value={selection.value}>\n {selection.label}\n </option>\n ))}\n </select>\n <LuiIcon\n alt={'Error'}\n name=\"ic_keyboard_arrow_down\"\n className=\"LuiSelect-chevron-icon\"\n size=\"md\"\n />\n </div>\n\n {/* Error message */}\n {props.error && (\n <span className=\"LuiSelect-error\">\n <LuiIcon\n alt={'Error'}\n name=\"ic_error\"\n className=\"LuiSelect-error-icon\"\n size=\"sm\"\n status=\"error\"\n />\n {props.error}\n </span>\n )}\n </label>\n </div>\n );\n};\n","import React from 'react';\nimport { useState } from 'react';\nimport { getMaterialIconForLevel } from '../LuiBanner/LuiBanner';\n\nexport const LuiStaticMessage: React.FC<{\n level: 'success' | 'info' | 'warning' | 'error';\n closable?: boolean;\n}> = (props) => {\n const [display, setDisplay] = useState(true);\n let materialIcon = getMaterialIconForLevel(props.level);\n\n return display ? (\n <div\n className={`lui-msg-${props.level}`}\n data-testid={'static-message-container'}\n >\n <i className=\"lui-msg-status-icon material-icons-round\">{materialIcon}</i>\n\n {props.children}\n {(props.closable === undefined || props.closable) && (\n <button\n aria-label=\"Close dialog\"\n onClick={() => {\n setDisplay(false);\n }}\n >\n <i className=\"material-icons-round\">close</i>\n </button>\n )}\n </div>\n ) : null;\n};\n","import React from 'react';\n// import './LuiTabsGroup.scss';\n\nexport const LuiTabsGroup: React.FC<{\n ariaLabel: string;\n justify?: boolean;\n}> = (props) => {\n return (\n <div\n className={`LuiTabsGroup ${\n props.justify ? 'LuiTabsGroup--justified' : ''\n }`}\n role=\"tablist\"\n aria-label={props.ariaLabel}\n >\n {props.children}\n </div>\n );\n};\n","import clsx from 'clsx';\nimport React, { useContext } from 'react';\nimport { LuiTabsContext } from '../LuiTabs';\n// import './LuiTabsPanel.scss';\n\ninterface LuiTabsPanelProps {\n panel: string;\n}\n\nexport const LuiTabsPanel: React.FC<LuiTabsPanelProps> = (props) => {\n const context = useContext(LuiTabsContext);\n let active = context.activePanel === props.panel;\n\n return (\n <div\n className={clsx('LuiTabsPanel', active && 'LuiTabsPanel--active')}\n id={`${props.panel}-tab-panel`}\n role=\"tabpanel\"\n aria-labelledby={`${props.panel}-tab`}\n >\n {props.children}\n </div>\n );\n};\n","import React, { useContext } from 'react';\nimport { LuiTab } from '../LuiTab/LuiTab';\nimport { LuiTabsContext } from '../LuiTabs';\n\ninterface LuiTabsPanelSwitch {\n targetPanel: string;\n setActivePanel?: (targetPanel: string) => {};\n}\n\nexport const LuiTabsPanelSwitch: React.FC<LuiTabsPanelSwitch> = (props) => {\n const context = useContext(LuiTabsContext);\n let active = context.activePanel === props.targetPanel;\n return (\n <LuiTab\n id={`${props.targetPanel}-tab`}\n ariaControls={`${props.targetPanel}-tab-panel`}\n active={active}\n onClick={() => {\n if (context.setActivePanel) context.setActivePanel(props.targetPanel);\n }}\n >\n {props.children}\n </LuiTab>\n );\n};\n","import React, { ChangeEventHandler, InputHTMLAttributes } from 'react';\n\nimport { LuiIcon } from '../../LuiIcon/LuiIcon';\nimport clsx from 'clsx';\nimport { useGenerateOrDefaultId } from '../LuiTextInput/LuiTextInput';\n\nexport interface LuiTextAreaInputProps {\n label: JSX.Element | string;\n mandatory?: boolean;\n inputProps?: InputHTMLAttributes<HTMLTextAreaElement>;\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n value: string;\n error?: string | boolean;\n}\n\nexport const LuiTextAreaInput = (props: LuiTextAreaInputProps) => {\n const id = useGenerateOrDefaultId(props.inputProps?.id);\n\n return (\n <div\n className={clsx(\n 'LuiTextAreaInput',\n props.inputProps?.disabled ? 'isDisabled' : '',\n props?.error ? 'hasError' : ''\n )}\n >\n <label htmlFor={id}>\n {props.mandatory && (\n <span className=\"LuiTextAreaInput-mandatory\">*</span>\n )}\n <span className=\"LuiTextAreaInput-label\">{props.label}</span>\n <div className=\"LuiTextAreaInput-wrapper\">\n {' '}\n {/* wrapper div used for error styling */}\n <textarea\n id={id}\n value={props.value}\n onChange={props.onChange}\n rows={5}\n {...props.inputProps}\n />\n </div>\n </label>\n\n {/* Error message */}\n {props.error && (\n <span className=\"LuiTextAreaInput-error\">\n <LuiIcon\n alt=\"error\"\n name=\"ic_error\"\n className=\"LuiTextAreaInput-error-icon\"\n size=\"sm\"\n status=\"error\"\n />\n {props.error}\n </span>\n )}\n </div>\n );\n};\n","import React, { useEffect, useRef, useCallback } from 'react';\nimport Modal from 'react-modal';\n\nexport const LuiUpdatesSplashModal: React.FC<{\n bigImage: string;\n smallImage: string;\n header: string;\n onClose: () => void;\n id: string;\n}> = (props) => {\n const node = useRef(null);\n\n // We have to do this as the CSS takes over a lot of the page\n // https://medium.com/@pitipatdop/little-neat-trick-to-capture-click-outside-with-react-hook-ba77c37c7e82\n const handleClickOutside = useCallback(\n (e: any) => {\n console.log('clicking anywhere');\n // current DOES have a contains!\n if (node?.current && (node.current as any).contains(e.target)) {\n // inside click\n return;\n }\n // outside click\n props.onClose();\n },\n [props]\n );\n\n useEffect(() => {\n document.addEventListener('mousedown', handleClickOutside);\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [handleClickOutside]);\n\n if (process?.env?.NODE_ENV !== 'test') {\n Modal.setAppElement('#root');\n }\n\n return (\n <Modal\n key={props.id}\n isOpen={true}\n shouldCloseOnOverlayClick={true}\n onRequestClose={props.onClose}\n contentLabel=\"Recent updates\"\n className=\"lui-scrim\"\n style={{ overlay: { backgroundColor: 'transparent' } }}\n >\n <div ref={node} className=\"lui-large-feature-notification\">\n <div className=\"lui-feature-img\">\n <h1>{props.header}</h1>\n <button aria-label=\"Close dialog\" onClick={props.onClose}>\n <i className=\"material-icons-round\">close</i>\n </button>\n <img\n className=\"lui-hide-xs lui-hide-sm\"\n alt={\"What's new\"}\n src={props.bigImage}\n />\n <img\n className=\"lui-hide-md lui-hide-lg lui-hide-xl\"\n alt={\"What's new\"}\n src={props.smallImage}\n />\n </div>\n <div className={'lui-feature-text'}>{props.children}</div>\n </div>\n </Modal>\n );\n};\n","import React from 'react';\n\n/** \n * This hook will callback with handleClickOutside() when \"mousedown\" dom event occurs off the refElement\n * usage:\n ```typescript\n const refElement = React.useRef<HTMLButtonElement>(null);\n const handleClickOutside = () => {\n console.log(\"hello world\");\n };\n useClickedOutsideElement(refElement, handleClickOutside);\n return <button ref={refElement}>Click Me!</button>;\n ```\n */\nexport function useClickedOutsideElement(\n refElement: React.RefObject<HTMLElement>,\n handleClickOutside: CallableFunction\n): void {\n React.useEffect(() => {\n function onOutsideClicked(event: MouseEvent) {\n const element = refElement.current;\n if (!element?.contains(event.target as HTMLElement)) {\n handleClickOutside();\n }\n }\n document.addEventListener('mousedown', onOutsideClicked);\n return () => {\n document.removeEventListener('mousedown', onOutsideClicked);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\n"],"names":["LuiBannerContent","props","materialIcon","getMaterialIconForLevel","level","React","className","children","PlainButton","forwardRef","ref","buttonProps","type","title","disabled","name","onClick","clsx","size","style","LuiButton","_level","href","aProps","openInNewTab","target","rel","LuiToastMessage","displayTimeout","display","requireDismiss","onClose","useState","setClassname","undefined","fadeOutTimer","setFadeOutTimer","removeTimer","setRemoveTimer","callOnCloseAfterDissolved","timer","window","setTimeout","useEffect","clearTimeout","role","UIMessagingContext","createContext","showMessage","LuiExpandableBanner","useRef","collapse","setCollapse","labelPrefix","element","section","current","height","scrollHeight","sectionHeight","requestAnimationFrame","collapseSection","width","label","LuiTabsContext","activePanel","setActivePanel","LuiTab","active","id","ariaControls","ic_account_circle","xmlns","viewBox","d","ic_add_circle","ic_add_circle_outline","ic_arrow_back","ic_arrow_back_ios","ic_arrow_drop_down","ic_arrow_drop_up","ic_arrow_forward_ios","ic_attachment","ic_border_color","ic_check","ic_check_circle","ic_check_circle_outline","ic_clear","ic_corporate_fare","ic_create","ic_error","ic_error_outline","ic_expand_less","ic_expand_more","ic_filter_list","ic_flag","ic_forward","ic_insert_invitation","ic_insert_photo","ic_keyboard_arrow_down","ic_keyboard_arrow_left","ic_keyboard_arrow_right","ic_keyboard_arrow_up","ic_navigate_before","ic_navigate_next","ic_people_outline","ic_person","ic_person_add","ic_remove_circle","ic_remove_circle_outline","ic_send","ICONS","ic_publish","ic_view_week","ic_warning","ICON_SIZES","xs","sm","md","lg","xl","ns","ICON_STATUS","none","error","warning","success","interactive","LuiIcon","alt","status","spanProps","iconSVG","console","warn","e","t","n","r","document","a","s","prepend","singleTag","i","container","querySelector","getElementsByTagName","u","indexOf","push","c","charCodeAt","substring","styleSheet","cssText","appendChild","createTextNode","createElement","setAttribute","attributes","Object","keys","length","insertAdjacentElement","LuiError","useGenerateOrDefaultId","idFromProps","uuidv4","FileUploadInfo","DragAndDropInstruction","fileDescription","fileName","fileFormatText","LuiFormikFormLabel","htmlFor","required","tooltip","LuiFormikTextInput","connect","getIn","formik","errors","showError","touched","setFieldValue","useFormikContext","helperInfo","Field","validate","field","ErrorMessage","render","multiLine","rows","inputProps","onChange","event","value","validateOnChange","onValueChange","multiLineToggle","component","LuiFormikFormSubmitButton","LuiFormikSelect","defaultValue","as","LuiBearingInput","parseBearing","decimalIsh","sign","startsWith","parts","split","degrees","Math","abs","parseInt","remainder","minutes","substr","seconds","parseFloat","padToTwo","number","toString","bearing","signedDegrees","internalError","validationError","onValidate","newValue","match","RegExp","log","LuiLottieLight","animationData","rendererSettings","autoplay","loop","lottieInstance","lottie","loadAnimation","isChromatic","LuiLoadingSpinnerBase","position","top","left","zIndex","marginLeft","marginTop","preserveAspectRatio","LuiMiniSpinner","divProps","loaderData","LuiLoadingSpinner","navigator","userAgent","_window2","location","LuiComboSelect","LuiComboSelectActual","LuiLoadingIndicator","givenProps","assign","noOptionsMessage","inputValue","components","LoadingIndicator","selectProp","inputId","classNamePrefix","theme","colors","primary","primary75","primary50","primary25","neutral90","neutral80","neutral70","neutral60","neutral50","neutral40","neutral30","neutral20","neutral10","neutral5","danger","dangerLight","styles","control","provided","state","border","isFocused","borderColor","indicatorSeparator","input","minHeight","fontWeight","singleValue","color","placeholder","fontStyle","option","backgroundColor","isSelected","hideLabel","isCreateable","CreatableSelect","formatCreateLabel","createOptionPosition","Select","LuiShadow","HelpInfo","info","sizes","buildHideClassDict","from","upto","inRange","idx","LuiHeaderMenuItem","icon","badge","hide","dataTestId","menuItemClasses","resolvedIcon","LuiCloseableHeaderMenuContext","isOpen","open","close","LuiCloseableHeaderMenuItem","onEscape","escFunction","setOpen","useCallback","keyCode","addEventListener","removeEventListener","onClickInsideArg","onClickOutsideArg","elementRef","onClickInside","onClickOutside","menuDiv","stopPropagation","handleClick","_elementRef$current","contains","menuControls","menuItemProps","Provider","LuiDrawerMenuOption","menu","useContext","LuiDrawerMenu","restOfProps","hasStickyHeader","menuPropsCopy","closeableMenuProps","scrollTo","behavior","body","classList","add","remove","LuiDropdownMenu","LuiDrawerMenuSection","collapsible","cursor","LuiDrawerMenuDivider","LuiModal","node","handleClickOutside","shouldCloseOnOverlayClick","isTest","process","env","NODE_ENV","Modal","setAppElement","key","onRequestClose","overlayClassName","lowContrast","ariaHideApp","appendToElement","parentSelector","maxWidth","headingText","LuiModalHeader","runtime","exports","Op","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","generator","create","Generator","context","Context","_invoke","method","arg","Error","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","__await","then","unwrapped","TypeError","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","doneResult","constructor","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","useLOLUserContext","LOLUserContext","user","selectedFirm","changeFirm","firmId","isInternal","hasAnyPrivilege","reAuthUser","redirectPath","pathname","search","hash","encodeURIComponent","checkForStandardErrors","res","getSelectedFirmIdCache","localStorage","getItem","setSelectedFirmCache","firmName","removeItem","setItem","LuiFilterContainer","renderFunction","filterFunction","showFilter","filter","setFilter","useLOLGlobalClientRefContext","LOLGlobalClientRefContext","clientRef","changeClientRef","setGlobalClientRefCache","clientReference","sessionStorage","LOLFirmSwitcherMenuContent","firms","minimumFilterCount","FirmSwitcher","options","selectedId","onSelect","FirmOption","selected","busy","setBusy","onSelectInternal","optionId","filterString","upperCaseFilterString","trim","toUpperCase","firm","includes","filteredOptions","map","LOLLogoutLink","redirectPathString","fetch","LOLUserLastLogin","lastLogin","lastLoginISO","_context$user","Date","toLocaleString","LOLAuthorisedLink","activeIcon","path","openExternally","anyPrivileges","onClickHandler","src","ExternalIcon","createLink","LOLAppLauncherMenu","enableNOCLink","enableSurveyLink","enableTitlesLink","links","link","LOLDrawerMenuFirmSwitcher","LOLDrawerMenu","LOLCommonDrawerMenuAfterLinks","contextPath","url","LOLCommonMenuRequestsLink","getKey","visible","setVisible","showFrom","appSpecificLinks","appSpecificSections","showRequestsLink","showClientRef","clientRefElement","dropdownMenuProps","useUserIdAsClientReference","setClientRef","lastSelectedFirmId","setLastSelectedFirmId","cachedClientRef","useQuery","json","isLoading","data","isError","setSelectedFirm","ready","setReady","find","selectedFirmIdFromCache","selectedFirmDerivedFromCache","firstFirm","_data$user","f","loginType","code","privileges","userHasAnyPrivilege","onCachedFirmUpdate","storageArea","selectedFirmId","backgroundFill","variation","ctx","setError","renderProps","child","_props$inputProps","isChecked","checked","isDisabled","ControlledMenu","menuClassName","offsetY","header","content","footer","extensions","uppercaseExtensions","file","setFile","setHasFileFormatError","hasError","showMustSelectFileError","accept","acceptedExtensions","extension","join","files","selectedFile","ext","lastIndexOf","onValidFileSelected","customFileErrorMessage","useMenuState","toggleMenu","menuProps","menuButton","enabled","anchorRef","menuStyles","maxRows","maxHeight","overflowY","FocusableItem","filteredItems","item","specialType","MenuDivider","MenuHeader","MenuItem","onMouseDown","onItemClick","footerText","contactNumber","contactEmail","feedbackFormUrl","details","formikProps","classNames","Formik","Form","useField","meta","describedby","hint","camelcase","errorDescribedBy","legend","homeLink","transparent","sticky","logoElement","logoContainer","loaderDataChristmas","loaderDataEaster","Menu","classes","_message","setMessage","_messageType","setMessageType","_messageLevel","setMessageLevel","_requireDismiss","setRequireDismiss","message","messageType","messageLevel","renderMessage","index","radioId","selectedValue","isOptionDisabled","renderLabelFor","selectProps","_props$selectProps","mandatory","placeholderText","selection","setDisplay","closable","textAlign","defaultPanel","justify","ariaLabel","panel","targetPanel","showPadlockIcon","min","placement","trigger","animation","useMemo","tippy","arrow","offset","getElementById","_tippy","destroy","contentLabel","overlay","bigImage","smallImage","refElement","onOutsideClicked"],"mappings":"gmBAeaA,EAAmB,SAACC,OAC3BC,EAAeC,EAAwBF,EAA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