@deviceinsight/ng-ui-components 7.20.0 → 7.20.1
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.
- package/dist/index.cjs +30 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -10
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/messageBox/messageBox.d.ts +8 -2
- package/dist/types/modules/messageBox/messageBox.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/modules/messageBox/messageBox.tsx","../src/modules/utils/uuidGen.ts","../src/modules/utils/nanoidGen.ts","../src/i18n/index.ts","../src/components/treeview/treeutils.ts","../src/components/colorpicker/ColorPickerPopper.tsx","../src/components/colorpicker/GridColorPicker.tsx","../src/components/input/ValidatedTextInput.tsx","../src/components/colorpicker/ColorTextInput.tsx","../src/components/colorpicker/GradientColorPicker.tsx","../src/utils/dayjsLocales.ts","../src/components/input/DateInput.tsx","../src/components/input/UrnInput.tsx","../src/components/prompt/Prompt.tsx","../src/components/prompt/withPrompt.tsx","../src/components/link/RouteLink.tsx","../src/components/infobox/InfoBox.tsx","../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../src/utils/resolvePath.ts","../src/components/tabs/RouteTabs.tsx","../src/assets/img/icon_folder_open.png","../src/assets/img/icon_folder_closed.png","../src/assets/svg/icon_folder_loading.svg","../src/assets/img/icon_variablenode.png","../src/components/treeview/constants.ts","../src/components/treeview/components/NodeInfo.tsx","../src/components/treeview/components/Node.tsx","../src/components/treeview/TreeView.tsx","../src/assets/svg/icon_menu_vertical.svg","../src/components/multiMenu/components/MultiMenuContext.ts","../src/components/multiMenu/MultiMenu.tsx","../src/components/pagination/Pagination.tsx","../src/components/input/SelectWithSearch.tsx","../src/components/reactable/helpers/ReactableTextFilter.tsx","../src/components/reactable/helpers/helper.tsx","../src/components/reactable/helpers/ReactableTableFilterRow.tsx","../src/components/reactable/helpers/ReactableTableHeader.tsx","../src/components/reactable/helpers/ReactableTableRow.tsx","../src/components/reactable/helpers/ReactableTable.tsx","../src/components/reactable/Reactable.tsx","../src/components/reactableWithClientSidePagination/ReactableWithClientSidePagination.tsx","../src/components/upload/FileUpload.tsx","../src/components/upload/ImageUpload.tsx","../src/assets/img/icon-arrow-back.png","../src/components/contentHeader/ContentHeader.tsx","../src/components/input/DateTimeInput.tsx","../src/components/input/SelectWithSearchAsync.tsx","../src/components/multiMenu/components/MultiMenuItem.tsx","../src/components/periodpicker/components/Inputs.tsx","../src/components/periodpicker/components/MonthPicker.tsx","../src/assets/svg/icon_calendar.svg","../src/assets/svg/triangle_down.svg","../src/components/periodpicker/periods.ts","../src/components/periodpicker/components/Menu.tsx","../src/components/periodpicker/usePeriodName.ts","../src/components/periodpicker/PeriodPicker.tsx","../src/components/svg/utils/findConflicts.ts","../src/components/svg/utils/createHyperlinkModification.ts","../src/components/svg/utils/getMutableNodeList.ts","../src/components/svg/utils/transformPositionModifications.ts","../src/components/svg/utils/createPositionModification.ts","../src/components/svg/utils/renderSvg.ts","../src/components/svg/SvgImage.tsx","../src/components/svg/utils/getSvgElement.ts","../src/components/svg/utils/validateSvg.ts","../src/components/chart/Chart.tsx","../node_modules/@rc-component/util/lib/raf.js","../src/components/slider/RcSliderWithTooltip.tsx","../src/components/slider/useLimitStyling.ts","../src/components/slider/Slider.tsx"],"sourcesContent":["import {toast, ToastContent, ToastOptions, ToastContainer, Slide} from 'react-toastify/unstyled';\n\nimport 'react-toastify/dist/ReactToastify.css';\nimport './react-toastify-custom.css';\n\nlet groupNamesToToastIds: Record<string, Array<string | number>> = {};\n\nlet globalErrorMessageBoxOptions: ToastOptions = {\n\tautoClose: false\n};\n\nexport const setGlobalErrorMessageBoxOptions = (options: ToastOptions): void => {\n\tglobalErrorMessageBoxOptions = options;\n};\n\nconst storeGroupName = (groupName: string, toastId: string | number) => {\n\tif (groupName) {\n\t\tif (groupNamesToToastIds[groupName]) {\n\t\t\tgroupNamesToToastIds[groupName] = [...groupNamesToToastIds[groupName], toastId];\n\t\t} else {\n\t\t\tgroupNamesToToastIds[groupName] = [toastId];\n\t\t}\n\t}\n};\n\nexport const messageBoxSuccess = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\tconst toastId = toast.success(content, options);\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxInfo = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\tconst toastId = toast.info(content, options);\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxWarn = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\tconst toastId = toast.warn(content, options);\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxError = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\t// default is autoClose=false to force the user to close errors\n\tconst toastId = toast.error(content, {...globalErrorMessageBoxOptions, ...options});\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxDismissSingle = (id: number): void => {\n\ttoast.dismiss(id);\n};\n\nexport const messageBoxDismissGroup = (groupName: string): void => {\n\tif (groupNamesToToastIds[groupName]) {\n\t\tgroupNamesToToastIds[groupName].forEach((toastId) => toast.dismiss(toastId));\n\t\tdelete groupNamesToToastIds[groupName];\n\t}\n};\n\nexport const messageBoxDismissAll = (): void => {\n\tgroupNamesToToastIds = {};\n\ttoast.dismiss();\n};\n\nexport const MessageBoxContainer = () => (\n\t<ToastContainer position=\"top-center\" theme=\"colored\" autoClose={30000} hideProgressBar={true} transition={Slide} />\n);\n","export const uuidV4 = (length = 32): string => {\n\tlet uuid = '';\n\n\tfor (let i = 0; i < length; i++) {\n\t\tconst random = (Math.random() * 16) | 0;\n\n\t\tif (i === 8 || i === 12 || i === 16 || i === 20) {\n\t\t\tuuid += '-';\n\t\t}\n\n\t\tuuid += (i === 12 ? 4 : i === 16 ? (random & 3) | 8 : random).toString(16);\n\t}\n\n\treturn uuid;\n};\n","import {customAlphabet} from 'nanoid';\n\nconst alphabet = '0123456789abcdefghijklmnopqrstuvwxyz';\n\nexport const nanoid10: () => string = customAlphabet(alphabet, 10);\n","import {TOptions} from 'i18next';\nimport {useTranslation as useReactI18NextTranslation, Trans as ReactTrans} from 'react-i18next';\n\nexport let Trans: typeof ReactTrans;\nexport let useTranslation: UseTranslation;\n\ntype UseTranslation = typeof useReactI18NextTranslation;\n\nexport type TFunction = (key: string, options?: TOptions, context?: any) => string;\n\nexport function initializeTranslation(transComponent: typeof ReactTrans, useTranslationHook: UseTranslation) {\n\tTrans = transComponent;\n\tuseTranslation = useTranslationHook;\n}\n","/* eslint-disable */\nimport {Tree, NodeId, DataSetConfig} from './types';\n\nexport function removeDuplicatesFromArray<T>(arr: Array<T>): Array<T> {\n\treturn arr.filter((id, index, arr) => arr.indexOf(id) === index);\n}\n\nexport function removeNodeIds(nodeIds: Array<NodeId>, nodeIdsToRemove: Array<NodeId>): Array<NodeId> {\n\treturn nodeIds.filter((id) => !nodeIdsToRemove.includes(id));\n}\n\n/**\n * Returns the union of two arrays. Examples\n * [1,2,3] u [2,3,4,5] -> [1,2,3,4,5]\n * @param {Array<NodeId>} nodeIds1 An array of string or integers defining the nodeid\n * @param {Array<NodeId>} nodeIds2 An array of string or integers defining the nodeid\n */\nexport function mergeNodeIdArrays(nodeIds1: Array<NodeId>, nodeIds2: Array<NodeId>): Array<NodeId> {\n\treturn removeDuplicatesFromArray([...nodeIds1, ...nodeIds2]);\n}\n\n/**\n * Returns the intersection of two arrays. Example\n * [1,2,3] n [2,3,4,5] -> [2,3]\n * @param {Array} array1\n * @param {Array} array2\n */\nexport function intersectArrays<T>(array1: Array<T>, array2: Array<T>): Array<T> {\n\treturn array1.filter((value) => array2.includes(value));\n}\n\n/**\n * Returns the count of all leaves in the tree @node\n * @param {Tree} node tree to calculate the treesize for\n */\nexport function getTreeSize(node: Tree): number {\n\tif (node.children) {\n\t\tconst numberOfChildren = node.children.length;\n\t\treturn numberOfChildren + node.children.reduce((l, child) => l + getTreeSize(child), 0);\n\t}\n\n\treturn 0;\n}\n\n/**\n * Returns the leaves of the tree given by @node\n * @param {Tree} node The root node of the tree that should be processed\n */\nexport function getAllLeaves(node: Tree): Array<Tree> {\n\tif (node.children) {\n\t\treturn node.children.reduce((childNodes: Array<Tree>, child) => [...childNodes, ...getAllLeaves(child)], []);\n\t}\n\n\treturn [node];\n}\n\n/**\n * Returns the ids of all leaves of the tree given by @node\n * @param {Tree} node The root node of the tree that should be processed\n */\nexport function getAllLeafIds(node: Tree): Array<NodeId> {\n\treturn getAllLeaves(node).map((node) => node.id);\n}\n\n/**\n * Returns a function that converts an arbitrary hierarchical tree data structure into a treestructure\n * that is processable by the * @Node component. The properties defined in @childNodeKey , @idKey ,\n * @displayNameKey , @typeKey are injected into the returned function @convert . The @convert function\n * returns a new tree of the same structure of smaller size with different parameters.\n *\n * @param {string} childNodeKey The name of the property that holds child nodes\n * @param {string} idKey The name of the property of the node identifier\n * @param {string} displayNameKey The name of the property of the node's name\n * @param {string} typeKey The name of the property to decide if it is a leaf or a \"folder\" node\n * @param {string} lazyLoadableKey\n * @param {ExpandableNode} nodeMetaData An object containing the value for the node's property @typeKey as well as image paths\n * @param {Leaf} leafMetaData An object containing the value for the node's property @typeKey as well as image paths\n */\nexport function convertToTree<T>({\n\tchildNodeKey,\n\tidKey,\n\tdisplayNameKey,\n\ttypeKey,\n\tlazyLoadableKey,\n\tnodeMetaData,\n\tleafMetaData\n}: DataSetConfig): (hierarchicalData: Array<any>, nodePath?: string) => Array<Tree> {\n\tconst {typeValue: leafTypeValue, image, resolver: leafResolver} = leafMetaData;\n\tconst {typeValue: nodeTypeValue, expandedImage, closedImage, resolver: nodeResolver} = nodeMetaData;\n\treturn function convert(hierarchicalData: Array<any>, nodePath = ''): Array<Tree> {\n\t\treturn hierarchicalData.map((rootNode) => {\n\t\t\tconst id = rootNode[idKey];\n\t\t\tconst name = rootNode[displayNameKey];\n\t\t\tconst children = rootNode[childNodeKey];\n\t\t\tconst lazyLoadable = rootNode[lazyLoadableKey];\n\t\t\tconst isNode = nodeResolver ? nodeResolver(rootNode) : rootNode[typeKey] === nodeTypeValue;\n\t\t\tconst isLeaf = leafResolver ? leafResolver(rootNode) : rootNode[typeKey] === leafTypeValue;\n\t\t\tconst path = `${nodePath}/${name}`;\n\t\t\tconst originalNode = rootNode;\n\n\t\t\tif (isNode) {\n\t\t\t\treturn {\n\t\t\t\t\tid,\n\t\t\t\t\tname,\n\t\t\t\t\tchildren: convert(children || [], path),\n\t\t\t\t\tlazyLoadable,\n\t\t\t\t\texpandedImage,\n\t\t\t\t\tclosedImage,\n\t\t\t\t\tpath,\n\t\t\t\t\toriginalNode\n\t\t\t\t};\n\t\t\t} else if (isLeaf) {\n\t\t\t\treturn {\n\t\t\t\t\tid,\n\t\t\t\t\tname,\n\t\t\t\t\timage,\n\t\t\t\t\tpath,\n\t\t\t\t\toriginalNode\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthrow new Error('unknown node or leaf type provided');\n\t\t});\n\t};\n}\n\n/**\n * Merges the properties of @node with the properties of @patch .\n * @param {Tree} node The single node to apply the patch against\n * @param {Tree} patch An object holding new properties and additional children for the node\n */\nfunction patchNode(node: Tree, patch: Partial<Tree>) {\n\tlet patchedChildren;\n\n\tif (patch.children !== undefined) {\n\t\tif (node.children !== undefined) {\n\t\t\tpatchedChildren = [...node.children, ...patch.children];\n\t\t} else {\n\t\t\tpatchedChildren = [...patch.children];\n\t\t}\n\t}\n\n\treturn {...node, ...patch, children: patchedChildren || undefined};\n}\n\n/**\n * Find the node with @nodeId in the tree @node and replace properties defined in the provided @patch .\n * If the node with id @nodeId is not found the tree is returned with the same structure.\n * In any case (@nodeId is found or not found) a new object is created and returned, containing the resulting tree.\n *\n * @param {Tree} node The initial tree to add children on\n * @param {NodeId} nodeId The specific node id of the node to add the children\n * @param {Array<Tree>} patch An object containing Tree properties to change on the node with id @nodeId\n */\nexport function findNodeAndApplyPatch(node: Tree, nodeId: NodeId, patch: Partial<Tree>): Tree {\n\tif (node.children === undefined) {\n\t\treturn node;\n\t}\n\n\tif (node.id === nodeId) {\n\t\treturn patchNode(node, patch);\n\t}\n\n\treturn {...node, children: node.children.map((childNode) => findNodeAndApplyPatch(childNode, nodeId, patch))};\n}\n\nfunction getTreeNodePathByIdArray(\n\tcurrentNode: any,\n\tidToFind: string,\n\tidKey: string,\n\tchildNodeKey: string,\n\tdisplayNameKey: string\n): Array<string> | null | undefined {\n\tif (currentNode[idKey] === idToFind) {\n\t\treturn [currentNode[displayNameKey]];\n\t} else if (currentNode[childNodeKey]) {\n\t\tfor (let i = 0; i < currentNode[childNodeKey].length; i++) {\n\t\t\tconst path = getTreeNodePathByIdArray(\n\t\t\t\tcurrentNode[childNodeKey][i],\n\t\t\t\tidToFind,\n\t\t\t\tidKey,\n\t\t\t\tchildNodeKey,\n\t\t\t\tdisplayNameKey\n\t\t\t);\n\n\t\t\tif (path) {\n\t\t\t\tpath.unshift(currentNode[displayNameKey]);\n\t\t\t\treturn path;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n\nexport function getTreeNodePathById(\n\tcurrentNode: any,\n\tidToFind: string,\n\tidKey: string,\n\tchildNodeKey: string,\n\tdisplayNameKey: string\n): null | string {\n\tconst nodePathArray = getTreeNodePathByIdArray(currentNode, idToFind, idKey, childNodeKey, displayNameKey);\n\treturn nodePathArray ? nodePathArray.join('.') : null;\n}\n","import {Placement, Popup} from '@deviceinsight/ng-ui-basic-components';\nimport {CSSProperties, PropsWithChildren} from 'react';\n\ntype Props = {\n\tisOpen: boolean;\n\tonOpenChange: (open: boolean) => void;\n\tvalue?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tplacement?: Placement;\n};\n\nexport default function ColorPickerPopper({\n\tisOpen,\n\tonOpenChange,\n\tclassName,\n\tstyle,\n\tvalue,\n\tplacement,\n\tchildren\n}: PropsWithChildren<Props>) {\n\treturn (\n\t\t<Popup\n\t\t\thandler={\n\t\t\t\t<div className={`di color-picker-popper ${className || ''}`} style={style}>\n\t\t\t\t\t<div className=\"trigger\" style={{...style, backgroundColor: value}} />\n\t\t\t\t</div>\n\t\t\t}\n\t\t\topen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tplacement={placement}\n\t\t>\n\t\t\t<div className=\"color-picker-box\">\n\t\t\t\t<div className=\"content\">{children}</div>\n\t\t\t</div>\n\t\t</Popup>\n\t);\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport {Placement} from '@deviceinsight/ng-ui-basic-components';\n\nimport ColorPickerPopper from './ColorPickerPopper';\n\nexport type Props = {\n\t/** if set to false, a popper component will be shown */\n\tinline?: boolean;\n\n\t/** the current value - only RGB(A) */\n\tvalue?: string;\n\n\t/** an array of colors, e.g. `['#88cc00', '#ffeb3c', '#fec107']` */\n\tcolors: Array<string>;\n\n\t/** callback function that is executed when the user picks a color */\n\tonPick: (color: string) => void;\n\n\t/** if true and inline is false, the color picker popup will be shown on init */\n\tisOpen?: boolean;\n\n\t/** if a function is provided and inline is false, the function will be called when the popper open state changes */\n\tonOpenStateChange?: (arg0: boolean) => void;\n\n\t/** styles for the popper component */\n\tstyle?: React.CSSProperties;\n\n\t/** styles for the colorpicker */\n\tpickerStyle?: React.CSSProperties;\n\n\t/** class for the popper component */\n\tclassName?: string;\n\n\t/** class for the colorpicker */\n\tpickerClassName?: string;\n\n\t/** where to align the popper component */\n\tdirection?: Placement;\n};\n\n/**\n * Unlike the GradientColorPicker, the GridColorPicker uses a predefined set of colors.\n * The colors can be defined individually for each GridColorPicker and passed in as prop.\n * Each line can take up to five cells.\n * The cell width within the grid is then calculated automatically via the `styles` prop.\n */\nexport default function GridColorPicker({\n\tvalue,\n\tisOpen,\n\tonOpenStateChange,\n\tdirection,\n\tcolors,\n\tonPick,\n\tpickerStyle,\n\tpickerClassName,\n\tinline = true,\n\tclassName,\n\tstyle\n}: Props) {\n\tconst [open, setOpen] = useState(false);\n\n\tconst picker = (\n\t\t<div className={classNames('di color-picker grid-color-picker clearfix', pickerClassName)} style={pickerStyle}>\n\t\t\t{colors.map((color) => (\n\t\t\t\t<div\n\t\t\t\t\tkey={color}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tonPick(color);\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={`color ${color === value ? 'selected' : ''}`}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: color\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n\n\tif (inline) {\n\t\treturn picker;\n\t}\n\n\treturn (\n\t\t<ColorPickerPopper\n\t\t\tclassName={className}\n\t\t\tstyle={style}\n\t\t\tvalue={value}\n\t\t\tisOpen={isOpen ?? open}\n\t\t\tonOpenChange={onOpenStateChange ?? setOpen}\n\t\t\tplacement={direction}\n\t\t>\n\t\t\t{picker}\n\t\t</ColorPickerPopper>\n\t);\n}\n","import * as React from 'react';\n\nconst isValid = (value: string, pattern: RegExp, required: boolean): boolean => {\n\tif (!value.length) {\n\t\treturn !required;\n\t}\n\n\treturn pattern.test(value);\n};\n\nexport type Props = {\n\t/** Value of the input field */\n\tvalue: string;\n\n\t/** Function, executed on change, takes value and valid as arguments */\n\tonChange: (value: string, valid: boolean) => void;\n\n\t/** Pattern to validate the input */\n\tpattern: RegExp;\n\n\t/** If true, marks the input field as mandatory */\n\trequired: boolean;\n\n\t/** Placeholder */\n\tplaceholder: string;\n\n\t/** @ignore */\n\tstyle?: React.CSSProperties;\n\n\t/** @ignore */\n\tclassName?: string;\n\n\t/** @ignore */\n\tonBlur?: () => void;\n\n\t/** @ignore */\n\tdisabled?: boolean;\n\n\t/** (Optional) sets custom styles if the input field's value isn't valid */\n\tinvalidStyle?: React.CSSProperties;\n};\n\n/**\n * ValidatedTextInput provides an easy way to validate a text inputs value for a certain pattern.\n * This is best used for any form of forms.\n */\nexport default class ValidatedTextInput extends React.Component<Props> {\n\tstatic defaultProps: {\n\t\trequired: boolean;\n\t} = {\n\t\trequired: false\n\t};\n\n\thandleChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\n\t\tconst {value} = e.target as HTMLInputElement;\n\t\tconst {pattern, required, onChange} = this.props;\n\t\tconst valid = isValid(value, pattern, required);\n\t\tonChange(value, valid);\n\t};\n\n\trender() {\n\t\tconst {style, invalidStyle, value, ...props} = this.props;\n\t\tconst {pattern, required, ...otherProps} = props;\n\t\treturn (\n\t\t\t<input\n\t\t\t\t{...otherProps}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={this.handleChange}\n\t\t\t\tstyle={isValid(value, pattern, required) ? style : {...style, ...invalidStyle}}\n\t\t\t\ttype=\"text\"\n\t\t\t/>\n\t\t);\n\t}\n}\n","import {CSSProperties, useEffect, useState} from 'react';\nimport ValidatedTextInput from '../input/ValidatedTextInput';\n\ntype Props = {\n\tvalue: string;\n\tpattern: RegExp;\n\tonChange: (color: string) => void;\n\tplaceholder: string;\n\tstyle?: CSSProperties;\n};\n\nexport function ColorTextInput({value, pattern, onChange, placeholder, style}: Props) {\n\tconst [text, setText] = useState(value);\n\n\tuseEffect(() => {\n\t\t \n\t\tsetText(value);\n\t}, [value]);\n\n\tfunction handleChange(value: string, valid: boolean) {\n\t\tsetText(value);\n\t\tif (valid) {\n\t\t\tonChange(value);\n\t\t}\n\t}\n\n\treturn (\n\t\t<ValidatedTextInput\n\t\t\tvalue={text}\n\t\t\tonChange={handleChange}\n\t\t\tpattern={pattern}\n\t\t\tinvalidStyle={{\n\t\t\t\tborderColor: 'red'\n\t\t\t}}\n\t\t\tplaceholder={placeholder}\n\t\t\trequired\n\t\t\tstyle={style}\n\t\t/>\n\t);\n}\n","import {useState} from 'react';\nimport {convert, parse} from 'pure-color';\nimport classNames from 'classnames';\nimport {RgbaStringColorPicker, RgbStringColorPicker, HexColorPicker} from 'react-colorful';\n\nimport ColorPickerPopper from './ColorPickerPopper';\nimport {ColorTextInput} from './ColorTextInput';\nimport {Placement} from '@deviceinsight/ng-ui-basic-components';\n\nconst VALIDATE_HEX_COLOR_REGEX = /^#([A-Fa-f0-9]{6})$/;\nconst VALIDATE_RGB_COLOR_REGEX = /^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/;\n\nexport type Props = {\n\t/** if set to false, a popper component will be shown */\n\tinline?: boolean;\n\n\t/** the current value - only RGB(A) */\n\tvalue?: string;\n\n\t/** shows the opacity slider */\n\topacitySlider?: boolean;\n\n\t/** callback function that is executed when the user picks a color */\n\tonPick: (color: string) => void;\n\n\t/** if true and inline is false, the colorpicker popup will be shown on init */\n\tisOpen?: boolean;\n\n\t/** if a function is provided and inline is false, the function will be called when the popper open state changes */\n\tonOpenStateChange?: (arg0: boolean) => void;\n\n\t/** if true, the user can also add hex color via text input - cannot be used with opacity slider */\n\tallowTextInput?: boolean;\n\n\t/** styles for the popper component */\n\tstyle?: React.CSSProperties;\n\n\t/** styles for the colorpicker */\n\tpickerStyle?: React.CSSProperties;\n\n\t/** class for the popper component */\n\tclassName?: string;\n\n\t/** class for the colorpicker */\n\tpickerClassName?: string;\n\n\t/** where to align the popper component */\n\tdirection?: Placement;\n};\n\nconst convertRgbaToRgb = (color: string): Array<number> => {\n\treturn parse(color).splice(0, 3);\n};\n\nconst convertToHex = (color?: string): string => {\n\treturn color && color.length > 6 ? convert.rgb.hex(convertRgbaToRgb(color)) : '';\n};\n\nconst convertToRgb = (color?: string): string => {\n\treturn color ? convert.rgb.string(convertRgbaToRgb(color)) : '';\n};\n\n/**\n * The GradientColorPicker provides the functionality to generate any valid RGB color.\n * This is especially useful for setting and defining a custom color.\n */\nexport default function GradientColorPicker({\n\tonOpenStateChange,\n\tonPick,\n\tallowTextInput,\n\tclassName,\n\tdirection,\n\tinline = true,\n\tisOpen,\n\topacitySlider,\n\tpickerClassName,\n\tpickerStyle,\n\tstyle,\n\tvalue\n}: Props) {\n\tconst [open, setOpen] = useState(false);\n\tconst hexValue = convertToHex(value);\n\tconst rgbValue = convertToRgb(value);\n\n\tconst ColorPicker =\n\t\tvalue === hexValue\n\t\t\t? HexColorPicker\n\t\t\t: opacitySlider && !allowTextInput\n\t\t\t\t? RgbaStringColorPicker\n\t\t\t\t: RgbStringColorPicker;\n\n\tconst picker = (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'di gradient-color-picker',\n\t\t\t\t{\n\t\t\t\t\t'with-textfield': allowTextInput\n\t\t\t\t},\n\t\t\t\tpickerClassName\n\t\t\t)}\n\t\t\tstyle={pickerStyle}\n\t\t>\n\t\t\t<ColorPicker color={value} onChange={onPick} />\n\t\t\t{allowTextInput && (\n\t\t\t\t<div className=\"inputs\">\n\t\t\t\t\t<ColorTextInput\n\t\t\t\t\t\tvalue={hexValue}\n\t\t\t\t\t\tonChange={onPick}\n\t\t\t\t\t\tpattern={VALIDATE_HEX_COLOR_REGEX}\n\t\t\t\t\t\tplaceholder=\"#FF00FF\"\n\t\t\t\t\t\tstyle={{width: 60}}\n\t\t\t\t\t/>\n\t\t\t\t\t<ColorTextInput\n\t\t\t\t\t\tvalue={rgbValue}\n\t\t\t\t\t\tonChange={onPick}\n\t\t\t\t\t\tpattern={VALIDATE_RGB_COLOR_REGEX}\n\t\t\t\t\t\tplaceholder=\"rgb(255,0,255)\"\n\t\t\t\t\t\tstyle={{width: 115}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tif (inline) {\n\t\treturn picker;\n\t}\n\n\treturn (\n\t\t<ColorPickerPopper\n\t\t\tclassName={className}\n\t\t\tstyle={style}\n\t\t\tvalue={value}\n\t\t\tisOpen={isOpen ?? open}\n\t\t\tonOpenChange={onOpenStateChange ?? setOpen}\n\t\t\tplacement={direction}\n\t\t>\n\t\t\t{picker}\n\t\t</ColorPickerPopper>\n\t);\n}\n","import 'dayjs/locale/en';\nimport 'dayjs/locale/en-gb';\nimport 'dayjs/locale/en-ca';\nimport 'dayjs/locale/de';\nimport 'dayjs/locale/de-at';\nimport 'dayjs/locale/de-ch';\nimport 'dayjs/locale/it';\nimport 'dayjs/locale/ja';\n\nconst supportedLocales = ['en', 'en-gb', 'en-ca', 'de', 'de-at', 'de-ch', 'it', 'ja'];\n\nexport function isLocaleSupported(locale: string) {\n\treturn supportedLocales.includes(locale);\n}\n","import {CSSProperties, forwardRef, useCallback, useEffect, useMemo, useState} from 'react';\nimport timezone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\nimport DatePicker, {registerLocale} from 'react-datepicker';\nimport {debounce} from 'lodash';\nimport dayjs from 'dayjs';\nimport localeData from 'dayjs/plugin/localeData';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport i18n from 'i18next';\nimport cx from 'classnames';\nimport {useTranslation} from '../../i18n';\nimport * as Locales from 'date-fns/locale';\n\nimport {Button, Icon, Popup} from '@deviceinsight/ng-ui-basic-components';\n\nimport 'react-datepicker/dist/react-datepicker.css';\nimport './react-datepicker-custom.css';\nimport {isLocaleSupported} from '../../utils/dayjsLocales';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(localeData);\ndayjs.extend(localizedFormat);\ndayjs.extend(customParseFormat);\n\nfunction registerLanguage(locale: string) {\n\tconst [localeSegment1, localeSegment2] = locale.split('-');\n\n\tlet module;\n\tif (localeSegment1 && localeSegment2) {\n\t\t// @ts-ignore\n\t\tmodule = Locales[`${localeSegment1}${localeSegment2}`] ?? Locales[localeSegment1];\n\t} else if (localeSegment1) {\n\t\t// @ts-ignore\n\t\tmodule = Locales[localeSegment1];\n\t} else {\n\t\tmodule = null;\n\t}\n\n\tif (module) {\n\t\tregisterLocale(locale, module);\n\t}\n}\n\nasync function changeDayjsLocale(locale: string) {\n\tlet dayjsLocale = null;\n\tconst [localeSegment1] = locale.split('-');\n\tif (isLocaleSupported(locale.toLowerCase())) {\n\t\tdayjsLocale = locale.toLowerCase();\n\t} else if (isLocaleSupported(localeSegment1.toLowerCase())) {\n\t\tdayjsLocale = localeSegment1.toLowerCase();\n\t}\n\n\tif (dayjsLocale) {\n\t\tdayjs.locale(dayjsLocale);\n\t}\n}\n\ntype Props = {\n\t/** the current value (millis since 1970-01-01 or formatted string) */\n\tvalue: number | string | null | undefined;\n\n\t/** (optional) timezone */\n\ttimezone?: string;\n\n\t/** callback function that is executed when the user picks a date */\n\tonChange: (date: number | null | undefined, fromTextField?: boolean) => void;\n\n\t/** makes the input field clearable */\n\tclearable?: boolean;\n\n\t/** displays the date picker inline */\n\tinline?: boolean;\n\n\t/** displays the DateInput read only */\n\treadOnly?: boolean;\n\n\t/** (optional) class name for the wrapping elements */\n\twrapperClassName?: string;\n\n\t/** (optional) locale, if not set, the i18next.language is taken */\n\tlocale?: string;\n\n\t/** (optional) minimum selectable date */\n\tminDate?: Date;\n\n\t/** (optional) maximum selectable date */\n\tmaxDate?: Date;\n\n\tstyle?: CSSProperties;\n};\n\nfunction isInputValid(value: number | string | null | undefined, pattern: string) {\n\tif (value == null || value === '') {\n\t\treturn true;\n\t}\n\tif (typeof value === 'number') {\n\t\treturn !isNaN(value);\n\t}\n\tif (typeof value === 'string') {\n\t\treturn dayjs(value, pattern, true).isValid();\n\t}\n\treturn false;\n}\n\nfunction inputToDate(\n\tvalue: number | string | null | undefined,\n\tpattern: string,\n\ttimezone: string | undefined\n): Date | null {\n\tif (typeof value === 'number' && !Number.isNaN(value)) {\n\t\treturn new Date(value);\n\t}\n\tif (typeof value === 'string' && dayjs(value, pattern, true).isValid()) {\n\t\treturn dayjs.tz(value, pattern, timezone).toDate();\n\t}\n\treturn null;\n}\n\nfunction inputToTzDate(\n\tvalue: number | string | null | undefined,\n\tpattern: string,\n\ttimezone: string | undefined\n): dayjs.Dayjs | null {\n\tif (typeof value === 'number') {\n\t\treturn dayjs.tz(value, timezone);\n\t}\n\tif (typeof value === 'string' && dayjs(value, pattern, true).isValid()) {\n\t\treturn dayjs.tz(value, pattern, timezone);\n\t}\n\treturn null;\n}\n\n/**\n * DateInput is used to let users set a date conveniently.\n * Usually the user's locale is used for displaying the correct date format.\n */\nconst DateInput = forwardRef<HTMLInputElement, Props>(\n\t({value, clearable, inline, readOnly, wrapperClassName, onChange, locale, timezone, ...otherProps}, ref) => {\n\t\tconst [pattern, setPattern] = useState<string>(dayjs.localeData().longDateFormat('L'));\n\t\tconst {t} = useTranslation();\n\t\tconst [valid, setValid] = useState(false);\n\t\tconst [popupOpen, setPopupOpen] = useState(false);\n\t\tconst [inputText, setInputText] = useState('');\n\n\t\tconst debouncedSetPopupActive = useMemo(() => debounce(setPopupOpen, 30), []);\n\n\t\tuseEffect(() => {\n\t\t\tconst language = locale ?? i18n.language;\n\n\t\t\tif (language) {\n\t\t\t\tregisterLanguage(language);\n\t\t\t\tchangeDayjsLocale(language).then(() => setPattern(dayjs.localeData().longDateFormat('L')));\n\t\t\t}\n\t\t}, [locale]);\n\n\t\tconst formattedDate = useCallback(\n\t\t\t(value: number | string | null | undefined) => {\n\t\t\t\tif (value == null || value == '') {\n\t\t\t\t\treturn '';\n\t\t\t\t} else if (!isInputValid(value, pattern)) {\n\t\t\t\t\treturn t('dateInput.invalidDate', {\n\t\t\t\t\t\tdefaultValue: 'invalid date'\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\treturn typeof value === 'number' ? dayjs.tz(value, timezone).format(pattern) : value;\n\t\t\t\t}\n\t\t\t},\n\t\t\t[pattern, t, timezone]\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tif (value == null) {\n\t\t\t\tsetInputText('');\n\t\t\t} else {\n\t\t\t\tsetInputText(formattedDate(value));\n\t\t\t}\n\t\t}, [formattedDate, value]);\n\n\t\tuseEffect(() => {\n\t\t\tsetValid(isInputValid(value, pattern));\n\t\t}, [pattern, value]);\n\n\t\tuseEffect(() => {\n\t\t\tdayjs.locale(locale ?? i18n.language);\n\t\t\tsetPattern(dayjs.localeData().longDateFormat('L'));\n\t\t}, [locale]);\n\n\t\tconst handleInputTextChange = (text: string) => {\n\t\t\tsetInputText(text);\n\n\t\t\tif (text) {\n\t\t\t\tconst valid = dayjs(text, pattern, true).isValid();\n\n\t\t\t\tif (valid) {\n\t\t\t\t\tconst prevDate = inputToTzDate(value, pattern, timezone);\n\t\t\t\t\tconst newDate = dayjs.tz(text, pattern, timezone ?? dayjs.tz.guess());\n\t\t\t\t\tif (prevDate) {\n\t\t\t\t\t\tnewDate.set('hour', prevDate.hour());\n\t\t\t\t\t\tnewDate.set('minute', prevDate.minute());\n\t\t\t\t\t\tnewDate.set('second', prevDate.second());\n\t\t\t\t\t\tnewDate.set('millisecond', prevDate.millisecond());\n\t\t\t\t\t}\n\t\t\t\t\tonChange(newDate.valueOf(), true);\n\t\t\t\t}\n\n\t\t\t\tsetValid(valid);\n\t\t\t} else {\n\t\t\t\tonChange(null, true);\n\t\t\t\tsetValid(true);\n\t\t\t}\n\t\t};\n\n\t\tconst handlePickerChange = (date: Date | null | undefined) => {\n\t\t\tonChange(date ? date.valueOf() : null);\n\t\t\tsetInputText(formattedDate(date ? date.getTime() : null));\n\t\t\tsetPopupOpen(false);\n\t\t};\n\n\t\tconst handleClear = () => handleInputTextChange('');\n\n\t\tif (inline) {\n\t\t\treturn (\n\t\t\t\t<DatePicker\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tonChange={handlePickerChange}\n\t\t\t\t\tselected={inputToDate(value, pattern, timezone)}\n\t\t\t\t\tlocale={locale ?? i18n.language}\n\t\t\t\t\tisClearable={clearable}\n\t\t\t\t\tplaceholderText={pattern}\n\t\t\t\t\tclassName={cx('date', {invalid: !valid})}\n\t\t\t\t\tinline\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (readOnly) {\n\t\t\treturn (\n\t\t\t\t<DatePicker\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tonChange={() => {}}\n\t\t\t\t\tselected={inputToDate(value, pattern, timezone)}\n\t\t\t\t\tlocale={locale ?? i18n.language}\n\t\t\t\t\tcustomInput={\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<input type=\"text\" value={formattedDate(value)} readOnly />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t}\n\t\t\t\t\tplaceholderText={pattern}\n\t\t\t\t\treadOnly\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Popup\n\t\t\t\thandler={\n\t\t\t\t\t<span className=\"di date-input-wrapper\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\tdata-testid=\"date-input\"\n\t\t\t\t\t\t\tclassName={cx('date', {invalid: !valid})}\n\t\t\t\t\t\t\tonChange={(e) => handleInputTextChange(e.target.value)}\n\t\t\t\t\t\t\tvalue={inputText}\n\t\t\t\t\t\t\tplaceholder={pattern}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\thandleInputTextChange(formattedDate(value));\n\t\t\t\t\t\t\t\tdebouncedSetPopupActive(false);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{clearable && (\n\t\t\t\t\t\t\t<Button naked small onClick={handleClear}>\n\t\t\t\t\t\t\t\t<Icon del />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t\tmode={['click', 'focus']}\n\t\t\t\tclassName=\"date-input\"\n\t\t\t\thandlerWrapperClassName={wrapperClassName}\n\t\t\t\topen={popupOpen}\n\t\t\t\tonOpenChange={setPopupOpen}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"di date-picker-popup-wrapper\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonFocus={() => {\n\t\t\t\t\t\tdebouncedSetPopupActive(true);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t{...otherProps}\n\t\t\t\t\t\tselected={inputToDate(value, pattern, timezone)}\n\t\t\t\t\t\tonChange={handlePickerChange}\n\t\t\t\t\t\tlocale={locale ?? i18n.language}\n\t\t\t\t\t\tisClearable={clearable}\n\t\t\t\t\t\tplaceholderText={pattern}\n\t\t\t\t\t\tclassName={cx('date', {invalid: !valid})}\n\t\t\t\t\t\tinline\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Popup>\n\t\t);\n\t}\n);\n\nexport default DateInput;\n","import * as React from 'react';\n\nimport {Button, Icon} from '@deviceinsight/ng-ui-basic-components';\n\nexport type Props = {\n\t/** Current value of input field */\n\tvalue: string;\n\n\t/** Function, executed on change */\n\tonChange: (value: string) => any;\n};\n\ntype State = {\n\teditMode: boolean;\n};\n\n/**\n * UrnInput offers a convenient way to add or edit Asset URNs.\n * Usually, a generated default value is passed in as prop.\n */\nexport default class UrnInput extends React.Component<Props, State> {\n\tstate: State = {\n\t\teditMode: false\n\t};\n\n\thandleEdit: () => void = () =>\n\t\tthis.setState({\n\t\t\teditMode: true\n\t\t});\n\n\thandleChangeValue: (event: React.SyntheticEvent<HTMLInputElement>) => any = (\n\t\tevent: React.SyntheticEvent<HTMLInputElement>\n\t) => this.props.onChange((event.target as HTMLInputElement).value);\n\n\trender() {\n\t\tconst {editMode} = this.state;\n\t\tconst {value} = this.props;\n\n\t\tif (editMode) {\n\t\t\treturn (\n\t\t\t\t<input\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={this.handleChangeValue}\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tmarginRight: 10\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button small onClick={this.handleEdit}>\n\t\t\t\t\t\t<Icon edit />\n\t\t\t\t\t</Button>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\t}\n}\n","import {useEffect, useRef, useState} from 'react';\nimport {Trans, useTranslation} from '../../i18n';\n\nimport {Button, Modal} from '@deviceinsight/ng-ui-basic-components';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\nexport type Props = {\n\t/** Title of the Prompt's content */\n\ttitle: TranslationDescriptor;\n\n\t/** Label of the Prompt's input field */\n\tmessage: TranslationDescriptor;\n\n\t/** @ignore */\n\tonAccept: (arg0: string) => void;\n\n\t/** @ignore */\n\tonCancel: (...args: Array<any>) => any;\n\n\t/** (Optional) if sets, returns custom label for the accept button */\n\tacceptButtonLabel?: TranslationDescriptor;\n\n\t/** (Optional) if sets, returns custom label for the cancel button */\n\tcancelButtonLabel?: TranslationDescriptor;\n\n\t/** (Optional) if sets, returns custom placeholder for the input field */\n\tinputPlaceholder?: TranslationDescriptor;\n};\n\n/**\n * This component should not be used directly, instead use `@withPrompt` to inject a promise-based prompt method\n */\nexport default function Prompt({\n\ttitle,\n\tmessage,\n\tonAccept,\n\tonCancel,\n\tinputPlaceholder,\n\tcancelButtonLabel,\n\tacceptButtonLabel\n}: Props) {\n\tconst {t} = useTranslation();\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst [value, setValue] = useState('');\n\n\tuseEffect(() => {\n\t\tinputRef.current?.focus();\n\t});\n\n\treturn (\n\t\t<Modal\n\t\t\theader={t(title.id, {\n\t\t\t\tdefaultValue: title.defaultValue\n\t\t\t})}\n\t\t\tcontent={\n\t\t\t\t<div className=\"di form\">\n\t\t\t\t\t<div className=\"field\">\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t<Trans i18nKey={message.id}>{message.defaultValue}</Trans>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: 250\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tref={inputRef}\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\tinputPlaceholder\n\t\t\t\t\t\t\t\t\t? t(inputPlaceholder.id, {\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue: inputPlaceholder.defaultValue\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={(event) => setValue(event.target.value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<div>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tprimary\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tonAccept(value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdisabled={!value.length}\n\t\t\t\t\t>\n\t\t\t\t\t\t{acceptButtonLabel ? (\n\t\t\t\t\t\t\t<Trans i18nKey={acceptButtonLabel.id}>{acceptButtonLabel.defaultValue}</Trans>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Trans i18nKey=\"form.accept\">Accept</Trans>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button onClick={onCancel}>\n\t\t\t\t\t\t{cancelButtonLabel ? (\n\t\t\t\t\t\t\t<Trans i18nKey={cancelButtonLabel.id}>{cancelButtonLabel.defaultValue}</Trans>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Trans i18nKey=\"form.cancel\">Cancel</Trans>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\twidth={600}\n\t\t/>\n\t);\n}\n","import * as React from 'react';\n\nimport {TranslationDescriptor} from '../../types/i18n';\nimport Prompt from './Prompt';\n\nexport type PromptProps = {\n\tprompt: (\n\t\ttitle: TranslationDescriptor,\n\t\tmessage: TranslationDescriptor,\n\t\tinputPlaceholder?: TranslationDescriptor,\n\t\tacceptButtonLabel?: TranslationDescriptor,\n\t\tcancelButtonLabel?: TranslationDescriptor\n\t) => Promise<string>;\n};\n\ntype State = {\n\tshow: boolean;\n\tpromptElement?: React.ReactElement<typeof Prompt>;\n};\n\nexport default function withPrompt<P>(WrappedComponent: React.ComponentType<P & PromptProps>): React.ComponentType<P> {\n\treturn class WithPromptWrapper extends React.Component<P, State> {\n\t\tstate: State = {\n\t\t\tshow: false\n\t\t};\n\t\tprompt = (\n\t\t\ttitle: TranslationDescriptor,\n\t\t\tmessage: TranslationDescriptor,\n\t\t\tinputPlaceholder?: TranslationDescriptor,\n\t\t\tacceptButtonLabel?: TranslationDescriptor,\n\t\t\tcancelButtonLabel?: TranslationDescriptor\n\t\t): Promise<string> =>\n\t\t\tnew Promise((resolve) => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tshow: true,\n\t\t\t\t\tpromptElement: (\n\t\t\t\t\t\t<Prompt\n\t\t\t\t\t\t\ttitle={title}\n\t\t\t\t\t\t\tmessage={message}\n\t\t\t\t\t\t\tonAccept={(value) => {\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\tshow: false\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tresolve(value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonCancel={() => {\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\tshow: false\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinputPlaceholder={inputPlaceholder}\n\t\t\t\t\t\t\tacceptButtonLabel={acceptButtonLabel}\n\t\t\t\t\t\t\tcancelButtonLabel={cancelButtonLabel}\n\t\t\t\t\t\t\tkey=\"1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t});\n\t\t\t});\n\n\t\trender() {\n\t\t\treturn [\n\t\t\t\t<WrappedComponent {...this.props} prompt={this.prompt} key=\"0\" />,\n\t\t\t\tthis.state.show ? this.state.promptElement : null\n\t\t\t];\n\t\t}\n\t};\n}\n","/* eslint no-unused-vars: 0 */\nimport {useCallback, useEffect} from 'react';\n\nimport * as React from 'react';\nimport {useTranslation} from '../../i18n';\nimport {RouteComponentProps, useHistory} from 'react-router-dom';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\ntype LocationShape = RouteComponentProps['location'];\n\nconst isModifiedEvent = (event: React.MouseEvent<HTMLAnchorElement> | KeyboardEvent) =>\n\t!!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n\nexport type Props = {\n\tto: string | LocationShape;\n\n\t/** a title tooltip */\n\ttitle?: TranslationDescriptor;\n\n\t/** a keyboard shortcut that activates the link */\n\tkeyboardShortcut?: string;\n\n\t/**\n\t * a function called before the link is activated, should return a promise that either\n\t * - rejects: to abort the navigation\n\t * - resolves: to continue the navigation with\n\t * - resolves with a new location: to continue the navigation with a new path\n\t * */\n\tconfirm?: () => Promise<(string | null | undefined) | (LocationShape | null | undefined)>;\n\n\t/** @ignore */\n\tchildren?: any;\n\n\t/** @ignore */\n\tclassName?: string;\n\n\t/** @ignore */\n\t'data-testid'?: string;\n};\n\n/**\n * RouteLink enables the possibility to add new links to existing routes.\n * Those routes can also be accessed via `keyboardShortcut`\n */\nexport default function RouteLink({to, confirm, className, title, children, keyboardShortcut, ...otherProps}: Props) {\n\tconst history = useHistory();\n\tconst {t} = useTranslation();\n\n\tconst pushRoute = useCallback(() => {\n\t\tif (confirm) {\n\t\t\tconfirm()\n\t\t\t\t.then((location) => history.push(location || to))\n\t\t\t\t.catch(() => {\n\t\t\t\t\t// Exception means that the user didn't confirm, we don't need to react for that.\n\t\t\t\t});\n\t\t} else {\n\t\t\thistory.push(to);\n\t\t}\n\t}, [confirm, history, to]);\n\n\tconst handleKeyEvent = useCallback(\n\t\t(event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tkeyboardShortcut &&\n\t\t\t\tevent.key === keyboardShortcut &&\n\t\t\t\t!isModifiedEvent(event) && // @ts-ignore EventTarget is a Node and has a tagName\n\t\t\t\tevent.target.tagName && // @ts-ignore EventTarget is a Node and has a tagName\n\t\t\t\t!['INPUT', 'SELECT', 'TEXTAREA'].includes(event.target.tagName)\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tpushRoute();\n\t\t\t}\n\t\t},\n\t\t[keyboardShortcut, pushRoute]\n\t);\n\n\tuseEffect(() => {\n\t\tif (keyboardShortcut) {\n\t\t\twindow.addEventListener('keydown', handleKeyEvent);\n\t\t\treturn () => {\n\t\t\t\twindow.removeEventListener('keydown', handleKeyEvent);\n\t\t\t};\n\t\t}\n\t}, [keyboardShortcut, handleKeyEvent]);\n\n\tconst handleClickEvent = (event: React.MouseEvent<HTMLAnchorElement>) => {\n\t\tif (event.button === 0 && !isModifiedEvent(event)) {\n\t\t\tevent.preventDefault();\n\t\t\tpushRoute();\n\t\t}\n\t};\n\tconst href = history.createHref(typeof to === 'string' ? {pathname: to} : to);\n\n\treturn (\n\t\t<a\n\t\t\thref={href}\n\t\t\tonClick={handleClickEvent}\n\t\t\tclassName={`di route-link ${className || ''}`}\n\t\t\ttitle={\n\t\t\t\ttitle\n\t\t\t\t\t? t(title.id, {\n\t\t\t\t\t\t\tdefaultValue: title.defaultValue\n\t\t\t\t\t\t})\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t{...otherProps}\n\t\t>\n\t\t\t{children}\n\t\t</a>\n\t);\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport {useTranslation} from '../../i18n';\n\nimport {Icon} from '@deviceinsight/ng-ui-basic-components';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\nconst colors = {\n\tinfo: '#ffffff',\n\tsuccess: '#cce0cc',\n\twarning: '#fed254',\n\terror: '#d66961'\n};\nexport type Props = {\n\t/** Color scheme type based on InfoBox purpose */\n\ttype?: 'info' | 'success' | 'warning' | 'error';\n\n\t/** The message to display in the InfoBox */\n\tmessage: TranslationDescriptor | string;\n\n\t/** Optional icon of the InfoBox */\n\ticon?: string;\n\n\t/** Optional flag whether the InfoBox should be hideable */\n\thideable?: boolean;\n\n\t/** Optional additional classnames for the parent div container */\n\tclassName?: string;\n\n\t/** Optional additional information to display under the info header */\n\tchildren?: React.ReactNode;\n};\n\n/**\n * InfoBox is best used for highlighting information, especially if a warning and/or an error shall be displayed.\n */\nfunction InfoBox({type = 'info', hideable = false, className, icon, message: inputMessage, children}: Props) {\n\tconst [visible, setVisible] = useState(true);\n\tconst {t} = useTranslation();\n\n\tfunction getMessage(): string {\n\t\tif (typeof inputMessage !== 'string') {\n\t\t\tconst {id, defaultValue, ...rest} = inputMessage;\n\t\t\treturn t(id, {...rest, defaultValue});\n\t\t}\n\n\t\treturn inputMessage;\n\t}\n\n\tconst message = getMessage();\n\n\treturn visible ? (\n\t\t<div className={`infobox ${className ? className : ''}`}>\n\t\t\t<div\n\t\t\t\tclassName=\"infobox-header\"\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: colors[type]\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className=\"infobox-header-content\">\n\t\t\t\t\t{icon && (\n\t\t\t\t\t\t<div className=\"infobox-iconcontainer\">\n\t\t\t\t\t\t\t<img src={icon} alt=\"info-icon\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"infobox-message\">{message}</div>\n\t\t\t\t</div>\n\t\t\t\t{hideable && (\n\t\t\t\t\t<button className=\"infobox-closebutton\" onClick={() => setVisible(false)}>\n\t\t\t\t\t\t<Icon del large />\n\t\t\t\t\t</button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{children}\n\t\t</div>\n\t) : null;\n}\n\nexport default InfoBox;\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","export default function resolvePath(basePath: string, match: string): string {\n\tconst divider = basePath.endsWith('/') ? '' : '/';\n\treturn `${basePath}${divider}${match}`;\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport {Link, Redirect, Route, Switch, useLocation} from 'react-router-dom';\nimport {CSS} from '@dnd-kit/utilities';\nimport {closestCenter, DndContext, DragEndEvent} from '@dnd-kit/core';\nimport {horizontalListSortingStrategy, SortableContext, useSortable} from '@dnd-kit/sortable';\nimport {restrictToHorizontalAxis} from '@dnd-kit/modifiers';\nimport cx from 'classnames';\n\nimport resolvePath from '../../utils/resolvePath';\n\ntype Page = {\n\tpath: string;\n\trenderHeading: (props: unknown) => React.ReactNode;\n\theadingTitle?: string;\n\trenderBody: (props: any) => React.ReactNode;\n\tdraggingDisabled?: boolean;\n\tdisabled?: boolean;\n};\n\nexport type Props = {\n\t/** Path of the page where this component is rendered */\n\tbasePath?: string;\n\n\t/** Array of pages to be displayed */\n\tpages: Page[];\n\n\t/** (Optional) function, executed if the order of the tabs get changed */\n\tonOrderChange?: (oldIndex: number, newIndex: number) => void;\n};\n\ntype TabHeaderProps = {\n\tid: string | number;\n\tdraggingDisabled: boolean;\n};\n\nconst TabHeader = ({\n\tid,\n\tto,\n\tclassName,\n\ttitle,\n\tchildren,\n\tdraggingDisabled\n}: React.ComponentProps<Link> & TabHeaderProps) => {\n\tconst {attributes, listeners, setNodeRef, transform, transition} = useSortable({\n\t\tid,\n\t\tdisabled: draggingDisabled,\n\t\tstrategy: horizontalListSortingStrategy\n\t});\n\n\tconst style = {\n\t\ttransform: transform ? CSS.Transform.toString({...transform, scaleX: 1}) : undefined,\n\t\ttransition\n\t};\n\n\tconst {pathname} = useLocation();\n\tconst isActive = pathname.endsWith(to.toString());\n\n\tif (isActive) {\n\t\treturn (\n\t\t\t<button\n\t\t\t\tdata-testid=\"tab-button\"\n\t\t\t\tclassName={cx('tab-header item active', className)}\n\t\t\t\ttitle={title}\n\t\t\t\tref={setNodeRef}\n\t\t\t\tstyle={style}\n\t\t\t\ttype=\"button\"\n\t\t\t\t{...attributes}\n\t\t\t\t{...listeners}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Link\n\t\t\tdata-testid=\"tab-button\"\n\t\t\tto={to}\n\t\t\ttitle={title}\n\t\t\tclassName={cx('tab-header item', className)}\n\t\t\tref={setNodeRef}\n\t\t\tstyle={style}\n\t\t\t{...attributes}\n\t\t\t{...listeners}\n\t\t>\n\t\t\t{children}\n\t\t</Link>\n\t);\n};\n\n/**\n * RouteTabs add the possibility to unite several homogeneous pages into one.\n * Each tab can be accessed individually via the browser's history\n */\nexport default function RouteTabs({pages, onOrderChange, basePath, ...otherProps}: Props) {\n\tconst [dragging, setDragging] = useState(false);\n\tconst {pathname, state} = useLocation();\n\n\tfunction determineBasePath() {\n\t\tconst lastPathSegment = pathname.split('/').reverse()[0];\n\n\t\tif (pages.some((page) => page.path === lastPathSegment)) {\n\t\t\treturn pathname.substring(0, pathname.lastIndexOf('/'));\n\t\t} else {\n\t\t\treturn pathname;\n\t\t}\n\t}\n\n\tfunction handleDragEnd(event: DragEndEvent) {\n\t\tsetDragging(false);\n\t\tconst {active, over} = event;\n\n\t\tif (active.id !== over?.id && onOrderChange) {\n\t\t\tconst oldIndex = pages.findIndex((page) => page.path === active.id);\n\t\t\tconst newIndex = pages.findIndex((page) => page.path === over?.id);\n\t\t\tonOrderChange(oldIndex, newIndex);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className={dragging ? 'draggable-area' : ''}>\n\t\t\t<DndContext\n\t\t\t\tcollisionDetection={closestCenter}\n\t\t\t\tonDragEnd={handleDragEnd}\n\t\t\t\tonDragStart={() => setDragging(true)}\n\t\t\t\tmodifiers={[restrictToHorizontalAxis]}\n\t\t\t>\n\t\t\t\t<div className=\"di tabs\">\n\t\t\t\t\t<SortableContext\n\t\t\t\t\t\titems={pages.map((page) => ({...page, id: page.path}))}\n\t\t\t\t\t\tstrategy={horizontalListSortingStrategy}\n\t\t\t\t\t>\n\t\t\t\t\t\t{pages.map(({path, renderHeading, headingTitle, draggingDisabled, disabled: pageDisabled}) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TabHeader\n\t\t\t\t\t\t\t\t\tid={path}\n\t\t\t\t\t\t\t\t\tkey={path}\n\t\t\t\t\t\t\t\t\tto={resolvePath(basePath || determineBasePath(), path)}\n\t\t\t\t\t\t\t\t\ttitle={headingTitle}\n\t\t\t\t\t\t\t\t\tdraggingDisabled={\n\t\t\t\t\t\t\t\t\t\tpageDisabled ||\n\t\t\t\t\t\t\t\t\t\tdraggingDisabled ||\n\t\t\t\t\t\t\t\t\t\t!onOrderChange ||\n\t\t\t\t\t\t\t\t\t\t(!dragging && !pathname.endsWith(path))\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderHeading(otherProps)}\n\t\t\t\t\t\t\t\t</TabHeader>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</SortableContext>\n\t\t\t\t</div>\n\t\t\t</DndContext>\n\t\t\t<Switch>\n\t\t\t\t{pages.map(({renderBody, path}) => (\n\t\t\t\t\t<Route\n\t\t\t\t\t\tkey={path}\n\t\t\t\t\t\tpath={resolvePath(basePath || determineBasePath(), path)}\n\t\t\t\t\t\trender={() => renderBody(otherProps)}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t\t<Route>\n\t\t\t\t\t<Redirect\n\t\t\t\t\t\tto={{\n\t\t\t\t\t\t\tpathname: resolvePath(basePath || determineBasePath(), pages[0].path),\n\t\t\t\t\t\t\tstate\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</Route>\n\t\t\t</Switch>\n\t\t</div>\n\t);\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMZJREFUeNpi/P//PwMtARMDjcHQt4ABGgchQPwKxMWBzwKxKFlmQy14g8dwGL5MqiXIFvynEgb5VJmWFoDwImQLWNB8pQ/EjyiM1j/IHHQLPgHxB3ok00dUCKpnuCzQAmJZKjh+Jy4L3KkUOjgtcKNG/gXi3cg5GRZuGkD8jQrhfwpmNroPbIGYkwo+2IErFXlQKfx3oRd2MK99oELwfIDlL+Qgegul+ang+u0ouRnqg0ACxTWx+CIQKyGbzThaJw+4BQABBgBH38BkTQm7ZwAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGpJREFUeNpi/P//PwMtARMDjcHQt4ABFAfQeAgH4jcgIRy4gyxzkSzAZzjJlmCz4D+VMMih4TBzGWHJlJGRkZrp9S3QXBGwuTSyAOR6xtF8MGrBqAUDYMFbahYV5BTXlBV2o5E8YBYABBgAxQJ9mxTaZMQAAAAASUVORK5CYII=\"","export default \"data:image/svg+xml,%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3crect%20x='0'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3crect%20x='9'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0.2s'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3crect%20x='19'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0.4s'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3c/svg%3e\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGl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kJggg==\"","export enum SelectionState {\n\tALL = 'all',\n\tSOME = 'some',\n\tNONE = 'none'\n}\n","import * as React from 'react';\n\nimport defaultIconFolderOpen from '../../../assets/img/icon_folder_open.png';\nimport defaultIconFolderClosed from '../../../assets/img/icon_folder_closed.png';\nimport defaultIconFolderLoading from '../../../assets/svg/icon_folder_loading.svg';\nimport defaultIconLeafNode from '../../../assets/img/icon_variablenode.png';\nimport {SelectionState} from '../constants';\nimport {Tree} from '../types';\n\ntype NodeImageProps = {\n\tnode: Tree;\n\tleafNode: boolean;\n\texpanded: boolean;\n\tisLoading: boolean;\n\tonExpand?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n};\n\ntype NodeInfoProps = {\n\tnode: Tree;\n\tdisplayName: string;\n\tleafNode: boolean;\n\texpanded: boolean;\n\tisLastChild?: boolean;\n\tselectionState: SelectionState;\n\tisLoading: boolean;\n\tonExpand: () => void;\n\tonSelect: (toggled: boolean) => void;\n};\n\nconst Skeleton = ({lastChild}: {lastChild: boolean}) => (\n\t<div className=\"skeleton\">\n\t\t<div className=\"skeleton-cell top\" />\n\t\t<div\n\t\t\tclassName=\"skeleton-cell bottom\"\n\t\t\tstyle={{\n\t\t\t\tvisibility: lastChild ? 'hidden' : 'initial'\n\t\t\t}}\n\t\t/>\n\t</div>\n);\n\nconst NodeImage = ({node, leafNode, expanded, isLoading, onExpand}: NodeImageProps) => {\n\tlet imageSrc;\n\n\tif (leafNode) {\n\t\timageSrc = node.image || defaultIconLeafNode;\n\t} else {\n\t\tif (isLoading) {\n\t\t\timageSrc = defaultIconFolderLoading;\n\t\t} else if (expanded) {\n\t\t\timageSrc = node.expandedImage || defaultIconFolderOpen;\n\t\t} else {\n\t\t\timageSrc = node.closedImage || defaultIconFolderClosed;\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className=\"icon-container\">\n\t\t\t<img src={imageSrc} alt=\"node\" onClick={onExpand} />\n\t\t</div>\n\t);\n};\n\nexport default class NodeInfo extends React.PureComponent<NodeInfoProps> {\n\tinputRef: HTMLInputElement | null | undefined;\n\n\tcomponentDidMount() {\n\t\tthis.updateSelectionState();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.updateSelectionState();\n\t}\n\n\tupdateSelectionState() {\n\t\tconst {selectionState} = this.props;\n\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.indeterminate = selectionState === SelectionState.SOME;\n\t\t}\n\t}\n\n\tonSelect = (event: React.SyntheticEvent<HTMLInputElement>): void => {\n\t\tconst {onSelect, selectionState} = this.props;\n\t\tonSelect(selectionState === SelectionState.SOME ? false : event.currentTarget.checked);\n\t};\n\n\tonLabelClick = (): void => {\n\t\tconst {onSelect, selectionState} = this.props;\n\t\tonSelect(selectionState === SelectionState.SOME ? false : this.inputRef ? !this.inputRef.checked : false);\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tnode,\n\t\t\tnode: {name},\n\t\t\tleafNode,\n\t\t\texpanded,\n\t\t\tisLastChild,\n\t\t\tonExpand,\n\t\t\tselectionState,\n\t\t\tisLoading\n\t\t} = this.props;\n\t\tconst selected = selectionState === SelectionState.ALL;\n\t\treturn (\n\t\t\t<div className={`node-info ${selected ? 'selected' : ''}`}>\n\t\t\t\t{isLastChild !== undefined && <Skeleton lastChild={isLastChild} />}\n\t\t\t\t<NodeImage\n\t\t\t\t\tnode={node}\n\t\t\t\t\tleafNode={leafNode}\n\t\t\t\t\texpanded={expanded}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tonExpand={onExpand}\n\t\t\t\t/>\n\t\t\t\t<input\n\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\tthis.inputRef = ref;\n\t\t\t\t\t}}\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tchecked={selectionState === SelectionState.ALL}\n\t\t\t\t\tonChange={this.onSelect}\n\t\t\t\t/>\n\t\t\t\t<div className=\"name\" onClick={this.onLabelClick}>\n\t\t\t\t\t{name}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\n\nimport NodeInfo from './NodeInfo';\nimport {SelectionState} from '../constants';\nimport {getAllLeafIds, getAllLeaves, intersectArrays} from '../treeutils';\nimport {NodeId, Tree} from '../types';\n\ntype Props = {\n\tselectedNodes: Array<NodeId>;\n\tnode: Tree;\n\tisLastChild?: boolean;\n\ttreeSize: number;\n\tselectNodes: (ids: Array<Tree>) => void;\n\tdeselectNodes: (ids: Array<Tree>) => void;\n\tlazyLoadingFunction: (node: Tree) => Promise<any>;\n};\n\ntype State = {\n\texpanded: boolean;\n\tselectionState: SelectionState;\n\tisLoading: boolean;\n};\n\nexport default class Node extends Component<Props, State> {\n\tstate: State = {\n\t\texpanded: false,\n\t\tselectionState: this.getSelectionState(),\n\t\tisLoading: false\n\t};\n\n\t/**\n\t * Update folder nodes only if the selection changed, or expanded changed\n\t * Update leaf nodes only if the previously selected nodes include this leaf and the currently\n\t * selected nodes do not include this leaf, and vice versa.\n\t * @param {Props} prevProps\n\t * @param {State} prevState\n\t */\n\tshouldComponentUpdate(prevProps: Props, prevState: State): boolean {\n\t\tconst {selectedNodes: prevSelectedNodes, treeSize: prevTreeSize} = prevProps;\n\t\tconst {expanded: prevExpanded, selectionState: prevSelectionState, isLoading: prevIsLoading} = prevState;\n\t\tconst {selectedNodes, node, treeSize} = this.props;\n\t\tconst {expanded, selectionState, isLoading} = this.state;\n\t\tif (prevIsLoading !== isLoading) return true;\n\t\tif (prevTreeSize !== treeSize) return true;\n\n\t\tif (this.isLeaf()) {\n\t\t\tconst selectionChangedForLeaf =\n\t\t\t\t(prevSelectedNodes.includes(node.id) && !selectedNodes.includes(node.id)) ||\n\t\t\t\t(!prevSelectedNodes.includes(node.id) && selectedNodes.includes(node.id));\n\t\t\treturn selectionChangedForLeaf || prevSelectionState !== selectionState;\n\t\t} else {\n\t\t\treturn (\n\t\t\t\tprevSelectedNodes.length !== selectedNodes.length ||\n\t\t\t\tprevExpanded !== expanded ||\n\t\t\t\tprevSelectionState !== selectionState\n\t\t\t);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setState({\n\t\t\tselectionState: this.getSelectionState()\n\t\t});\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.setState({\n\t\t\tselectionState: this.getSelectionState()\n\t\t});\n\t}\n\n\tisLeaf(): boolean {\n\t\tconst {node} = this.props;\n\t\treturn node.children === undefined;\n\t}\n\n\tgetSelectionState() {\n\t\tconst {node, selectedNodes} = this.props;\n\n\t\tif (this.isLeaf()) {\n\t\t\treturn selectedNodes.includes(node.id) ? SelectionState.ALL : SelectionState.NONE;\n\t\t} else {\n\t\t\tconst leafIds = getAllLeafIds(node);\n\t\t\tconst intersection = intersectArrays(leafIds, selectedNodes);\n\n\t\t\tif (intersection.length === leafIds.length && leafIds.length !== 0) {\n\t\t\t\treturn SelectionState.ALL;\n\t\t\t} else if (intersection.length === 0) {\n\t\t\t\treturn SelectionState.NONE;\n\t\t\t}\n\n\t\t\treturn SelectionState.SOME;\n\t\t}\n\t}\n\n\t// handle this the same way as selection?\n\ttoggleExpand: () => void = () => {\n\t\tconst {node, lazyLoadingFunction} = this.props;\n\n\t\tif (node.lazyLoadable) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tisLoading: true\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tlazyLoadingFunction(node).then(() =>\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\texpanded: true,\n\t\t\t\t\t\t\tisLoading: false\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\texpanded: !this.state.expanded\n\t\t\t});\n\t\t}\n\t};\n\tonSelect: (toggled: boolean) => void = (toggled: boolean) => {\n\t\tconst {node, selectNodes, deselectNodes, selectedNodes} = this.props;\n\n\t\tif (toggled) {\n\t\t\tconst childNodes = getAllLeaves(node).filter((node) => !selectedNodes.includes(node.id));\n\t\t\tselectNodes(childNodes);\n\t\t} else {\n\t\t\tconst childNodes = getAllLeaves(node).filter((node) => selectedNodes.includes(node.id));\n\t\t\tdeselectNodes(childNodes);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {node, isLastChild, ...commonNodeProps} = this.props;\n\t\tconst {expanded, selectionState, isLoading} = this.state;\n\t\treturn (\n\t\t\t<div className=\"node\">\n\t\t\t\t<NodeInfo\n\t\t\t\t\tnode={node}\n\t\t\t\t\tdisplayName={node.name}\n\t\t\t\t\tleafNode={this.isLeaf()}\n\t\t\t\t\texpanded={expanded}\n\t\t\t\t\tisLastChild={isLastChild}\n\t\t\t\t\tonExpand={this.toggleExpand}\n\t\t\t\t\tonSelect={this.onSelect}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tselectionState={selectionState}\n\t\t\t\t/>\n\t\t\t\t{expanded &&\n\t\t\t\t\tnode.children &&\n\t\t\t\t\tnode.children.map((childNode, i) => (\n\t\t\t\t\t\t<Node\n\t\t\t\t\t\t\t{...commonNodeProps}\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tnode={childNode}\n\t\t\t\t\t\t\tisLastChild={i === (node.children || []).length - 1}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\n\nimport {Tree, NodeId, DataSetConfig, SelectionItem} from './types';\nimport Node from './components/Node';\nimport {convertToTree, mergeNodeIdArrays, removeNodeIds, getTreeSize, findNodeAndApplyPatch} from './treeutils';\n\nexport type Props = {\n\t/** Configuration of keys for id, name, children, node/leaf images and lazy loading */\n\tdataSetConfig: DataSetConfig;\n\n\t/** Function executed when selecting nodes or folders */\n\tonSelect: (arg0: Array<SelectionItem>) => void;\n\n\t/** Function executed when deselecting nodes or folders */\n\tonDeselect: (arg0: Array<SelectionItem>) => void;\n\n\t/** Arbitrary hierarchical initial data set to render */\n\ttreeData: Array<any>;\n\n\t/** Array of initially selected nodes in the tree */\n\tselectedNodes?: Array<NodeId>;\n\n\t/** Function to execute on a lazy loadable node */\n\tlazyLoadingFunction?: (nodeData: any) => Promise<any>;\n};\n\ntype State = {\n\ttree: Tree;\n\ttreeData: Array<any>;\n\tselectedNodes: Array<NodeId>;\n\ttreeSize: number;\n};\n\n/**\n * TreeView adds the functionality to display \"folders\" and their content.\n * This can come in handy for several data structures.\n */\nexport default class TreeView extends Component<Props, State> {\n\tstate: State = {\n\t\ttreeData: this.props.treeData,\n\t\ttree: {\n\t\t\tid: 'virtualRootNode',\n\t\t\tname: '',\n\t\t\tchildren: [],\n\t\t\tpath: '/',\n\t\t\toriginalNode: {}\n\t\t},\n\t\ttreeSize: 0,\n\t\tselectedNodes: this.props.selectedNodes || []\n\t};\n\n\tconvert: (hierarchicalData: Array<any>, nodePath?: string) => Array<Tree> = convertToTree(this.props.dataSetConfig);\n\n\tcomponentDidMount() {\n\t\tconst {treeData} = this.props;\n\t\tconst tree = this.initTree(treeData);\n\t\tconst treeSize = getTreeSize(tree);\n\t\tthis.setState({\n\t\t\ttree,\n\t\t\ttreeSize\n\t\t});\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tconst {selectedNodes: prevNodes} = prevProps;\n\t\tconst {selectedNodes} = this.props;\n\n\t\tif (selectedNodes && prevNodes && prevNodes.length !== selectedNodes.length) {\n\t\t\tthis.setState({\n\t\t\t\tselectedNodes\n\t\t\t});\n\t\t}\n\t}\n\n\tinitTree(treeData: Array<any>): {\n\t\tchildren?: Array<Tree>;\n\t\tclosedImage?: string;\n\t\texpandedImage?: string;\n\t\tid: string;\n\t\timage?: string;\n\t\tlazyLoadable?: boolean;\n\t\tname: string;\n\t\toriginalNode: any;\n\t\tpath: string;\n\t} {\n\t\treturn {\n\t\t\tid: 'virtualRootNode',\n\t\t\tname: '',\n\t\t\tchildren: this.convert(treeData),\n\t\t\tpath: '/',\n\t\t\toriginalNode: {}\n\t\t};\n\t}\n\n\tselectNodes: (nodes: Array<Tree>) => void = (nodes: Array<Tree>) => {\n\t\tconst {onSelect} = this.props;\n\t\tconst {selectedNodes} = this.state;\n\t\tthis.setState({\n\t\t\tselectedNodes: mergeNodeIdArrays(\n\t\t\t\tselectedNodes,\n\t\t\t\tnodes.map(({id}) => id)\n\t\t\t)\n\t\t});\n\t\tonSelect(nodes.map(({originalNode, path}) => ({...originalNode, $$path: path})));\n\t};\n\n\tdeselectNodes: (nodes: Array<Tree>) => void = (nodes: Array<Tree>) => {\n\t\tconst {onDeselect} = this.props;\n\t\tconst {selectedNodes} = this.state;\n\t\tthis.setState({\n\t\t\tselectedNodes: removeNodeIds(\n\t\t\t\tselectedNodes,\n\t\t\t\tnodes.map(({id}) => id)\n\t\t\t)\n\t\t});\n\t\tonDeselect(nodes.map(({originalNode, path}) => ({...originalNode, $$path: path})));\n\t};\n\n\taddTreeData = (dataSet: Array<any>, underNode: Tree) => {\n\t\tconst {tree} = this.state;\n\t\tconst subTree = this.convert(dataSet, underNode.path);\n\t\tconst newTree = {\n\t\t\tid: 'virtualRootNode',\n\t\t\tname: '',\n\t\t\tchildren: (tree.children || []).map((rootNode) =>\n\t\t\t\tfindNodeAndApplyPatch(rootNode, underNode.id, {\n\t\t\t\t\tlazyLoadable: false,\n\t\t\t\t\tchildren: subTree\n\t\t\t\t})\n\t\t\t),\n\t\t\tpath: '/',\n\t\t\toriginalNode: {}\n\t\t};\n\t\tconst newTreeSize = getTreeSize(newTree);\n\t\tthis.setState({\n\t\t\ttree: newTree,\n\t\t\ttreeSize: newTreeSize\n\t\t});\n\t};\n\n\tlazyLoadingFunction: (node: Tree) => Promise<void> = (node: Tree): Promise<void> => {\n\t\tconst {lazyLoadingFunction} = this.props;\n\t\tif (!lazyLoadingFunction) return Promise.resolve();\n\t\treturn lazyLoadingFunction(node.originalNode)\n\t\t\t.then((dataSet) => {\n\t\t\t\tthis.addTreeData(dataSet, node);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\treturn Promise.resolve();\n\t\t\t});\n\t};\n\n\trender() {\n\t\tconst {tree, selectedNodes, treeSize} = this.state;\n\t\treturn (\n\t\t\t<div className=\"treeview\">\n\t\t\t\t{tree.children &&\n\t\t\t\t\ttree.children.map((item, i) => (\n\t\t\t\t\t\t<Node\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tnode={item}\n\t\t\t\t\t\t\tselectedNodes={selectedNodes}\n\t\t\t\t\t\t\tselectNodes={this.selectNodes}\n\t\t\t\t\t\t\tdeselectNodes={this.deselectNodes}\n\t\t\t\t\t\t\ttreeSize={treeSize}\n\t\t\t\t\t\t\tlazyLoadingFunction={this.lazyLoadingFunction}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","export default \"data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3ccircle%20cx='7.5'%20cy='3.5'%20r='1.5'/%3e%3ccircle%20cx='7.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20cx='7.5'%20cy='11.5'%20r='1.5'/%3e%3c/svg%3e\"","import * as React from 'react';\n\ntype ContextType = {\n\ttoggleMenu: () => void;\n};\n\nconst MultiMenuContext: React.Context<ContextType> = React.createContext<ContextType>({\n\ttoggleMenu: () => {}\n});\n\nexport default MultiMenuContext;\n","import {ReactNode, useState} from 'react';\nimport {Placement, Popup} from '@deviceinsight/ng-ui-basic-components';\n\nimport Context from './components/MultiMenuContext';\n\nexport type Props = {\n\t/** Enabler for the Multimenu */\n\tmenuButton: ReactNode;\n\n\t/** (Optional) if set, sets the direction in which the MultiMenu should open */\n\tdirection?: Placement;\n\n\t/** Should contain several <MultiMenuItem/> elements */\n\tchildren?: ReactNode;\n\n\t/** (Optional) sets additional (css) classes */\n\tclassName?: string;\n\n\t/** (Optional) if set, controls the open state of the MultiMenu */\n\topen?: boolean;\n\n\t/** (Optional) if set, is called when the open state of the MultiMenu changes */\n\tonOpenChange?: (open: boolean) => void;\n};\n\n/**\n * MultiMenu enables a toggleable menu to either show more content and further functionality.\n */\nexport default function MultiMenuFunctional({menuButton, children, direction, className, open, onOpenChange}: Props) {\n\tconst [contentVisible, setContentVisible] = useState(false);\n\n\tconst toggleMenu = () => {\n\t\tsetContentVisible(!contentVisible);\n\t};\n\n\treturn (\n\t\t<span>\n\t\t\t<Popup\n\t\t\t\topen={open ?? contentVisible}\n\t\t\t\tonOpenChange={onOpenChange ?? setContentVisible}\n\t\t\t\thandler={menuButton}\n\t\t\t\tplacement={direction}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t<div className=\"di multimenu\">\n\t\t\t\t\t<div className={`drop ${direction ? direction : 'bottom'} ${contentVisible ? 'show' : ''}`}>\n\t\t\t\t\t\t<Context.Provider value={{toggleMenu}}>{children}</Context.Provider>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Popup>\n\t\t</span>\n\t);\n}\n","import * as React from 'react';\nimport {Trans} from '../../i18n';\nimport {debounce} from 'lodash';\n\nimport {Button} from '@deviceinsight/ng-ui-basic-components';\n\nimport iconSettings from '../../assets/svg/icon_menu_vertical.svg';\nimport MultiMenu from '../multiMenu/MultiMenu';\nimport {useEffect, useRef, useState} from 'react';\n\nexport type Props = {\n\t/** Current page */\n\tpage: number;\n\n\t/** Total number of pages */\n\ttotalPages: number;\n\n\t/** Function, executed when the current page changes */\n\tonChangePage: (page: number) => void;\n\n\t/** (Optional) Function, executed when the number of elements per page changes */\n\tonChangeSize?: (size: number) => void;\n\n\t/** (Optional) Number of elements per page*/\n\tsize?: number;\n};\n\nconst sizeOptions = [5, 10, 15, 20, 50];\n\n/**\n * Pagination enables a convenient way to display and navigate through a paginated search result\n */\nexport default function Pagination({onChangePage, page, totalPages, onChangeSize, size}: Props) {\n\tconst changePageDebouncedRef = useRef<typeof onChangePage | null>(null);\n\tconst {current: changePageDebounced} = changePageDebouncedRef;\n\tconst [pageRaw, setPageRaw] = useState(`${page + 1}`);\n\tconst [menuOpen, setMenuOpen] = useState(false);\n\n\tuseEffect(() => {\n\t\tchangePageDebouncedRef.current = debounce(onChangePage, 500);\n\t}, [onChangePage]);\n\n\tuseEffect(() => {\n\t\t \n\t\tsetPageRaw(`${page + 1}`);\n\t}, [page]);\n\n\tfunction goToFirstPage() {\n\t\tonChangePage(0);\n\t}\n\n\tfunction goToPrevPage() {\n\t\tif (page > 0) {\n\t\t\tonChangePage(page - 1);\n\t\t}\n\t}\n\n\tfunction goToNextPage() {\n\t\tif (page < totalPages - 1) {\n\t\t\tonChangePage(page + 1);\n\t\t}\n\t}\n\n\tfunction goToLastPage() {\n\t\tonChangePage(totalPages - 1);\n\t}\n\n\tfunction handleChangeSize(event: React.ChangeEvent<HTMLSelectElement>) {\n\t\tif (onChangeSize) {\n\t\t\tconst newSize = parseInt(event.target.value, 10);\n\t\t\tonChangeSize(newSize);\n\t\t\tsetMenuOpen(false);\n\t\t}\n\t}\n\n\tfunction handlePageInputChange(event: React.ChangeEvent<HTMLInputElement>) {\n\t\tconst rawValue = event.target.value;\n\t\tif (rawValue.trim() === '') {\n\t\t\tsetPageRaw(rawValue);\n\t\t\treturn;\n\t\t}\n\t\tconst parsedPage = Number(event.target.value);\n\t\tif (!Number.isNaN(parsedPage) && parsedPage >= 1 && parsedPage <= totalPages) {\n\t\t\tchangePageDebounced?.(parsedPage - 1);\n\t\t\tsetPageRaw(rawValue);\n\t\t}\n\t}\n\n\tfunction handlePageInputBlur() {\n\t\tsetPageRaw(`${page + 1}`);\n\t}\n\n\tconst isLastPage = page >= totalPages - 1;\n\treturn (\n\t\t<div className=\"di pagination-holder\">\n\t\t\t<div className=\"di pagination\">\n\t\t\t\t<span className={`prev ${page === 0 ? 'disabled' : ''}`} onClick={goToFirstPage}>\n\t\t\t\t\t«\n\t\t\t\t</span>\n\t\t\t\t<span className={`prev ${page === 0 ? 'disabled' : ''}`} onClick={goToPrevPage}>\n\t\t\t\t\t‹\n\t\t\t\t</span>\n\t\t\t\t<span className=\"info\">\n\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.page\">Page</Trans>\n\t\t\t\t\t<input value={pageRaw} onChange={handlePageInputChange} onBlur={handlePageInputBlur} />\n\n\t\t\t\t\t{typeof process !== 'undefined' && process?.env?.STORYBOOK_MODE ? (\n\t\t\t\t\t\t<>of {totalPages}</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.ofTotal\"> of {{totalPages}}</Trans>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t\t<span className={`next ${isLastPage ? 'disabled' : ''}`} onClick={goToNextPage}>\n\t\t\t\t\t›\n\t\t\t\t</span>\n\t\t\t\t<span className={`next ${isLastPage ? 'disabled' : ''}`} onClick={goToLastPage}>\n\t\t\t\t\t»\n\t\t\t\t</span>\n\t\t\t\t{onChangeSize && (\n\t\t\t\t\t<div className=\"options\">\n\t\t\t\t\t\t<MultiMenu\n\t\t\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\t\t\topen={menuOpen}\n\t\t\t\t\t\t\tonOpenChange={setMenuOpen}\n\t\t\t\t\t\t\tmenuButton={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tnaked\n\t\t\t\t\t\t\t\t\ttitle={{\n\t\t\t\t\t\t\t\t\t\tid: 'trend.settings.buttonTitle',\n\t\t\t\t\t\t\t\t\t\tdefaultValue: 'Settings'\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<img src={iconSettings} alt=\"settings icon\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"di form\"\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\twidth: 200,\n\t\t\t\t\t\t\t\t\tpadding: 10\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"field\">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.entriesPerPage\">Entries per page</Trans>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<select onChange={handleChangeSize} value={size}>\n\t\t\t\t\t\t\t\t\t\t{sizeOptions.map((sizeOption) => (\n\t\t\t\t\t\t\t\t\t\t\t<option key={sizeOption} value={sizeOption}>\n\t\t\t\t\t\t\t\t\t\t\t\t{sizeOption}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.changePageWillBeStored\">\n\t\t\t\t\t\t\t\t\t\tYour changes will be stored for view.\n\t\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</MultiMenu>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import {createRef, Component} from 'react';\nimport Select from 'react-select';\nimport {orderBy, isEqual} from 'lodash';\n\nimport './react-select.css';\nimport './react-select-custom.css';\n\nexport type Item = {\n\ttype: 'item';\n\tvalue: string;\n\tlabel: string;\n};\n\nexport type Group = {\n\ttype: 'group';\n\tlabel: string;\n\toptions: Array<Item>;\n};\n\nexport type Props = {\n\t/** Flag to preselect the status of the checkbox */\n\tvalue: Item | null | undefined;\n\n\t/** Function, executed when selecting value */\n\tonChange: (arg0: Item | null | undefined) => void;\n\n\t/** Array of select options values */\n\toptions: Array<Item> | Array<Group>;\n\n\t/** Array of special select options values */\n\tspecialOptions?: Array<Item> | null | undefined;\n\n\t/** Message displayed when no results found by search feature */\n\tnoResultsMessage?: string;\n\n\t/** Placeholder */\n\tplaceholder?: string;\n\n\t/** Clearable */\n\tclearable?: boolean;\n\n\t/** Loading */\n\tloading?: boolean;\n\n\t/** Function comparing two options - used for sorting */\n\tcompareOptions?: (value1: Item, value2: Item) => number;\n\n\t/** (Optional) Whether the menu should use a portal, and where it should attach */\n\tmenuPortalTarget?: HTMLElement;\n\n\t/** (Optional) indicates if the component is disabled or not */\n\tdisabled?: boolean;\n\n\t/** Enables free-form input mode */\n\tfreeForm?: boolean;\n\n\t/** @ignore */\n\t'data-testid'?: string;\n};\n\ntype State = {\n\toptions: Array<Item> | Array<Group>;\n\tinputValue: string | null;\n};\n\nfunction getSortedOptions(\n\toptions: Array<Item> | Array<Group>,\n\tcompareOptions?: (value1: Item, value2: Item) => number\n): Array<Item> | Array<Group> {\n\tif (!compareOptions) {\n\t\t// @ts-ignore\n\t\treturn orderBy(options, 'label', 'asc');\n\t}\n\n\t// @ts-ignore\n\tif (options.every((option: any) => !option.options)) {\n\t\tconst singleOptions = options as Array<Item>;\n\t\treturn [...singleOptions].sort(compareOptions);\n\t}\n\n\t// @ts-ignore\n\tif (options.every((option) => option.options)) {\n\t\tconst groupOptions: Array<Group> = options as any;\n\t\treturn groupOptions.map<Group>((option) => ({...option, options: [...option.options].sort(compareOptions)}));\n\t}\n\n\tthrow new Error('Mixing groups with single options not allowed');\n}\n\n/**\n * SelectWithSearch enhances a native select list by applying a search functionality to it.\n * Additional entries can be added by setting and adjusting `specialOptions`\n */\nexport default class SelectWithSearch extends Component<Props, State> {\n\tstate: State = {\n\t\toptions: [] as Array<Item>,\n\t\tinputValue: null\n\t};\n\tselectRef: {\n\t\tcurrent: any | null;\n\t} = createRef<typeof Select>();\n\n\tportalRoot: HTMLElement | null = null;\n\n\tcomponentDidMount() {\n\t\tthis.updateOptions();\n\n\t\tif (this.props['data-testid'] && this.selectRef && this.selectRef.current) {\n\t\t\tthis.selectRef.current.controlRef.setAttribute('data-testid', this.props['data-testid']);\n\t\t}\n\n\t\tif (this.props.menuPortalTarget) {\n\t\t\tthis.portalRoot = document.createElement('div');\n\t\t\tconst classes = this.getContainerClasses();\n\t\t\tthis.portalRoot.classList.add(...classes);\n\t\t\tthis.props.menuPortalTarget.appendChild(this.portalRoot);\n\t\t}\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tif (!isEqual(prevProps.options, this.props.options) || prevProps.freeForm !== this.props.freeForm) {\n\t\t\tthis.updateOptions();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.props.menuPortalTarget && this.portalRoot) {\n\t\t\tthis.props.menuPortalTarget.removeChild(this.portalRoot);\n\t\t}\n\t}\n\n\tupdateOptions: () => void = () => {\n\t\tconst {options, specialOptions, compareOptions} = this.props;\n\t\tconst sortedOptions = getSortedOptions(options, compareOptions);\n\n\t\tif (specialOptions) {\n\t\t\tthis.setState({\n\t\t\t\t// @ts-ignore\n\t\t\t\toptions: [...sortedOptions, ...specialOptions]\n\t\t\t});\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\toptions: sortedOptions\n\t\t\t});\n\t\t}\n\t};\n\n\tfilterOption = (option: Item, inputValue: string): boolean => {\n\t\treturn option.label.toString().toLowerCase().startsWith(inputValue.toLowerCase());\n\t};\n\n\tgetContainerClasses = () => {\n\t\tconst {specialOptions} = this.props;\n\t\tif (specialOptions) {\n\t\t\treturn ['select-search-container', 'special'];\n\t\t}\n\t\treturn ['select-search-container'];\n\t};\n\n\trender() {\n\t\tconst {noResultsMessage, placeholder, value, onChange, clearable, loading, disabled} = this.props;\n\t\tconst {options} = this.state;\n\t\tconst dataTestId = this.props['data-testid'];\n\t\treturn (\n\t\t\t<Select\n\t\t\t\tref={this.selectRef}\n\t\t\t\tjoinValues\n\t\t\t\tname=\"form-field-name\"\n\t\t\t\tclassName={this.getContainerClasses().join(' ')}\n\t\t\t\tclassNamePrefix=\"select-search\"\n\t\t\t\tisClearable={clearable}\n\t\t\t\tnoOptionsMessage={noResultsMessage ? () => noResultsMessage : undefined}\n\t\t\t\toptions={options}\n\t\t\t\tvalue={value || null}\n\t\t\t\tonChange={onChange}\n\t\t\t\tonInputChange={(newValue) => {\n\t\t\t\t\tif (this.props.freeForm && newValue) {\n\t\t\t\t\t\tthis.setState({inputValue: newValue});\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\t// @ts-ignore\n\t\t\t\tfilterOption={this.filterOption}\n\t\t\t\tisLoading={loading}\n\t\t\t\tmenuPortalTarget={this.portalRoot}\n\t\t\t\tisDisabled={disabled}\n\t\t\t\tformatOptionLabel={\n\t\t\t\t\tdataTestId\n\t\t\t\t\t\t? (option: Item) => (\n\t\t\t\t\t\t\t\t<span data-testid={`${dataTestId}-option-${option.label}`}>{option.label}</span>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tif (this.props.freeForm && this.state.inputValue !== null) {\n\t\t\t\t\t\tthis.setState({options: this.props.options});\n\t\t\t\t\t\tthis.setState({inputValue: this.state.inputValue}, () => {\n\t\t\t\t\t\t\tconst newItem: Item = {\n\t\t\t\t\t\t\t\ttype: 'item',\n\t\t\t\t\t\t\t\tvalue: this.state.inputValue!,\n\t\t\t\t\t\t\t\tlabel: this.state.inputValue!\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t\t(prevState) =>\n\t\t\t\t\t\t\t\t\t({\n\t\t\t\t\t\t\t\t\t\toptions: [newItem, ...prevState.options]\n\t\t\t\t\t\t\t\t\t}) as Pick<State, 'options'>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthis.state.inputValue = null;\n\t\t\t\t\t\t\tonChange(newItem);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport {useTranslation} from '../../../i18n';\nimport {ReactableColumnDef} from '../types';\n\ntype Props = {\n\tcolumnDef: ReactableColumnDef<any>;\n\tchangeFilter: (columnName: string, value: any) => void;\n\t'data-testid'?: string;\n};\n\nconst getInitialValueFromColumnDef = (columnDef: ReactableColumnDef<any>) => {\n\treturn columnDef.filterable?.initialValue ?? '';\n};\n\nconst ReactableTextFilter: React.FC<Props> = ({columnDef, changeFilter, 'data-testid': testId}) => {\n\tconst {t} = useTranslation();\n\n\tconst [value, setValue] = useState(getInitialValueFromColumnDef(columnDef));\n\n\tconst handleChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n\t\tconst newValue = (event.target as HTMLInputElement).value;\n\t\tsetValue(newValue);\n\t\tchangeFilter(columnDef.name, newValue);\n\t};\n\n\treturn (\n\t\t<input\n\t\t\ttype=\"text\"\n\t\t\tplaceholder={t(`${columnDef.filterable?.placeholder ?? 'reactable.filter.placeholder'}`, {\n\t\t\t\tdefaultValue: 'Filter...'\n\t\t\t})}\n\t\t\tonChange={handleChange}\n\t\t\tvalue={value}\n\t\t\tdata-testid={testId}\n\t\t/>\n\t);\n};\n\nexport default ReactableTextFilter;\n","import {Checkbox} from '@deviceinsight/ng-ui-basic-components';\n\nimport {Pageable, Sort, PaginationSettings} from '../../../types/pagination';\nimport {ReactableColumnDef, ReactableFilterSettings} from '../types';\n\nexport function makePageable<T>(\n\titems: Array<T> | null | undefined,\n\tpaginationSettings: PaginationSettings,\n\tcustomSortFunction:\n\t\t| ((items: Array<T>, sort: Sort, defaultSortItems: (items: Array<T>, sort: Sort) => Array<T>) => Array<T>)\n\t\t| null\n\t\t| undefined\n): Pageable<T> | null | undefined {\n\tif (!items) {\n\t\treturn null;\n\t}\n\n\tconst {page, size, sort} = paginationSettings;\n\tconst sortedItems = customSortFunction ? customSortFunction(items, sort, sortItems) : sortItems(items, sort);\n\treturn {\n\t\tcontent: sortedItems.slice(page * size, (page + 1) * size),\n\t\ttotalElements: items.length,\n\t\ttotalPages: Math.ceil(items.length / size),\n\t\tnumber: page,\n\t\tsize,\n\t\tsort: [sort]\n\t};\n}\n\nconst getDefaultFilterFn = (filterType: string, fieldName: string) => {\n\tif (filterType === 'text') {\n\t\treturn (item: any, filterValue: string) =>\n\t\t\titem[fieldName] && item[fieldName].toString().toLowerCase().includes(filterValue.toLowerCase());\n\t} else {\n\t\treturn (item: any, filterValue: string) => item[fieldName] === filterValue;\n\t}\n};\n\nexport function filterItems<T>(\n\titems: Array<T> | null | undefined,\n\tcolumnDefs: Array<ReactableColumnDef<any>>,\n\tfilterSettings: ReactableFilterSettings\n): Array<T> | null | undefined {\n\tif (items) {\n\t\treturn items.filter((item) => {\n\t\t\treturn Object.keys(filterSettings).every((columnName) => {\n\t\t\t\tconst filterValue = filterSettings[columnName];\n\n\t\t\t\tif (filterValue && filterValue.length > 0) {\n\t\t\t\t\tconst columnDef = findColumnDefByName(columnName, columnDefs);\n\n\t\t\t\t\tif (columnDef.filterable) {\n\t\t\t\t\t\tconst filterFn =\n\t\t\t\t\t\t\tcolumnDef.filterable.filterFn ||\n\t\t\t\t\t\t\tgetDefaultFilterFn(columnDef.filterable.filterType, columnDef.name);\n\t\t\t\t\t\treturn filterFn(item as any, filterValue);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t});\n\t\t});\n\t}\n\n\treturn null;\n}\n\nfunction findColumnDefByName(columnName: string, columnDefs: Array<ReactableColumnDef<any>>): ReactableColumnDef<any> {\n\tconst columnDef = columnDefs.find((cd) => cd.name === columnName);\n\n\tif (!columnDef) {\n\t\tthrow Error(`column definition not found for ${columnName}`);\n\t}\n\n\treturn columnDef;\n}\n\nexport function sortItems<T>(items: Array<T>, sort: Sort): Array<T> {\n\treturn items.sort((itemA: T, itemB: T) => {\n\t\tconst a = (typeof itemA === 'object' && (itemA as Record<string, unknown>)?.[sort.property]) || 0;\n\t\tconst b = (typeof itemB === 'object' && (itemB as Record<string, unknown>)?.[sort.property]) || 0;\n\t\tconst reverseFactor = sort.direction === 'ASC' ? 1 : -1;\n\n\t\tif (a === b) {\n\t\t\treturn 0;\n\t\t} else if (typeof a === 'string' && typeof b === 'string') {\n\t\t\treturn a.localeCompare(b) * reverseFactor;\n\t\t} else if (typeof a === 'number' && typeof b === 'number') {\n\t\t\treturn (a - b) * reverseFactor;\n\t\t} else {\n\t\t\treturn a.toString().localeCompare(b.toString()) * reverseFactor;\n\t\t}\n\t});\n}\n\nexport function extendColumnDefsWithCheckboxes<T>(\n\tcolumnDefs: Array<ReactableColumnDef<T>>,\n\tonSelectChange: (selected: boolean, item: T) => void,\n\tonSelectAllChange: (selected: boolean) => void,\n\tselectedAll: boolean,\n\tselectedItems: Array<any>,\n\tuniqueItemKey: (arg0: T) => any\n): Array<ReactableColumnDef<T>> {\n\treturn [\n\t\t{\n\t\t\tname: 'checkbox',\n\t\t\tlabel: (\n\t\t\t\t<Checkbox\n\t\t\t\t\tvalue={selectedAll}\n\t\t\t\t\tonChange={onSelectAllChange}\n\t\t\t\t\ttitle={{\n\t\t\t\t\t\tid: 'components.filtertable.selectAllItems',\n\t\t\t\t\t\tdefaultValue: 'Select/deselect all items in search result'\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t),\n\t\t\tsortable: false,\n\t\t\trender: (item: T) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tvalue={selectedItems.includes(uniqueItemKey(item))}\n\t\t\t\t\t\tonChange={(selected) => onSelectChange(selected, item)}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t},\n\t\t\twidth: '1%'\n\t\t},\n\t\t...columnDefs\n\t];\n}\n\nexport function getClassName(tableName: string | undefined, columnName: string): string {\n\treturn `${tableName || 'unnamedTable'}-${columnName}`;\n}\n","import * as React from 'react';\nimport {useEffect, useRef, useState} from 'react';\nimport {useTranslation} from '../../../i18n';\nimport SelectWithSearch from '../../input/SelectWithSearch';\nimport {ReactableColumnDef, ReactableFilterSettings} from '../types';\nimport ReactableTextFilter from './ReactableTextFilter';\nimport {getClassName} from './helper';\n\ntype Props = {\n\tcolumnDefs: Array<ReactableColumnDef<any>>;\n\tonFilter: (filterColumns: ReactableFilterSettings) => void;\n\ttableName?: string;\n\t'data-testid'?: string;\n};\nconst ReactableTableFilterRow: React.FC<Props> = ({columnDefs, onFilter, tableName, 'data-testid': testId}) => {\n\tconst {t} = useTranslation();\n\n\tconst [state, setState] = useState<Record<string, string>>({});\n\tconst onFilterRef = useRef(onFilter);\n\n\tuseEffect(() => {\n\t\tonFilterRef.current = onFilter;\n\t}, [onFilter]);\n\n\tuseEffect(() => {\n\t\tsetState((prev) => {\n\t\t\tconst merged: Record<string, string> = {};\n\t\t\tfor (const cd of columnDefs) {\n\t\t\t\tmerged[cd.name] = prev[cd.name] !== undefined ? prev[cd.name] : (cd.filterable?.initialValue ?? '');\n\t\t\t}\n\n\t\t\tconst prevKeys = Object.keys(prev);\n\t\t\tconst mergedKeys = Object.keys(merged);\n\t\t\tconst sameKeys = mergedKeys.length === prevKeys.length && mergedKeys.every((k) => prevKeys.includes(k));\n\t\t\tconst sameValues = sameKeys && mergedKeys.every((k) => merged[k] === prev[k]);\n\n\t\t\tif (sameKeys && sameValues) {\n\t\t\t\treturn prev; // no change\n\t\t\t}\n\n\t\t\tif (Object.values(merged).some((v) => v)) {\n\t\t\t\tonFilterRef.current(merged);\n\t\t\t}\n\n\t\t\treturn merged;\n\t\t});\n\t}, [columnDefs]);\n\n\tconst changeFilter = (columnName: string, value: any) => {\n\t\tconst newState = {...state, [columnName]: value};\n\t\tsetState(newState);\n\t\tonFilter(newState);\n\t};\n\n\tconst getFilterByColumnDef = (columnDef: ReactableColumnDef<any>): React.ReactElement<any> | null => {\n\t\tif (columnDef.filterable) {\n\t\t\tswitch (columnDef.filterable.filterType) {\n\t\t\t\tcase 'text':\n\t\t\t\t\treturn textFilter(columnDef);\n\n\t\t\t\tcase 'options':\n\t\t\t\t\treturn optionsFilter(columnDef);\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Filter type ${columnDef.filterable.filterType} not supported`);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst getFilterTestId = (columnDef: ReactableColumnDef<any>): string | undefined => {\n\t\treturn testId ? `${testId}-filter-${columnDef.name}` : undefined;\n\t};\n\n\tconst textFilter = (columnDef: ReactableColumnDef<any>): React.ReactElement => {\n\t\treturn (\n\t\t\t<ReactableTextFilter\n\t\t\t\tcolumnDef={columnDef}\n\t\t\t\tchangeFilter={changeFilter}\n\t\t\t\tdata-testid={getFilterTestId(columnDef)}\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst optionsFilter = (columnDef: ReactableColumnDef<any>): React.ReactElement => {\n\t\tif (!columnDef.filterable?.filterOptions) {\n\t\t\tthrow new Error(`No filterOptions found for column type: options on columnDef: ${columnDef.name}`);\n\t\t}\n\n\t\tconst filterOptions = columnDef.filterable.filterOptions;\n\t\tif (columnDef.filterable.searchableOptions) {\n\t\t\tconst searchableOptions = filterOptions.map((option) => ({\n\t\t\t\ttype: 'item' as const,\n\t\t\t\tlabel:\n\t\t\t\t\ttypeof option.label === 'string'\n\t\t\t\t\t\t? option.label\n\t\t\t\t\t\t: t(option.label.id, {defaultValue: option.label.defaultValue}),\n\t\t\t\tvalue: option.value\n\t\t\t}));\n\t\t\tconst value = state[columnDef.name];\n\n\t\t\treturn (\n\t\t\t\t<SelectWithSearch\n\t\t\t\t\toptions={searchableOptions}\n\t\t\t\t\tonChange={(item) => {\n\t\t\t\t\t\tchangeFilter(columnDef.name, item?.value);\n\t\t\t\t\t}}\n\t\t\t\t\tvalue={value ? searchableOptions.find((opt) => opt.value === value.toString()) : null}\n\t\t\t\t\tclearable\n\t\t\t\t\tdata-testid={getFilterTestId(columnDef)}\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<select\n\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLSelectElement>) => {\n\t\t\t\t\t\tchangeFilter(columnDef.name, event.target.value);\n\t\t\t\t\t}}\n\t\t\t\t\tvalue={state[columnDef.name]}\n\t\t\t\t\tdata-testid={getFilterTestId(columnDef)}\n\t\t\t\t>\n\t\t\t\t\t<option key=\"\" value=\"\">\n\t\t\t\t\t\t{t('reactable.filter.all', {\n\t\t\t\t\t\t\tdefaultValue: '- All -'\n\t\t\t\t\t\t})}\n\t\t\t\t\t</option>\n\t\t\t\t\t{filterOptions.map((option) => (\n\t\t\t\t\t\t<option\n\t\t\t\t\t\t\tclassName={getClassName(tableName, columnDef.name)}\n\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\tvalue={option.value}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{typeof option.label === 'string'\n\t\t\t\t\t\t\t\t? option.label\n\t\t\t\t\t\t\t\t: t(option.label.id, {defaultValue: option.label.defaultValue})}\n\t\t\t\t\t\t</option>\n\t\t\t\t\t))}\n\t\t\t\t</select>\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<tr className=\"di filterrow form\">\n\t\t\t{columnDefs.map((columnDef) => (\n\t\t\t\t<td\n\t\t\t\t\tkey={columnDef.name}\n\t\t\t\t\tclassName={getClassName(tableName, columnDef.name)}\n\t\t\t\t\tstyle={{textAlign: columnDef.align || 'left'}}\n\t\t\t\t>\n\t\t\t\t\t{getFilterByColumnDef(columnDef)}\n\t\t\t\t</td>\n\t\t\t))}\n\t\t</tr>\n\t);\n};\n\nexport default ReactableTableFilterRow;\n","import {Component} from 'react';\nimport {Trans} from '../../../i18n';\n\nimport {ReactableColumnDef, ReactableColumnLabel} from '../types';\nimport {PaginationSettings, SortDirection} from '../../../types/pagination';\nimport {getClassName} from './helper';\nimport {TranslationDescriptor} from '../../../types/i18n';\n\nconst toggleSortDirection = (direction: SortDirection): SortDirection => (direction === 'ASC' ? 'DESC' : 'ASC');\n\ntype Props = {\n\tcolumnDefs: Array<ReactableColumnDef<any>>;\n\tpaginationSettings: PaginationSettings;\n\tonSort: (property: string, direction: SortDirection) => void;\n\ttableName?: string;\n};\n\nexport default class ReactableTableHeader extends Component<Props> {\n\thandleSort: (columnDef: ReactableColumnDef<unknown>) => void = (columnDef: ReactableColumnDef<any>) => {\n\t\tconst {paginationSettings, onSort} = this.props;\n\t\tconst direction =\n\t\t\tcolumnDef.name === paginationSettings.sort.property\n\t\t\t\t? toggleSortDirection(paginationSettings.sort.direction)\n\t\t\t\t: columnDef.defaultSortDirection || 'ASC';\n\t\tonSort(columnDef.name, direction);\n\t};\n\n\tgetClassName = (columnDef: ReactableColumnDef<any>) => {\n\t\tconst {paginationSettings, tableName} = this.props;\n\t\tconst className = getClassName(tableName, columnDef.name);\n\n\t\tif (columnDef.sortable) {\n\t\t\tif (columnDef.name === paginationSettings.sort.property) {\n\t\t\t\tif (paginationSettings.sort.direction === 'ASC') {\n\t\t\t\t\treturn `${className} sortable sortAsc`;\n\t\t\t\t} else {\n\t\t\t\t\treturn `${className} sortable sortDes`;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn `${className} sortable`;\n\t\t\t}\n\t\t} else {\n\t\t\treturn `${className}`;\n\t\t}\n\t};\n\n\tprintLabel = (label: ReactableColumnLabel) => {\n\t\tif (isTranslationDescriptor(label)) {\n\t\t\treturn <Trans i18nKey={label.id}>{label.defaultValue}</Trans>;\n\t\t}\n\n\t\treturn label;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<tr>\n\t\t\t\t{this.props.columnDefs.map((columnDef) => (\n\t\t\t\t\t<th\n\t\t\t\t\t\tkey={columnDef.name}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\twidth: columnDef.width || 'auto',\n\t\t\t\t\t\t\ttextAlign: columnDef.align || 'left'\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName={this.getClassName(columnDef)}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tif (columnDef.sortable) {\n\t\t\t\t\t\t\t\tthis.handleSort(columnDef);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.printLabel(columnDef.label)}\n\t\t\t\t\t</th>\n\t\t\t\t))}\n\t\t\t</tr>\n\t\t);\n\t}\n}\n\nfunction isTranslationDescriptor(label: unknown): label is TranslationDescriptor {\n\treturn typeof label === 'object' && label != null && 'id' in label && label.id !== undefined;\n}\n","import {Component} from 'react';\n\nimport {ReactableColumnDef, ReactableRowDef} from '../types';\nimport {getClassName} from './helper';\n\ntype Props<T> = {\n\tcolumnDefs: Array<ReactableColumnDef<T>>;\n\titem: T;\n\trowDef: ReactableRowDef<T> | null | undefined;\n\ttableName?: string;\n};\n\nexport default class ReactableTableRow extends Component<Props<any>> {\n\tgetRowClass = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && typeof rowDef.getRowClass === 'function') {\n\t\t\treturn rowDef.getRowClass(item);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t};\n\n\thandleClick = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && typeof rowDef.onClick === 'function') {\n\t\t\trowDef.onClick(item);\n\t\t}\n\t};\n\n\tgetTooltip = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && typeof rowDef.getTooltip === 'function') {\n\t\t\treturn rowDef.getTooltip(item);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t};\n\n\tgetRowStyle = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && rowDef.getRowStyle) {\n\t\t\treturn rowDef.getRowStyle(item);\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {columnDefs, item, tableName} = this.props;\n\t\treturn (\n\t\t\t<tr\n\t\t\t\tclassName={this.getRowClass()}\n\t\t\t\tonClick={this.handleClick}\n\t\t\t\ttitle={this.getTooltip()}\n\t\t\t\tstyle={this.getRowStyle()}\n\t\t\t>\n\t\t\t\t{columnDefs.map((columnDef) => {\n\t\t\t\t\tconst textAlign = columnDef.align || 'left';\n\t\t\t\t\tconst cursor = columnDef.onClick ? 'pointer' : 'inherit';\n\t\t\t\t\tconst whiteSpace = columnDef.whiteSpace || undefined;\n\t\t\t\t\tconst onClick = columnDef.onClick\n\t\t\t\t\t\t? () => (columnDef.onClick ? columnDef.onClick(item) : undefined)\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<td\n\t\t\t\t\t\t\tkey={`${item.id}_${columnDef.name}`}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\ttextAlign,\n\t\t\t\t\t\t\t\tcursor,\n\t\t\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t\t\twhiteSpace\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t\t\tclassName={getClassName(tableName, columnDef.name)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{columnDef.render(item)}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</tr>\n\t\t);\n\t}\n}\n","import cx from 'classnames';\nimport {useEffect, useRef, useState} from 'react';\nimport {Trans} from '../../../i18n';\n\nimport {readAccountObject, writeAccountObject} from '@deviceinsight/ng-ui-api-client';\nimport {Button, Modal, SpinnerContainer} from '@deviceinsight/ng-ui-basic-components';\nimport {Pageable, PaginationSettings, SortDirection} from '../../../types/pagination';\nimport {ReactableColumnDef, ReactableFilterSettings, ReactableRowDef} from '../types';\nimport ReactableTableFilterRow from './ReactableTableFilterRow';\nimport ReactableTableHeader from './ReactableTableHeader';\nimport ReactableTableRow from './ReactableTableRow';\n\ntype Props<T, ID extends string | number | undefined | null> = {\n\tcolumnDefs: ReactableColumnDef<T>[];\n\tuniqueItemKey: (item: T) => ID;\n\tpaginationSettings: PaginationSettings;\n\tonSort: (property: string, direction: SortDirection) => void;\n\tonFilter?: (filterSettings: ReactableFilterSettings) => void;\n\ttableName?: string;\n\tpageable?: Pageable<T> | null;\n\tisLoading: boolean;\n\trowDef?: ReactableRowDef<T>;\n\tclickable?: boolean;\n\tmessageWhenEmpty?: string;\n\t'data-testid'?: string;\n};\n\nexport default function ReactableTable<T, ID extends string | number | undefined | null>({\n\tcolumnDefs,\n\tuniqueItemKey,\n\tpaginationSettings,\n\tonSort,\n\tonFilter,\n\ttableName,\n\tpageable,\n\tisLoading,\n\trowDef,\n\tclickable,\n\tmessageWhenEmpty,\n\t'data-testid': testId\n}: Props<T, ID>) {\n\tconst containerRef = useRef<HTMLDivElement | null>(null);\n\tconst tableRef = useRef<HTMLTableElement | null>(null);\n\tconst [showScrollingAdvice, setShowScrollingAdvice] = useState(false);\n\tconst [neverShowScrollingAdvice, setNeverShowScrollingAdvice] = useState(true);\n\tconst [hasInitialized, setHasInitialized] = useState(false);\n\tconst HIDE_SCROLLING_ADVICE_PATH = 'uiConfigurations/nevershowscrollingadvice';\n\tconst LOCALSTORAGE_KEY = 'reactable.neverShowScrollingAdvice';\n\tconst neverShowScrollingAdviceRef = useRef(neverShowScrollingAdvice);\n\n\tuseEffect(() => {\n\t\tneverShowScrollingAdviceRef.current = neverShowScrollingAdvice;\n\t}, [neverShowScrollingAdvice]);\n\n\tconst updateScrollingAdvice = () => {\n\t\tif (containerRef.current && tableRef.current) {\n\t\t\tsetShowScrollingAdvice(\n\t\t\t\t!neverShowScrollingAdviceRef.current && tableRef.current.scrollWidth > containerRef.current.offsetWidth\n\t\t\t);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tsetTimeout(() => {\n\t\t\t(async () => {\n\t\t\t\t// First check localStorage for immediate feedback\n\t\t\t\tconst localValue = localStorage.getItem(LOCALSTORAGE_KEY);\n\t\t\t\tconst hasLocalValue = localValue !== null;\n\n\t\t\t\ttry {\n\t\t\t\t\tconst value = await readAccountObject(HIDE_SCROLLING_ADVICE_PATH);\n\t\t\t\t\tconst neverShow = value === true;\n\t\t\t\t\tsetNeverShowScrollingAdvice(neverShow);\n\t\t\t\t\tneverShowScrollingAdviceRef.current = neverShow;\n\t\t\t\t\t// Sync localStorage with server value\n\t\t\t\t\tlocalStorage.setItem(LOCALSTORAGE_KEY, String(neverShow));\n\t\t\t\t\tif (!neverShow) {\n\t\t\t\t\t\tupdateScrollingAdvice();\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// On network error, fall back to localStorage\n\t\t\t\t\tif (hasLocalValue) {\n\t\t\t\t\t\tconst neverShow = localValue === 'true';\n\t\t\t\t\t\tsetNeverShowScrollingAdvice(neverShow);\n\t\t\t\t\t\tneverShowScrollingAdviceRef.current = neverShow;\n\t\t\t\t\t\tif (!neverShow) {\n\t\t\t\t\t\t\tupdateScrollingAdvice();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No localStorage value - this is a truly new user, show the advice\n\t\t\t\t\t\tsetNeverShowScrollingAdvice(false);\n\t\t\t\t\t\tneverShowScrollingAdviceRef.current = false;\n\t\t\t\t\t\tupdateScrollingAdvice();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetHasInitialized(true);\n\t\t\t})();\n\t\t}, 0);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tupdateScrollingAdvice();\n\t\twindow.addEventListener('resize', updateScrollingAdvice);\n\t\treturn () => window.removeEventListener('resize', updateScrollingAdvice);\n\t}, [pageable, columnDefs]);\n\n\tconst showFilterRow = columnDefs.some((col) => col.filterable);\n\n\treturn (\n\t\t<SpinnerContainer show={isLoading}>\n\t\t\t<div ref={containerRef} className=\"di reactable scroll-x\">\n\t\t\t\t{hasInitialized && showScrollingAdvice && !isLoading && (\n\t\t\t\t\t<Modal\n\t\t\t\t\t\tclassName=\"scroll-horizontally-advice\"\n\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.scrollHorizontally.advice\">\n\t\t\t\t\t\t\t\t\tSHIFT + mouse wheel to scroll horizontally\n\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t<div className=\"scroll-horizontally-advice-buttons\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tprimary\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait writeAccountObject(HIDE_SCROLLING_ADVICE_PATH, true);\n\t\t\t\t\t\t\t\t\t\t\tlocalStorage.setItem(LOCALSTORAGE_KEY, 'true');\n\t\t\t\t\t\t\t\t\t\t\tsetNeverShowScrollingAdvice(true);\n\t\t\t\t\t\t\t\t\t\t\tneverShowScrollingAdviceRef.current = true;\n\t\t\t\t\t\t\t\t\t\t\tsetShowScrollingAdvice(false);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.scrollHorizontally.neverShowAgain\">\n\t\t\t\t\t\t\t\t\t\t\tNever show again\n\t\t\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button onClick={() => setShowScrollingAdvice(false)}>\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.scrollHorizontally.ok\">OK</Trans>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidth={'40%'}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<table\n\t\t\t\t\tref={tableRef}\n\t\t\t\t\tclassName={cx('di reactable sortable hoverable', {selectable: clickable})}\n\t\t\t\t\tdata-testid={testId}\n\t\t\t\t>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<ReactableTableHeader\n\t\t\t\t\t\t\tcolumnDefs={columnDefs}\n\t\t\t\t\t\t\tpaginationSettings={paginationSettings}\n\t\t\t\t\t\t\tonSort={onSort}\n\t\t\t\t\t\t\ttableName={tableName}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t{onFilter && showFilterRow && (\n\t\t\t\t\t\t\t<ReactableTableFilterRow\n\t\t\t\t\t\t\t\tcolumnDefs={columnDefs}\n\t\t\t\t\t\t\t\tonFilter={onFilter}\n\t\t\t\t\t\t\t\ttableName={tableName}\n\t\t\t\t\t\t\t\tdata-testid={testId}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{pageable?.content.length\n\t\t\t\t\t\t\t? pageable.content\n\t\t\t\t\t\t\t\t\t.slice(0, paginationSettings.size)\n\t\t\t\t\t\t\t\t\t.map((item) => (\n\t\t\t\t\t\t\t\t\t\t<ReactableTableRow\n\t\t\t\t\t\t\t\t\t\t\tkey={uniqueItemKey(item)}\n\t\t\t\t\t\t\t\t\t\t\tcolumnDefs={columnDefs}\n\t\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\t\trowDef={rowDef}\n\t\t\t\t\t\t\t\t\t\t\ttableName={tableName}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t: !isLoading && (\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colSpan={columnDefs.length}>\n\t\t\t\t\t\t\t\t\t\t\t<Trans i18nKey={messageWhenEmpty ?? 'reactable.noEntriesFound'}>\n\t\t\t\t\t\t\t\t\t\t\t\tNo entries found\n\t\t\t\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</SpinnerContainer>\n\t);\n}\n","import {Component} from 'react';\n\nimport Pagination from '../pagination/Pagination';\nimport ReactableTable from './helpers/ReactableTable';\nimport {ReactableColumnDef, ReactableRowDef, ReactableFilterSettings} from './types';\nimport {Pageable, PaginationSettings, SortDirection} from '../../types/pagination';\n\nexport type Props<T, ID extends string | number | undefined | null = any> = {\n\t/** Array of column definitions, each column can be configured independently */\n\tcolumnDefs: Array<ReactableColumnDef<T>>;\n\n\t/** Function, sets identifier for each element in Reactable */\n\tuniqueItemKey: (item: T) => ID;\n\n\t/** Settings for paginated content */\n\tpaginationSettings: PaginationSettings;\n\n\t/** Function, executed if the current page changes */\n\tonChangePage: (page: number) => void;\n\n\t/** Function, executed if sorting changes */\n\tonSort: (property: string, direction: SortDirection) => void;\n\n\t/** (Optional) function, executed if the page size changes */\n\tonChangeSize?: (size: number) => void;\n\n\t/** (Optional) function, executed if the Reactable gets filtered */\n\tonFilter?: (filterSettings: ReactableFilterSettings) => void;\n\n\t/** (Optional) name of the table */\n\ttableName?: string;\n\n\t/** Content, totalElements, totalPages, number, size, sort */\n\tpageable: Pageable<T> | null | undefined;\n\n\t/** (Optional) can set custom event handler and/or functions in general */\n\trowDef?: ReactableRowDef<T>;\n\n\t/** It true, shows loading indicator */\n\tisLoading: boolean;\n\n\t/** (Optional) if true, makes rows clickable */\n\tclickable?: boolean;\n\n\t/** (Optional) shown message when the table is empty */\n\tmessageWhenEmpty?: string;\n\n\t'data-testid'?: string;\n};\n\n/**\n * Reactable displays paginated results nicely, while adding the possibility to add further functionality to each row.\n * Each column can also be extended to be sortable and/or filterable\n */\nexport default class Reactable<T = any, ID extends string | number | undefined | null = any> extends Component<\n\tProps<T, ID>\n> {\n\tcomponentDidUpdate() {\n\t\tconst {pageable, paginationSettings, onChangePage} = this.props;\n\n\t\tif (!pageable) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst totalPages = pageable.totalPages || 0;\n\t\tconst currentPage = paginationSettings.page;\n\t\tconst clampedPage = totalPages > 0 ? Math.min(currentPage, totalPages - 1) : 0;\n\n\t\tif (currentPage !== clampedPage) {\n\t\t\tonChangePage(clampedPage);\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {paginationSettings, pageable, onChangePage, onChangeSize} = this.props;\n\t\tconst showPagination = onChangeSize\n\t\t\t? pageable && pageable.totalElements > 0\n\t\t\t: pageable && pageable.totalPages > 1;\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<ReactableTable<T, ID> {...this.props} />\n\t\t\t\t{pageable && showPagination && (\n\t\t\t\t\t<Pagination\n\t\t\t\t\t\tpage={paginationSettings.page}\n\t\t\t\t\t\ttotalPages={pageable.totalPages}\n\t\t\t\t\t\tonChangePage={onChangePage}\n\t\t\t\t\t\tonChangeSize={onChangeSize}\n\t\t\t\t\t\tsize={paginationSettings.size}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\nimport {isEqual, difference, uniqWith} from 'lodash';\n\nimport {Pageable, PaginationSettings, Sort, SortDirection} from '../../types/pagination';\nimport Reactable from '../reactable/Reactable';\nimport {ReactableColumnDef, ReactableRowDef, ReactableFilterSettings} from '../reactable/types';\nimport {extendColumnDefsWithCheckboxes, filterItems, makePageable} from '../reactable/helpers/helper';\n\nexport type Props<T, ID extends string | number | undefined | null = any> = {\n\t/** Array of column definitions, each column can be configured independently */\n\tcolumnDefs: Array<ReactableColumnDef<T>>;\n\n\t/** (Optional) can set custom event handler and/or functions in general */\n\trowDef?: ReactableRowDef<T>;\n\n\t/** Function, sets identifier for each element in Reactable */\n\tuniqueItemKey: (arg0: T) => ID;\n\n\t/**\n\t * (Deprecated) This property will be removed in the future release, use paginationSettings instead\n\t * @deprecated\n\t */\n\tinitialPaginationSettings?: PaginationSettings;\n\n\t/** (Optional) settings for paginated content */\n\tpaginationSettings?: PaginationSettings;\n\t// todo make required when initialPaginationSettings will be removed\n\n\t/** Array of elements */\n\titems: Array<T> | null | undefined;\n\n\t/** It true, shows loading indicator */\n\tisLoading: boolean;\n\n\t/** (Optional) sets custom sort function */\n\tcustomSortFunction?: (\n\t\titems: Array<T>,\n\t\tsort: Sort,\n\t\tdefaultSortItems: (items: Array<T>, sort: Sort) => Array<T>\n\t) => Array<T>;\n\n\t/** (Optional) if set, resets pagination to initial state if items change */\n\tforceResetPaginationOnItemsChange?: boolean;\n\n\t/** (Optional) Function, executed on filter */\n\tonFilter?: (filterSettings: ReactableFilterSettings) => void;\n\n\t/** (Optional) Function, executed on content change */\n\tonContentChange?: (content: Array<T>) => void;\n\n\t/** (Optional) Function, executed if filtered items change */\n\tonFilteredItemsChanged?: (filteredItems: Array<T>) => void;\n\n\t/** (Optional) name of the table */\n\ttableName?: string;\n\n\t/** (Optional) if true, makes rows clickable */\n\tclickable?: boolean;\n\n\t/** If equals *true* additional column with checkboxes is rendered */\n\tselectable?: boolean;\n\n\t/** (Optional) enables selection of items */\n\tselectedItems?: Array<ID>;\n\n\t/** (Optional) function, executed on change of selected items */\n\tonSelectedItemsChange?: (selectedItems: Array<ID>) => void;\n\n\t/** (Optional) function, executed if the page size changes */\n\tonChangeSize?: (size: number) => void;\n\n\t'data-testid'?: string;\n};\n\ntype State<T> = {\n\tpaginationSettings: PaginationSettings;\n\tfilterSettings: ReactableFilterSettings;\n\tfilteredItems: Array<T> | null | undefined;\n};\n\nconst DEFAULT_PAGINATION_SETTINGS: PaginationSettings = {\n\tpage: 0,\n\tsize: 15,\n\tsort: {\n\t\tproperty: 'name',\n\t\tdirection: 'DESC'\n\t}\n};\n\n/**\n * Reactable displays paginated results nicely, while adding the possibility to add further functionality to each row.\n * Each column can also be extended to be sortable and/or filterable.\n * Also adds client-side pagination.\n */\nexport default class ReactableWithClientSidePagination<\n\tT = any,\n\tID extends string | number | undefined | null = any\n> extends Component<Props<T, ID>, State<T>> {\n\tconstructor(props: Props<T>) {\n\t\tsuper(props);\n\t\tlet paginationSettings = DEFAULT_PAGINATION_SETTINGS;\n\n\t\tif (props.paginationSettings) {\n\t\t\tpaginationSettings = props.paginationSettings;\n\t\t} else if (props.initialPaginationSettings) {\n\t\t\tconsole.warn('initialPaginationSettings is deprecated! Please use \"paginationSettings\" instead');\n\t\t\tpaginationSettings = props.initialPaginationSettings;\n\t\t} else {\n\t\t\tconsole.error('Missing pagination settings!');\n\t\t}\n\n\t\tthis.state = {\n\t\t\tpaginationSettings: paginationSettings || DEFAULT_PAGINATION_SETTINGS,\n\t\t\tfilterSettings: {},\n\t\t\tfilteredItems: null\n\t\t};\n\t}\n\n\tprivate content: Array<T> = [];\n\n\tcalculatePageNumber: (items: Array<T>, paginationSettings: PaginationSettings) => void = (\n\t\titems: Array<T>,\n\t\tpaginationSettings: PaginationSettings\n\t) => {\n\t\tconst {forceResetPaginationOnItemsChange} = this.props;\n\n\t\tif (!forceResetPaginationOnItemsChange) {\n\t\t\tconst maxPageNumber = Math.floor((items.length - 1) / paginationSettings.size);\n\n\t\t\tif (maxPageNumber <= 0) {\n\t\t\t\tthis.handleChangePage(0);\n\t\t\t} else if (maxPageNumber < paginationSettings.page) {\n\t\t\t\tthis.handleChangePage(maxPageNumber);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.handleChangePage(0);\n\t\t}\n\t};\n\n\tcomponentDidUpdate(prevProps: Props<T>) {\n\t\tconst {items} = this.props;\n\t\tconst {items: prevItems} = prevProps;\n\t\tconst settings = this.props.paginationSettings || this.props.initialPaginationSettings;\n\t\tconst prevSettings = prevProps.paginationSettings || prevProps.initialPaginationSettings;\n\n\t\tif (items && prevItems && items.length !== prevItems.length) {\n\t\t\tthis.calculatePageNumber(items, this.state.paginationSettings);\n\t\t}\n\n\t\tif (settings && !isEqual(settings, prevSettings)) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tpaginationSettings: settings\n\t\t\t\t},\n\t\t\t\t() => this.handleChangePage(0)\n\t\t\t);\n\t\t}\n\t}\n\n\thandleChangePage: (page: number) => void = (page: number) => {\n\t\tthis.setState({\n\t\t\tpaginationSettings: {...this.state.paginationSettings, page}\n\t\t});\n\t};\n\n\thandleSort: (property: string, direction: SortDirection) => void = (property: string, direction: SortDirection) => {\n\t\tthis.setState({\n\t\t\tpaginationSettings: {\n\t\t\t\t...this.state.paginationSettings,\n\t\t\t\tsort: {\n\t\t\t\t\tproperty,\n\t\t\t\t\tdirection\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\thandleFilter: (filterSettings: ReactableFilterSettings) => void = (filterSettings: ReactableFilterSettings) => {\n\t\tconst {items, onFilter, columnDefs, onFilteredItemsChanged} = this.props;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tpaginationSettings: {...this.state.paginationSettings, page: 0},\n\t\t\t\tfilterSettings\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (onFilter) {\n\t\t\t\t\tonFilter(filterSettings);\n\t\t\t\t}\n\t\t\t\tconst filteredItems = filterItems(items, columnDefs, filterSettings);\n\t\t\t\tthis.setState({\n\t\t\t\t\tfilteredItems\n\t\t\t\t});\n\n\t\t\t\tif (filteredItems) {\n\t\t\t\t\tonFilteredItemsChanged?.(filteredItems);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tgetPageable: () => Pageable<T> | null | undefined = () => {\n\t\tconst {customSortFunction, items, columnDefs, onContentChange} = this.props;\n\t\tconst {filterSettings, paginationSettings} = this.state;\n\t\tconst filteredItems = filterItems(items, columnDefs, filterSettings);\n\t\tconst pageable = makePageable<T>(filteredItems, paginationSettings, customSortFunction);\n\n\t\tif (pageable && pageable.content && !isEqual(pageable.content, this.content)) {\n\t\t\tthis.content = pageable.content;\n\n\t\t\tif (onContentChange) {\n\t\t\t\tonContentChange(this.content);\n\t\t\t}\n\t\t}\n\n\t\treturn pageable;\n\t};\n\n\thandleSelectChange: (selected: boolean, item: T) => void = (selected: boolean, item: T) => {\n\t\tconst {onSelectedItemsChange, selectedItems = [], uniqueItemKey} = this.props;\n\n\t\tif (onSelectedItemsChange) {\n\t\t\tif (selected) {\n\t\t\t\tconst newSelectedItems = selectedItems.concat(uniqueItemKey(item));\n\t\t\t\tonSelectedItemsChange(newSelectedItems);\n\t\t\t} else {\n\t\t\t\tonSelectedItemsChange(selectedItems.filter((key) => key !== uniqueItemKey(item)));\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.warn('ReactableWithClientSidePagination: onSelectedItemsChange property is missing');\n\t\t}\n\t};\n\n\thandleSelectAllChange: (selectedAll: boolean) => void = (selectedAll: boolean) => {\n\t\tconst {onSelectedItemsChange, items, selectedItems = [], uniqueItemKey} = this.props;\n\t\tconst {filteredItems} = this.state;\n\t\tconst visibleItems = (filteredItems || items || []).map(uniqueItemKey);\n\n\t\tif (onSelectedItemsChange) {\n\t\t\tif (selectedAll) {\n\t\t\t\tonSelectedItemsChange(uniqWith([...selectedItems, ...visibleItems], isEqual).sort());\n\t\t\t} else {\n\t\t\t\tonSelectedItemsChange(difference(selectedItems, visibleItems));\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.warn('ReactableWithClientSidePagination: onSelectedItemsChange property is missing');\n\t\t}\n\t};\n\n\tareSelectedAll: () => boolean = () => {\n\t\tconst {items, selectedItems, uniqueItemKey} = this.props;\n\t\tconst {filteredItems} = this.state;\n\t\tconst visibleItems = filteredItems || items || [];\n\t\treturn (\n\t\t\t!!selectedItems && visibleItems.every((item) => selectedItems.some((key) => key === uniqueItemKey(item)))\n\t\t);\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tuniqueItemKey,\n\t\t\tisLoading,\n\t\t\tcolumnDefs,\n\t\t\trowDef,\n\t\t\ttableName,\n\t\t\tclickable,\n\t\t\tselectable,\n\t\t\tselectedItems,\n\t\t\tonChangeSize\n\t\t} = this.props;\n\t\tconst finalColumnDefs = selectable\n\t\t\t? extendColumnDefsWithCheckboxes(\n\t\t\t\t\tcolumnDefs,\n\t\t\t\t\tthis.handleSelectChange,\n\t\t\t\t\tthis.handleSelectAllChange,\n\t\t\t\t\tthis.areSelectedAll(),\n\t\t\t\t\tselectedItems || [],\n\t\t\t\t\tuniqueItemKey\n\t\t\t\t)\n\t\t\t: columnDefs;\n\t\treturn (\n\t\t\t<Reactable<T, ID>\n\t\t\t\tcolumnDefs={finalColumnDefs}\n\t\t\t\trowDef={rowDef}\n\t\t\t\tuniqueItemKey={uniqueItemKey}\n\t\t\t\tpaginationSettings={this.state.paginationSettings}\n\t\t\t\tonChangePage={this.handleChangePage}\n\t\t\t\tonChangeSize={onChangeSize}\n\t\t\t\tonSort={this.handleSort}\n\t\t\t\tonFilter={this.handleFilter}\n\t\t\t\ttableName={tableName}\n\t\t\t\tpageable={this.getPageable()}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tclickable={clickable}\n\t\t\t\tdata-testid={this.props['data-testid']}\n\t\t\t/>\n\t\t);\n\t}\n}\n","import cx from 'classnames';\n/* eslint no-unused-vars: 0 */\nimport * as React from 'react';\nimport Dropzone, {Accept, FileRejection} from 'react-dropzone';\nimport classNames from 'classnames';\nimport {Trans} from '../../i18n';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\nexport type DropzoneFileRejection = FileRejection;\n\nexport interface DropzoneFile extends File {\n\tpreview?: string;\n}\n\nexport type PreviewComponentProps = {\n\tfile: DropzoneFile | null;\n\tonRemoveFile: () => void;\n\tonDownloadFile?: (() => void) | undefined;\n};\n\nexport type Props = {\n\t/** (Optional) string for accepting files */\n\taccept?: Accept;\n\n\t/** Optional Function, executed to download the file */\n\tonDownloadFile?: (file: DropzoneFile) => void;\n\n\t/** (Optional) function, executed when a file gets dragged into the upload field and accepted */\n\tonDropAccepted?: () => void;\n\n\t/** (Optional) function, executed when a file gets dragged into the upload field and rejected */\n\tonDropRejected?: (files: FileRejection[]) => void;\n\n\t/** (Optional) Hint for dragging files into upload field */\n\tdropHint?: TranslationDescriptor;\n\n\t/** (Optional) Hint for hovering over upload field */\n\thoverHint?: TranslationDescriptor;\n\n\t/** (Optional) Hint for accepting file in upload field*/\n\tacceptHint?: TranslationDescriptor;\n\n\t/** (Optional) Hint for rejecting file in upload field*/\n\trejectHint?: TranslationDescriptor;\n\n\t/** (Optional) Component to display preview of uploaded field */\n\tpreviewComponent?: React.ComponentType<PreviewComponentProps>;\n\n\t/** (Optional) Maximum upload size */\n\tmaxSize?: number;\n} & (\n\t| {\n\t\t\t/** (Optional) accept multiple files */\n\t\t\tmultiple?: false;\n\n\t\t\t/** Function, executed when files get added or removed */\n\t\t\tonChange?: (files: DropzoneFile[]) => void;\n\n\t\t\t/** Function, executed when a file gets removed */\n\t\t\tonRemoveFile: (file: DropzoneFile) => void;\n\n\t\t\t/** Function, executed when a file gets selected */\n\t\t\tonSelectFile: (file: DropzoneFile) => void;\n\t }\n\t| {\n\t\t\t/** (Optional) accept multiple files */\n\t\t\tmultiple: true;\n\n\t\t\t/** Function, executed when files get added or removed */\n\t\t\tonChange: (files: DropzoneFile[]) => void;\n\n\t\t\t/** Function, executed when a file gets removed */\n\t\t\tonRemoveFile?: (file: DropzoneFile) => void;\n\n\t\t\t/** Function, executed when a file gets selected */\n\t\t\tonSelectFile?: (file: DropzoneFile) => void;\n\t }\n);\n\nexport type State = {\n\tfiles: DropzoneFile[];\n};\n\n/**\n * FileUpload enables the possibility to upload files conveniently\n */\nexport default class FileUpload extends React.Component<Props, State> {\n\tstatic defaultProps: {\n\t\tacceptHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t\tdropHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t\thoverHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t\trejectHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t} = {\n\t\tdropHint: {\n\t\t\tid: 'fileUpload.dropHint',\n\t\t\tdefaultValue: 'Drop file here, or click to browse ...'\n\t\t},\n\t\thoverHint: {\n\t\t\tid: 'fileUpload.hoverHint',\n\t\t\tdefaultValue: 'Drop file here, or click to browse ...'\n\t\t},\n\t\tacceptHint: {\n\t\t\tid: 'fileUpload.acceptHint',\n\t\t\tdefaultValue: 'This file type can be uploaded'\n\t\t},\n\t\trejectHint: {\n\t\t\tid: 'fileUpload.rejectHint',\n\t\t\tdefaultValue: 'This file type cannot be uploaded'\n\t\t}\n\t};\n\n\tstate: State = {\n\t\tfiles: []\n\t};\n\n\thandleDrop = (accepted: DropzoneFile[], rejected: FileRejection[]) => {\n\t\tif (!this.props.multiple && accepted.length > 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (rejected.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t/** Prevent console error on <Dropzone /> component */\n\t\tsetTimeout(() => this.selectFile(accepted), 100);\n\t};\n\n\tselectFile: (files: DropzoneFile[]) => void = (files) => {\n\t\tconst {onSelectFile, onChange} = this.props;\n\t\tfiles.forEach((file) => {\n\t\t\tfile.preview = URL.createObjectURL(file);\n\t\t});\n\t\tconst newFiles = [...this.state.files, ...files];\n\t\tthis.setState({files: newFiles});\n\t\tonChange?.(newFiles);\n\t\tif (onSelectFile) {\n\t\t\tfiles.forEach((file) => {\n\t\t\t\tonSelectFile(file);\n\t\t\t});\n\t\t}\n\t};\n\n\thandleRemoveFile: (file: DropzoneFile) => void = (file) => {\n\t\tconst {files} = this.state;\n\n\t\tif (file) {\n\t\t\tif (file.preview) window.URL.revokeObjectURL(file.preview);\n\t\t\tconst newFiles = files.filter((f) => f !== file);\n\t\t\tthis.setState({files: newFiles});\n\t\t\tthis.props.onChange?.(newFiles);\n\t\t\tthis.props.onRemoveFile?.(file);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {files} = this.state;\n\t\tconst {\n\t\t\taccept,\n\t\t\tpreviewComponent: Preview,\n\t\t\tdropHint,\n\t\t\thoverHint,\n\t\t\tacceptHint,\n\t\t\trejectHint,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\tonChange,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\tonRemoveFile,\n\t\t\tonDownloadFile,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\tonSelectFile,\n\t\t\tonDropRejected,\n\t\t\tonDropAccepted,\n\t\t\tmaxSize,\n\t\t\tmultiple,\n\t\t\t...otherProps\n\t\t} = this.props;\n\t\tconst dropHintOrDefault = dropHint || FileUpload.defaultProps.dropHint;\n\t\tconst hoverHintOrDefault = hoverHint || FileUpload.defaultProps.hoverHint;\n\t\tconst acceptHintOrDefault = acceptHint || FileUpload.defaultProps.acceptHint;\n\t\tconst rejectHintOrDefault = rejectHint || FileUpload.defaultProps.rejectHint;\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...otherProps}\n\t\t\t\tclassName={classNames('di upload', {\n\t\t\t\t\tclickable: !files.length,\n\t\t\t\t\thasContent: !!files.length\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{!!Preview &&\n\t\t\t\t\tfiles.map((file, i) => (\n\t\t\t\t\t\t<Preview\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tfile={file}\n\t\t\t\t\t\t\tonRemoveFile={() => this.handleRemoveFile(file)}\n\t\t\t\t\t\t\tonDownloadFile={onDownloadFile ? () => onDownloadFile(file) : undefined}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t{(multiple || !files.length) && (\n\t\t\t\t\t<Dropzone\n\t\t\t\t\t\taccept={accept}\n\t\t\t\t\t\tmultiple={multiple ?? false}\n\t\t\t\t\t\tonDrop={this.handleDrop}\n\t\t\t\t\t\tonDropRejected={onDropRejected}\n\t\t\t\t\t\tonDropAccepted={onDropAccepted}\n\t\t\t\t\t\tmaxSize={maxSize || Infinity}\n\t\t\t\t\t>\n\t\t\t\t\t\t{({getRootProps, getInputProps, isDragAccept, isDragReject, isDragActive}) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={cx('drag-drop-text-container', {\n\t\t\t\t\t\t\t\t\tactive: isDragActive,\n\t\t\t\t\t\t\t\t\taccept: isDragAccept,\n\t\t\t\t\t\t\t\t\treject: isDragReject\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t{...getRootProps()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<input {...getInputProps()} />\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-hint\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={dropHintOrDefault.id}>{dropHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-hover-hint\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={hoverHintOrDefault.id}>{hoverHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-accept\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={acceptHintOrDefault.id}>{acceptHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-reject\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={rejectHintOrDefault.id}>{rejectHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Dropzone>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\nimport {Trans} from '../../i18n';\n\nimport FileUpload, {DropzoneFile, Props as FileUploadProps} from './FileUpload';\n\ntype PreviewComponentProps = {\n\turl: string;\n\timageSize?: 'contain' | 'cover';\n\tonRemoveFile: () => void;\n\tonDragOver: () => void;\n\tonDownloadFile?: () => void;\n};\n\nconst PreviewImage = ({url, imageSize, onRemoveFile, onDragOver, onDownloadFile}: PreviewComponentProps) => (\n\t<div className=\"di upload preview-container\" onDragOver={onDragOver}>\n\t\t<div\n\t\t\tclassName=\"preview\"\n\t\t\tstyle={{\n\t\t\t\tbackgroundImage: `url(${url})`,\n\t\t\t\t...(imageSize && {backgroundSize: imageSize})\n\t\t\t}}\n\t\t>\n\t\t\t<button className=\"action-button\" onClick={onRemoveFile} data-testid=\"delete-button\">\n\t\t\t\t<Trans i18nKey=\"imageUpload.remove\">Remove</Trans>\n\t\t\t</button>\n\t\t\t{onDownloadFile && (\n\t\t\t\t<button className=\"action-button\" onClick={onDownloadFile} data-testid=\"download-button\">\n\t\t\t\t\t<Trans i18nKey=\"imageUpload.download\">Download</Trans>\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t</div>\n);\n\nexport type Props = Omit<FileUploadProps, 'multiple'> & {\n\t/** (Optional) Url for the image preview */\n\timageUrl: string | null | undefined;\n\timageSize?: 'contain' | 'cover';\n};\n\ntype ImageUploadState = {\n\tdragOverPreview: boolean;\n\tfile: DropzoneFile | null;\n};\n\n/**\n * ImageUpload enables the possibility to upload images conveniently\n */\nexport default class ImageUpload extends Component<Props, ImageUploadState> {\n\tstate: ImageUploadState = {\n\t\tdragOverPreview: false,\n\t\tfile: null\n\t};\n\n\tcomponentDidUpdate(prevProps: Props): void {\n\t\tif (prevProps.imageUrl !== this.props.imageUrl) {\n\t\t\tthis.setState({\n\t\t\t\tdragOverPreview: false\n\t\t\t});\n\t\t}\n\t}\n\n\thandleDragOver: () => void = () => {\n\t\tthis.setState({\n\t\t\tdragOverPreview: true\n\t\t});\n\t};\n\n\trender() {\n\t\tconst {accept, imageUrl, imageSize, onSelectFile, onRemoveFile, onDownloadFile, ...otherProps} = this.props;\n\t\tconst {dragOverPreview, file} = this.state;\n\n\t\tif (imageUrl && !dragOverPreview && file) {\n\t\t\treturn (\n\t\t\t\t<PreviewImage\n\t\t\t\t\turl={imageUrl}\n\t\t\t\t\timageSize={imageSize}\n\t\t\t\t\tonRemoveFile={() => onRemoveFile?.(file)}\n\t\t\t\t\tonDownloadFile={onDownloadFile ? () => onDownloadFile(file) : undefined}\n\t\t\t\t\tonDragOver={this.handleDragOver}\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<FileUpload\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tonRemoveFile={(file) => {\n\t\t\t\t\t\tthis.setState({file: null});\n\t\t\t\t\t\tonRemoveFile?.(file);\n\t\t\t\t\t}}\n\t\t\t\t\tonSelectFile={(file) => {\n\t\t\t\t\t\tthis.setState({file});\n\t\t\t\t\t\tonSelectFile?.(file);\n\t\t\t\t\t}}\n\t\t\t\t\taccept={\n\t\t\t\t\t\taccept || {\n\t\t\t\t\t\t\t'image/*': ['.jpeg', '.jpg', '.png', '.webp']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t}\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ2MCwgMjAyMC8wNS8xMi0xNjowNDoxNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDplMjI2NGVmOC0xY2Q1LTgyNDQtOWQ5NS0yZDBjNGMxMmZkM2UiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDhENjczMThERTNEMTFFQUIwNjJCODBDQ0RGM0I4QkEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDhENjczMTdERTNEMTFFQUIwNjJCODBDQ0RGM0I4QkEiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjIgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTcyODQ4NjktNjA0NC0xZjQ2LTg2OWMtMjBlYzMwMTA0MWE2IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOmUyMjY0ZWY4LTFjZDUtODI0NC05ZDk1LTJkMGM0YzEyZmQzZSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PnOjy94AAABySURBVHjapFMJDsAgCFvJ/v/lbkvYEQ4naGIiShtaASS3lSWjRwA8d4/gAutxSLJrsr3/6kKUc0uPKnDgioQS2BKUwY8HBhzFoc+/31ipAF0JkoDY7cQyiWTmzJLADZN2HIwn2dD5Ct5EzBiK1XE+BBgAvZQfJzDjL2UAAAAASUVORK5CYII=\"","import * as React from 'react';\nimport {useHistory, useLocation} from 'react-router-dom';\nimport {useTranslation} from '../../i18n';\n\nimport {Button} from '@deviceinsight/ng-ui-basic-components';\n\nimport arrowBackIcon from '../../assets/img/icon-arrow-back.png';\nimport {TranslationDescriptor} from '../../types/i18n';\n\nexport type Props = {\n\t/** title which is going to be displayed */\n\ttitle: string | TranslationDescriptor;\n\n\t/** (optional) subtitle which is going to be displayed */\n\tsubtitle?: string | TranslationDescriptor;\n\n\t/** (optional) if set to true, enables back button */\n\tparentPageLink?: boolean;\n\n\t/** (optional) if set, navigates back got certain parent page */\n\tsubPagePathPrefix?: string;\n\n\t/** @ignore */\n\tsubPagePathPrefixArray?: Array<string>;\n\n\t/** (optional) renders additional components as children */\n\tchildren?: React.ReactNode;\n};\n\n/**\n * `parentPageLink` set to true shows a back button to go to the parent page.\n * `subPagePathPrefix` needs to be used with `parentPageLink` set to true. It allows to customize what is considered the parent page.\n * With only the `parentPageLink` set to true the parent page is the direct parent, e.g. of `/assets/1234/conditions/5678` the parent is `/assets/1234/conditions`\n * To make the parent of e.g. `/assets/1234/conditions/edit/5678` the page `/assets/1234/conditions`, `subPagePathPrefix=\"/edit\"` needs to be used.\n */\nconst ContentHeader = ({\n\tparentPageLink,\n\ttitle,\n\tsubPagePathPrefixArray,\n\tsubPagePathPrefix,\n\tsubtitle,\n\tchildren\n}: Props) => {\n\tconst {push} = useHistory();\n\tconst {pathname} = useLocation();\n\tconst {t} = useTranslation();\n\n\tconst goToParentPage = () => {\n\t\tif (subPagePathPrefix) {\n\t\t\tpush(pathname.substring(0, pathname.lastIndexOf(subPagePathPrefix)));\n\t\t} else if (subPagePathPrefixArray) {\n\t\t\tsubPagePathPrefixArray.forEach((pathPrefix) => {\n\t\t\t\tif (pathname.includes(pathPrefix)) {\n\t\t\t\t\tpush(pathname.substring(0, pathname.lastIndexOf(pathPrefix)));\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tpush(pathname.substring(0, pathname.lastIndexOf('/')));\n\t\t}\n\t};\n\n\tconst printStringOrMessage = (stringOrMessage: string | TranslationDescriptor) => {\n\t\tif (typeof stringOrMessage === 'string') {\n\t\t\treturn stringOrMessage;\n\t\t} else {\n\t\t\tconst {id, defaultValue} = stringOrMessage;\n\t\t\treturn t(id, {\n\t\t\t\tdefaultValue\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<h1 className=\"di header\">\n\t\t\t{parentPageLink && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={goToParentPage}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tmarginRight: '15px'\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={arrowBackIcon}\n\t\t\t\t\t\talt={t('general.navigation.goBack', {\n\t\t\t\t\t\t\tdefaultValue: 'Go Back'\n\t\t\t\t\t\t})}\n\t\t\t\t\t/>\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<span>{printStringOrMessage(title)}</span>\n\t\t\t{subtitle && <span className=\"search-result-count\">{printStringOrMessage(subtitle)}</span>}\n\t\t\t{children}\n\t\t</h1>\n\t);\n};\n\nexport default ContentHeader;\n","import dayjs from 'dayjs';\nimport {forwardRef, useEffect, useState} from 'react';\n\nimport DateInput from './DateInput';\nimport ValidatedTextInput from './ValidatedTextInput';\n\nconst formatTime = (timezone: string | undefined, date: number) => {\n\ttry {\n\t\treturn dayjs.tz(date, timezone).format('HH:mm');\n\t} catch (error) {\n\t\tconsole.error('DateTimeInput: Error while extracting time from date', error);\n\t\treturn '00:00';\n\t}\n};\n\nexport type Props = {\n\t/** the current value (millis since 1970-01-01) */\n\ttimestamp: number;\n\n\t/** callback function that is executed when the user picks a date */\n\tonChange: (date: number | null | undefined, fromTextField?: boolean) => void;\n\n\t/** (optional) if set to true, displays warning styles */\n\twarning?: boolean;\n\n\t/** displays the DateTimeInput read-only */\n\treadOnly?: boolean;\n\tselectsStart?: boolean;\n\tselectsEnd?: boolean;\n\tstartDate?: Date;\n\tendDate?: Date;\n\n\t/** (optional) locale, if not set, the i18next.language is taken */\n\tlocale?: string;\n\n\t/** (optional) timezone */\n\ttimezone?: string;\n};\n\n/**\n * Extends DateInput but also displaying the current time.\n * Usually the user's locale is used for displaying the correct date format.\n */\nconst DateTimeInput = forwardRef<HTMLInputElement, Props>(\n\t({timestamp, timezone, warning, readOnly = false, onChange, ...otherProps}: Props, ref) => {\n\t\tconst [time, setTime] = useState<string>(formatTime(timezone, timestamp));\n\t\tconst timeValue = time == null ? formatTime(timezone, timestamp) : time;\n\n\t\tuseEffect(() => {\n\t\t\tsetTime(formatTime(timezone, timestamp));\n\t\t}, [timezone, timestamp]);\n\n\t\tfunction handleChangeDate(date: number | null | undefined, fromTextField?: boolean) {\n\t\t\tconst currentDate = dayjs.tz(timestamp, timezone);\n\t\t\tconst newDate = dayjs\n\t\t\t\t.tz(date, timezone)\n\t\t\t\t.set('hour', currentDate.hour())\n\t\t\t\t.set('minute', currentDate.minute())\n\t\t\t\t.set('second', currentDate.second())\n\t\t\t\t.set('millisecond', currentDate.millisecond());\n\n\t\t\tonChange(newDate.valueOf(), fromTextField);\n\t\t}\n\n\t\tfunction handleChangeTime(time: string, valid: boolean) {\n\t\t\tif (valid) {\n\t\t\t\tconst [hours, minutes] = time.split(':').map(Number);\n\t\t\t\tconst newDate = dayjs.tz(timestamp, timezone).set('hours', hours).set('minutes', minutes);\n\t\t\t\tonChange(newDate.valueOf(), true);\n\t\t\t}\n\t\t\tsetTime(time);\n\t\t}\n\n\t\tfunction tryFixTime() {\n\t\t\tif (time && /^[0-9]:[0-5][0-9]$/.test(time)) {\n\t\t\t\thandleChangeTime(time.padStart(5, '0'), true);\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<span className={`di date-time-input ${warning ? 'with-warning' : ''}`}>\n\t\t\t\t<DateInput\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tvalue={timestamp}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t\tonChange={handleChangeDate}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t/>\n\t\t\t\t<ValidatedTextInput\n\t\t\t\t\tdata-testid=\"time-input\"\n\t\t\t\t\tvalue={timeValue}\n\t\t\t\t\tonChange={handleChangeTime}\n\t\t\t\t\tpattern={/^(([01][0-9])|2[0-3]):[0-5][0-9]$/}\n\t\t\t\t\trequired\n\t\t\t\t\tinvalidStyle={{\n\t\t\t\t\t\tborderColor: 'red'\n\t\t\t\t\t}}\n\t\t\t\t\tplaceholder=\"00:00\"\n\t\t\t\t\tclassName=\"time\"\n\t\t\t\t\tonBlur={tryFixTime}\n\t\t\t\t\tdisabled={readOnly}\n\t\t\t\t/>\n\t\t\t</span>\n\t\t);\n\t}\n);\n\nexport default DateTimeInput;\n","import {Component, createRef} from 'react';\nimport {AsyncPaginate} from 'react-select-async-paginate';\n\nimport {Pageable} from '../../types/pagination';\nimport './react-select.css';\nimport './react-select-custom.css';\n\nexport type Props<Item, ID> = {\n\t/** Flag to preselect the status of the checkbox */\n\tvalue: ID | null | undefined;\n\n\t/** Function, executed when selecting value */\n\tonChange: (item: ID | null | undefined) => void;\n\n\t/** Identifier for value */\n\tvalueKey: string;\n\n\t/** Identifier for label */\n\tlabelKey: string;\n\n\t/** Function, executed when the component mounts and updates */\n\tsearchByQuery: (query: string, offset: number) => Promise<Pageable<Item>>;\n\n\t/** Function, executed when the component mounts and updates */\n\tsearchById: (id: ID) => Promise<Item | null | undefined>;\n\n\t/** (Optional) if set, returns a custom message if no results are available*/\n\tnoResultsMessage?: string;\n\n\t/** (Optional) if true, enables button to clear field on click */\n\tclearable?: boolean;\n\n\t/** (Optional) indicates if the component is disabled or not */\n\tdisabled?: boolean;\n\n\t/** (Optional) Whether the menu should use a portal, and where it should attach */\n\tmenuPortalTarget?: HTMLElement;\n\n\t/** Placeholder */\n\tplaceholder?: string;\n\n\t/** @ignore */\n\t'data-testid'?: string;\n};\n\ntype SelectItem<ID> = {\n\tvalue: ID;\n\tlabel: string;\n};\n\ntype State<ID extends string | number> = {\n\tcache: Record<ID, SelectItem<ID>>;\n\tcurrentItem: SelectItem<ID> | null | undefined;\n};\n\n/**\n * SelectWithSearchAsync enhances a native select list by applying a search functionality to it.\n * Fetches selectable results asynchronously while showing small loading indicator\n */\nexport default class SelectWithSearchAsync<Item, ID extends string | number> extends Component<\n\tProps<Item, ID>,\n\tState<ID>\n> {\n\tstate: State<ID> = {\n\t\tcache: {} as Record<ID, SelectItem<ID>>,\n\t\tcurrentItem: null\n\t};\n\n\tselectRef = createRef<any>();\n\n\tcomponentDidMount() {\n\t\tconst {value, searchById} = this.props;\n\n\t\tif (value) {\n\t\t\tsearchById(value).then(this.addBackendItemToCache);\n\t\t}\n\n\t\tif (this.props['data-testid']) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (this.selectRef?.current?.controlRef) {\n\t\t\t\t\tthis.selectRef.current.controlRef.setAttribute('data-testid', this.props['data-testid']);\n\t\t\t\t}\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconst {value, searchById} = this.props;\n\t\tconst {currentItem} = this.state;\n\n\t\tif (value && (!currentItem || currentItem.value !== value)) {\n\t\t\tconst foundInCache = this.reloadItemFromCache();\n\n\t\t\tif (!foundInCache) {\n\t\t\t\tsearchById(value).then(this.addBackendItemToCache);\n\t\t\t}\n\t\t} else if (!value && currentItem) {\n\t\t\tthis.setState({\n\t\t\t\tcurrentItem: null\n\t\t\t});\n\t\t}\n\t}\n\n\ttransformBackendItemToSelectItem: (backendItem: any) => SelectItem<ID> = (backendItem: any) => {\n\t\tconst {labelKey, valueKey} = this.props;\n\t\treturn {\n\t\t\tvalue: backendItem[valueKey],\n\t\t\tlabel: backendItem[labelKey]\n\t\t};\n\t};\n\treloadItemFromCache: () => boolean = () => {\n\t\tconst {value} = this.props;\n\t\tconst {currentItem, cache} = this.state;\n\n\t\tif (value && (!currentItem || currentItem.value !== value) && cache[value]) {\n\t\t\tthis.setState({\n\t\t\t\tcurrentItem: cache[value]\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\taddBackendItemToCache: (item: Item | null | undefined) => void = (item: Item | null | undefined) => {\n\t\tif (item) {\n\t\t\tconst selectItem = this.transformBackendItemToSelectItem(item);\n\t\t\tconst id = selectItem.value;\n\t\t\tthis.setState(({cache}) => ({\n\t\t\t\tcache: {...cache, [id]: selectItem}\n\t\t\t}));\n\t\t}\n\t};\n\n\tfetchOptions: (input: string, options: Array<Item>) => Promise<{hasMore: boolean; options: Array<any>}> = async (\n\t\tinput: string,\n\t\toptions: Array<Item>\n\t) => {\n\t\tconst {searchByQuery} = this.props;\n\n\t\ttry {\n\t\t\tconst {content, number, totalPages} = await searchByQuery(input, options.length);\n\t\t\treturn {\n\t\t\t\toptions: content.map<any>(this.transformBackendItemToSelectItem),\n\t\t\t\thasMore: number < totalPages - 1\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconsole.error('Error fetching options:', error);\n\t\t\treturn {hasMore: false, options: []};\n\t\t}\n\t};\n\n\thandleChange: (item: SelectItem<ID> | null | undefined) => void = (item: SelectItem<ID> | null | undefined) => {\n\t\tconst {onChange} = this.props;\n\n\t\tif (item) {\n\t\t\tconst id = item.value;\n\t\t\tthis.setState(\n\t\t\t\t({cache}) => ({\n\t\t\t\t\tcache: {...cache, [id]: item}\n\t\t\t\t}),\n\t\t\t\t() => {\n\t\t\t\t\tonChange(id);\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tonChange(null);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {clearable, noResultsMessage, disabled, menuPortalTarget} = this.props;\n\t\tconst {currentItem} = this.state;\n\t\tconst dataTestId = this.props['data-testid'];\n\n\t\treturn (\n\t\t\t<AsyncPaginate\n\t\t\t\tselectRef={this.selectRef}\n\t\t\t\tclassName=\"select-search-container\"\n\t\t\t\tclassNamePrefix=\"select-search\"\n\t\t\t\tisClearable={clearable}\n\t\t\t\tnoResultsText={noResultsMessage}\n\t\t\t\tvalue={currentItem}\n\t\t\t\tonChange={this.handleChange}\n\t\t\t\t// @ts-ignore\n\t\t\t\tloadOptions={this.fetchOptions}\n\t\t\t\tisDisabled={disabled}\n\t\t\t\tmenuPortalTarget={menuPortalTarget}\n\t\t\t\tplaceholder={this.props.placeholder}\n\t\t\t\tformatOptionLabel={\n\t\t\t\t\tdataTestId\n\t\t\t\t\t\t? (option: SelectItem<ID>) => (\n\t\t\t\t\t\t\t\t<span data-testid={`${dataTestId}-option-${option.label}`}>{option.label}</span>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n}\n","import * as React from 'react';\nimport {Link} from 'react-router-dom';\n\nimport Context from './MultiMenuContext';\n\nexport type Props = {\n\tchildren: React.ReactNode;\n\tdisabled?: boolean;\n\ticon?: React.ReactNode;\n\tlinkTo?: string;\n\tonClick?: () => any;\n\t'data-testid'?: string;\n};\n\nexport default class MultiMenuItem extends React.PureComponent<Props> {\n\tcreateClickHandler: (toggleMenu: () => void) => () => void = (toggleMenu: () => void) => () => {\n\t\tconst {onClick} = this.props;\n\n\t\tif (onClick) {\n\t\t\tonClick();\n\t\t}\n\n\t\ttoggleMenu();\n\t};\n\n\trender() {\n\t\tconst {disabled, icon, children, linkTo} = this.props;\n\t\tconst dataTestId = this.props['data-testid'];\n\t\treturn (\n\t\t\t<Context.Consumer>\n\t\t\t\t{({toggleMenu}) =>\n\t\t\t\t\tlinkTo ? (\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tdata-testid={dataTestId}\n\t\t\t\t\t\t\tto={linkTo}\n\t\t\t\t\t\t\tclassName={`item ${disabled ? 'disabled' : ''}`}\n\t\t\t\t\t\t\tonClick={this.createClickHandler(toggleMenu)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{icon && <span className=\"item-icon\">{icon}</span>}\n\t\t\t\t\t\t\t<span className=\"item-text\">{children}</span>\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tdata-testid={dataTestId}\n\t\t\t\t\t\t\tclassName={`item ${disabled ? 'disabled' : ''}`}\n\t\t\t\t\t\t\tonClick={this.createClickHandler(toggleMenu)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{icon && <span className=\"item-icon\">{icon}</span>}\n\t\t\t\t\t\t\t<span className=\"item-text\">{children}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Context.Consumer>\n\t\t);\n\t}\n}\n","import {useRef, useState} from 'react';\nimport {isEqual} from 'lodash';\n\nimport {Period} from '../types';\nimport DateTimeInput from '../../input/DateTimeInput';\n\nconst ONE_HOUR = 60 * 60 * 1000;\n\ntype Props = {\n\tperiod: Period;\n\tonChange: (period: Period) => void;\n\treadOnly?: boolean;\n\tlocale?: string;\n\ttimezone?: string;\n};\n\nexport default function Inputs({period, onChange, readOnly, locale, timezone}: Props) {\n\tconst [showWarningTarget, setShowWarningTarget] = useState('');\n\tconst warningTimeoutRef = useRef<NodeJS.Timeout | undefined>(undefined);\n\tconst endDateRef = useRef<HTMLInputElement>(null);\n\n\tconst startDate = new Date(period.tsStart);\n\tconst endDate = new Date(period.tsEnd);\n\n\tfunction showWarning(target: 'date-from' | 'date-to') {\n\t\tif (warningTimeoutRef.current) {\n\t\t\tclearTimeout(warningTimeoutRef.current);\n\t\t}\n\t\tsetShowWarningTarget(target);\n\t\twarningTimeoutRef.current = setTimeout(() => setShowWarningTarget(''), 1000);\n\t}\n\n\tfunction handleChangeStartDate(timestamp: number | null | undefined, fromTextField?: boolean) {\n\t\tif (timestamp) {\n\t\t\tconst incorrect = period.tsEnd && timestamp > period.tsEnd;\n\t\t\tconst tsEnd = incorrect ? timestamp + ONE_HOUR : period.tsEnd;\n\n\t\t\tconst newPeriod = {\n\t\t\t\ttsStart: timestamp,\n\t\t\t\ttsEnd\n\t\t\t};\n\t\t\tif (!isEqual(newPeriod, period)) {\n\t\t\t\tonChange(newPeriod);\n\t\t\t}\n\n\t\t\tif (!fromTextField && endDateRef.current) {\n\t\t\t\tendDateRef.current.focus();\n\t\t\t}\n\n\t\t\tif (incorrect) {\n\t\t\t\tshowWarning('date-to');\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction handleChangeEndDate(timestamp: number | null | undefined) {\n\t\tif (timestamp) {\n\t\t\tconst incorrect = period.tsStart && timestamp < period.tsStart;\n\t\t\tconst tsStart = incorrect ? timestamp - ONE_HOUR : period.tsStart;\n\n\t\t\tconst newPeriod = {\n\t\t\t\ttsStart,\n\t\t\t\ttsEnd: timestamp\n\t\t\t};\n\t\t\tif (!isEqual(newPeriod, period)) {\n\t\t\t\tonChange(newPeriod);\n\t\t\t}\n\n\t\t\tif (incorrect) {\n\t\t\t\tshowWarning('date-from');\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (\n\t\t<span className=\"inputs\">\n\t\t\t<span data-testid=\"from-wrapper\">\n\t\t\t\t<DateTimeInput\n\t\t\t\t\ttimestamp={period.tsStart}\n\t\t\t\t\tonChange={handleChangeStartDate}\n\t\t\t\t\twarning={showWarningTarget === 'date-from'}\n\t\t\t\t\tselectsStart\n\t\t\t\t\tstartDate={startDate}\n\t\t\t\t\tendDate={endDate}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tlocale={locale}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t/>\n\t\t\t</span>\n\t\t\t - \n\t\t\t<span data-testid=\"to-wrapper\">\n\t\t\t\t<DateTimeInput\n\t\t\t\t\tref={endDateRef}\n\t\t\t\t\ttimestamp={period.tsEnd}\n\t\t\t\t\tonChange={handleChangeEndDate}\n\t\t\t\t\twarning={showWarningTarget === 'date-to'}\n\t\t\t\t\tselectsEnd\n\t\t\t\t\tstartDate={startDate}\n\t\t\t\t\tendDate={endDate}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tlocale={locale}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</span>\n\t);\n}\n","import {Component} from 'react';\nimport dayjs from 'dayjs';\nimport cx from 'classnames';\n\ntype OwnProps = {\n\tmonth?: number;\n\tyear?: number;\n\tonChange: (month: number, year: number) => void;\n};\n\ntype Props = OwnProps;\n\ntype State = {\n\tselectedMonth: number;\n\tselectedYear: number;\n\tdisplayedYear: number;\n};\n\nexport default class MonthPicker extends Component<Props, State> {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\t\tconst month = props.month !== null && props.month !== undefined ? props.month : dayjs().month() + 1;\n\t\tconst year = props.year !== null && props.year !== undefined ? props.year : dayjs().year();\n\t\tthis.state = {\n\t\t\tselectedMonth: month,\n\t\t\tselectedYear: year,\n\t\t\tdisplayedYear: year\n\t\t};\n\t}\n\n\ttdMonth = (month: number) => {\n\t\tconst {selectedMonth, selectedYear, displayedYear} = this.state;\n\t\treturn (\n\t\t\t<td\n\t\t\t\tdata-testid={`month-${month}-button`}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tthis.props.onChange(month, displayedYear);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tselectedMonth: month,\n\t\t\t\t\t\tselectedYear: displayedYear\n\t\t\t\t\t});\n\t\t\t\t}}\n\t\t\t\tclassName={cx({selected: month === selectedMonth && displayedYear === selectedYear})}\n\t\t\t>\n\t\t\t\t{dayjs(`${selectedYear}/${month.toString().padStart(2, '0')}/01`, 'YYYY/MM/DD').format('MMM')}\n\t\t\t</td>\n\t\t);\n\t};\n\n\trender() {\n\t\tconst {displayedYear} = this.state;\n\t\treturn (\n\t\t\t<div className=\"di monthpicker\">\n\t\t\t\t<div className=\"pager\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"page-nav prev\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tdisplayedYear: displayedYear - 1\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<span className=\"page-nav info\">{displayedYear}</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"page-nav next\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tdisplayedYear: displayedYear + 1\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"months\">\n\t\t\t\t\t<table\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tmargin: 'auto'\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(1)}\n\t\t\t\t\t\t\t\t{this.tdMonth(2)}\n\t\t\t\t\t\t\t\t{this.tdMonth(3)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(4)}\n\t\t\t\t\t\t\t\t{this.tdMonth(5)}\n\t\t\t\t\t\t\t\t{this.tdMonth(6)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(7)}\n\t\t\t\t\t\t\t\t{this.tdMonth(8)}\n\t\t\t\t\t\t\t\t{this.tdMonth(9)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(10)}\n\t\t\t\t\t\t\t\t{this.tdMonth(11)}\n\t\t\t\t\t\t\t\t{this.tdMonth(12)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","export default \"data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%23fff;%20}%20%3c/style%3e%3c/defs%3e%3cg%3e%3cg%3e%3crect%20class='cls-1'%20x='3.5'%20y='7.5'%20width='2'%20height='2'/%3e%3cpath%20d='M5,8V9H4V8H5M6,7H3v3H6V7Z'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%207%208%207%208%208%209%208%209%207%209%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='10'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='11%207%2010%207%2010%208%2011%208%2011%207%2011%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='12'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='13%207%2012%207%2012%208%2013%208%2013%207%2013%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='9'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%209%208%209%208%2010%209%2010%209%209%209%209'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%2011%208%2011%208%2012%209%2012%209%2011%209%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='6'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='7%2011%206%2011%206%2012%207%2012%207%2011%207%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='4'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='5%2011%204%2011%204%2012%205%2012%205%2011%205%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='10.5'%20y='9.5'%20width='2'%20height='2'/%3e%3cpath%20d='M12,10v1H11V10h1m1-1H10v3h3V9Z'/%3e%3c/g%3e%3cpath%20d='M15.31,2H.69A.69.69,0,0,0,0,2.69V14.31A.69.69,0,0,0,.69,15H15.31a.69.69,0,0,0,.69-.69V2.69A.69.69,0,0,0,15.31,2ZM14,13H2V6H14Z'/%3e%3c/g%3e%3crect%20x='3'%20width='3'%20height='2'/%3e%3crect%20x='10'%20width='3'%20height='2'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpolygon%20points='7.5%2010%204%206%2011%206%207.5%2010'/%3e%3c/svg%3e\"","import dayjs from 'dayjs';\nimport timezone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\nimport {Period} from './types';\n\ndayjs.extend(timezone);\ndayjs.extend(utc);\n\nexport function dayjsTz(timezone: string | undefined, ts?: number | null | undefined) {\n\treturn timezone ? dayjs.tz(ts, timezone) : dayjs(ts);\n}\n\nexport function createToday(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).startOf('day').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).endOf('day').valueOf()\n\t};\n}\n\nexport function createYesterday(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).subtract(1, 'day').startOf('day').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).subtract(1, 'day').endOf('day').valueOf()\n\t};\n}\n\nexport function createCurrentWeek(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).startOf('week').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).endOf('week').valueOf()\n\t};\n}\n\nexport function createCurrentMonth(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).startOf('month').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).endOf('month').valueOf()\n\t};\n}\n\nexport function createWholeDay(tsMiddle: number, timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone, tsMiddle).startOf('day').valueOf(),\n\t\ttsEnd: dayjsTz(timezone, tsMiddle).endOf('day').valueOf()\n\t};\n}\n\nexport function createWholeMonth(tsMiddle: number, timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone, tsMiddle).startOf('month').valueOf(),\n\t\ttsEnd: dayjsTz(timezone, tsMiddle).endOf('month').valueOf()\n\t};\n}\n\nexport function createLastXDays(days: number, timezone: string | undefined) {\n\tconst tsStart = dayjsTz(timezone)\n\t\t.subtract(days - 1, 'days')\n\t\t.startOf('day')\n\t\t.valueOf();\n\tconst tsEnd = dayjs().endOf('day').valueOf();\n\n\treturn {tsStart, tsEnd};\n}\n\nconst DAY_TO_MILLIS = 1000 * 60 * 60 * 24;\n\nexport function periodToDays({tsStart, tsEnd}: Period): number {\n\treturn Math.round((tsEnd - tsStart + 1) / DAY_TO_MILLIS);\n}\n","import {useState} from 'react';\nimport {Trans} from '../../../i18n';\nimport dayjs from 'dayjs';\n\nimport {Button, Popup} from '@deviceinsight/ng-ui-basic-components';\n\nimport {Period} from '../types';\nimport DateInput from '../../input/DateInput';\nimport MonthPicker from './MonthPicker';\n\nimport imgIconCalendar from '../../../assets/svg/icon_calendar.svg';\nimport imgTriangleDown from '../../../assets/svg/triangle_down.svg';\nimport {\n\tcreateCurrentMonth,\n\tcreateCurrentWeek,\n\tcreateLastXDays,\n\tcreateToday,\n\tcreateWholeDay,\n\tcreateWholeMonth,\n\tcreateYesterday\n} from '../periods';\n\ntype Props = {\n\tperiodName: string | undefined;\n\ttimezone?: string;\n\tonChange: (period: Period) => void;\n\tonShowCustomPeriod: ((show: boolean) => void) | undefined;\n};\n\nexport default function Menu({onChange, onShowCustomPeriod, periodName, timezone}: Props) {\n\tconst [visible, setVisible] = useState(false);\n\tconst [showDatePicker, setShowDatePicker] = useState(false);\n\tconst [showMonthPicker, setShowMonthPicker] = useState(false);\n\t \n\tconst [datePickerDate, setDatePickerDate] = useState<number | undefined>(Date.now());\n\n\tfunction setPeriod(period: Period) {\n\t\tonChange(period);\n\t\tsetVisible(false);\n\t\tif (onShowCustomPeriod) {\n\t\t\tonShowCustomPeriod(false);\n\t\t}\n\t}\n\n\tfunction setPeriodSpecificDate(date: number | null | undefined) {\n\t\tsetPeriod(createWholeDay(date ?? Date.now(), timezone));\n\t\tsetShowDatePicker(false);\n\t\tsetDatePickerDate(date ?? undefined);\n\t}\n\n\tfunction setPeriodSpecificMonth(month: number, year: number) {\n\t\tsetPeriod(\n\t\t\tcreateWholeMonth(\n\t\t\t\tdayjs()\n\t\t\t\t\t.year(year)\n\t\t\t\t\t.month(month - 1)\n\t\t\t\t\t.valueOf(),\n\t\t\t\ttimezone\n\t\t\t)\n\t\t);\n\t\tsetShowMonthPicker(false);\n\t}\n\n\tfunction toggleDatePicker() {\n\t\tsetShowDatePicker(!showDatePicker);\n\t\tsetShowMonthPicker(false);\n\t}\n\n\tfunction toggleMonthPicker() {\n\t\tsetShowMonthPicker(!showMonthPicker);\n\t\tsetShowDatePicker(false);\n\t}\n\n\tfunction handleCustomPeriodSelect() {\n\t\tsetVisible(false);\n\t\tif (onShowCustomPeriod) {\n\t\t\tonShowCustomPeriod(true);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div>\n\t\t\t<Popup\n\t\t\t\topen={visible}\n\t\t\t\tonOpenChange={setVisible}\n\t\t\t\thandler={\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-testid=\"time-period-menu-button\"\n\t\t\t\t\t\ttitle={{\n\t\t\t\t\t\t\tid: 'trend.calendarMenu.calendar.timePeriod',\n\t\t\t\t\t\t\tdefaultValue: 'Time Period'\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<img src={imgIconCalendar} alt=\"calendar icon\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t{!!periodName && (\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t{periodName}\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<img src={imgTriangleDown} alt=\"triangle down\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t</>\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<div className=\"di multimenu period-picker-multimenu\">\n\t\t\t\t\t<div className={`drop bottom ${visible ? 'show' : ''}`}>\n\t\t\t\t\t\t<div className={`left-box ${showDatePicker ? 'show' : ''}`}>\n\t\t\t\t\t\t\t<DateInput inline value={datePickerDate} onChange={setPeriodSpecificDate} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className={`left-box ${showMonthPicker ? 'show' : ''}`}>\n\t\t\t\t\t\t\t<MonthPicker onChange={setPeriodSpecificMonth} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"right-box\">\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"today-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createToday(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.today\">Today</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"yesterday-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createYesterday(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.yesterday\">Yesterday</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"item\">\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tdata-testid=\"last-7-days-button\"\n\t\t\t\t\t\t\t\t\tclassName=\"item-text\"\n\t\t\t\t\t\t\t\t\tonClick={() => setPeriod(createLastXDays(7, timezone))}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.lastSevenDays\">Last 7 days</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"item-more icon triangle\">\n\t\t\t\t\t\t\t\t\t<div className=\"item-more-submenu\">\n\t\t\t\t\t\t\t\t\t\t{[2, 3, 5, 10, 14, 30].map((days) => (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"subitem\"\n\t\t\t\t\t\t\t\t\t\t\t\tkey={days}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setPeriod(createLastXDays(days, timezone))}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{days}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"current-week-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createCurrentWeek(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.currentWeek\">Curr. Week</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"current-month-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createCurrentMonth(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.currentMonth\">Curr. Month</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"item\" data-testid=\"day-button\" onClick={toggleDatePicker}>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.day\">Day</Trans>\n\t\t\t\t\t\t\t\t\t<div className=\"item-more icon dots\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"item\" data-testid=\"month-button\" onClick={toggleMonthPicker}>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.month\">Month</Trans>\n\t\t\t\t\t\t\t\t\t<div className=\"item-more icon dots\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{onShowCustomPeriod !== undefined && (\n\t\t\t\t\t\t\t\t<div className=\"item\" data-testid=\"from-to-button\" onClick={handleCustomPeriodSelect}>\n\t\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.fromto\">From/to</Trans>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Popup>\n\t\t</div>\n\t);\n}\n","import {useTranslation} from '../../i18n';\n\nimport {Period} from './types';\nimport {\n\tcreateCurrentMonth,\n\tcreateCurrentWeek,\n\tcreateLastXDays,\n\tcreateToday,\n\tcreateWholeDay,\n\tcreateWholeMonth,\n\tcreateYesterday,\n\tperiodToDays\n} from './periods';\n\nfunction compare(period1: Period, period2: Period) {\n\treturn period1.tsStart === period2.tsStart && period1.tsEnd === period2.tsEnd;\n}\n\n/**\n * This hook takes a period and tries to find its translation.\n * @param period\n */\nexport default function usePeriodName(period: Period, timezone: string | undefined) {\n\tconst {t} = useTranslation();\n\n\tif (compare(period, createToday(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.today', {defaultValue: 'Today'});\n\t}\n\n\tif (compare(period, createYesterday(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.yesterday', {defaultValue: 'Yesterday'});\n\t}\n\n\tif (compare(period, createCurrentWeek(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.currentWeek', {defaultValue: 'Curr. Week'});\n\t}\n\n\tif (compare(period, createCurrentMonth(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.currentMonth', {defaultValue: 'Curr. Month'});\n\t}\n\n\tif (compare(period, createWholeDay((period.tsStart + period.tsEnd) / 2, timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.day', {defaultValue: 'Day'});\n\t}\n\n\tif (compare(period, createWholeMonth((period.tsStart + period.tsEnd) / 2, timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.month', {defaultValue: 'Month'});\n\t}\n\n\tconst days = periodToDays(period);\n\tif (compare(period, createLastXDays(days, timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.lastDays', {\n\t\t\tdefaultValue: `Last ${days} days`,\n\t\t\tdays: days\n\t\t});\n\t}\n\n\treturn undefined;\n}\n","import {useState} from 'react';\n\nimport {Period} from './types';\nimport Inputs from './components/Inputs';\nimport Menu from './components/Menu';\nimport usePeriodName from './usePeriodName';\n\nexport type Props = {\n\t/** Period from start- to endpoint */\n\tperiod: Period;\n\n\t/** Function, executed on change */\n\tonChange: (period: Period) => void;\n\n\t/** Predefined period name */\n\tdefaultPeriodName?: string;\n\n\t/** Show only dropdown with calendar part without inputs? */\n\tinputsHiddenByDefault?: boolean;\n\n\t/** Should the menu be hidden? */\n\tmenuHidden?: boolean;\n\n\t/** Should the PeriodPicker be readOnly? */\n\treadOnly?: boolean;\n\n\t/** (optional) locale, if not set, the i18next.language is taken */\n\tlocale?: string;\n\n\t/** (optional) timezone */\n\ttimezone?: string;\n\t'data-testid'?: string;\n};\n\nexport default function PeriodPicker({\n\tperiod,\n\tonChange,\n\tinputsHiddenByDefault,\n\tmenuHidden,\n\treadOnly,\n\tlocale,\n\tdefaultPeriodName,\n\ttimezone,\n\t...props\n}: Props) {\n\tconst [showInputs, setShowInputs] = useState(!inputsHiddenByDefault);\n\tconst periodName = usePeriodName(period, timezone) ?? defaultPeriodName;\n\n\treturn (\n\t\t<div className=\"di period-picker\" data-testid={props['data-testid']}>\n\t\t\t{(!inputsHiddenByDefault || showInputs) && (\n\t\t\t\t<Inputs period={period} onChange={onChange} locale={locale} readOnly={readOnly} timezone={timezone} />\n\t\t\t)}\n\t\t\t{menuHidden || readOnly || (\n\t\t\t\t<Menu\n\t\t\t\t\tperiodName={periodName}\n\t\t\t\t\tonShowCustomPeriod={inputsHiddenByDefault ? setShowInputs : undefined}\n\t\t\t\t\tonChange={onChange}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","const CONFLICTING_IDS_DETECTION_DELAY = 500;\n\nconst calculateIdCountsInElement = (element: SVGSVGElement | Document) => {\n\treturn Array.from(element.querySelectorAll('[id]'))\n\t\t.map((element: Element) => element.getAttribute('id'))\n\t\t.reduce((acc: Record<string, number>, id: string | null) => {\n\t\t\tif (id) acc[id] = acc[id] + 1 || 1;\n\t\t\treturn acc;\n\t\t}, {});\n};\n\nconst findAllDuplicatedIdsInSvgElement = (svgElement: SVGSVGElement) => {\n\tconst idCountsInDocument = calculateIdCountsInElement(document);\n\tconst idCountsInSvg = calculateIdCountsInElement(svgElement);\n\treturn Object.keys(idCountsInSvg).filter((key) => idCountsInSvg[key] < idCountsInDocument[key]);\n};\n\nexport default function findConflicts(svgElement: SVGSVGElement, onConflict: (conflictingIds: string[]) => void) {\n\tconst timeoutId = setTimeout(() => {\n\t\tif (onConflict) {\n\t\t\tonConflict(findAllDuplicatedIdsInSvgElement(svgElement));\n\t\t}\n\t}, CONFLICTING_IDS_DETECTION_DELAY);\n\n\treturn () => clearTimeout(timeoutId);\n}\n","import {SetHyperlink} from '../types';\nimport {uuidV4} from '../../../modules/utils/uuidGen';\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg';\n\nexport default function createHyperlinkModification(\n\telement: HTMLElement,\n\t{hoverColor, internalLink, link}: SetHyperlink,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n) {\n\tconst anchor = wrapIntoAnchor(element);\n\tif (!anchor) return;\n\n\tconst uniqueClassName = `a${uuidV4(8)}`;\n\telement.classList.add('anchor', uniqueClassName);\n\n\tif (hoverColor && globalStyleElement?.sheet) {\n\t\tglobalStyleElement.sheet.insertRule(\n\t\t\t`.di.svg-image .anchor.${uniqueClassName}:hover, .di.svg-image .anchor.${uniqueClassName}:hover * { stroke: ${hoverColor} !important; }`\n\t\t);\n\t}\n\tanchor.setAttributeNS(SVG_NS, 'xlink:href', '#');\n\tanchor.addEventListener('click', () =>\n\t\tinternalLink && onInternalLinkChange ? onInternalLinkChange(link) : window.open(link, '_newtab')\n\t);\n}\n\nfunction wrapIntoAnchor(wrappedElement: HTMLElement) {\n\tconst parentNode = wrappedElement.parentNode;\n\n\tif (!parentNode) {\n\t\treturn null;\n\t}\n\n\tconst siblings = parentNode.childNodes;\n\n\tif (!siblings) {\n\t\treturn null;\n\t}\n\n\tconst index = Array.from(siblings).findIndex((el) => el === wrappedElement);\n\tconst wrapperElement = document.createElementNS(SVG_NS, 'a');\n\twrapperElement.appendChild(wrappedElement);\n\tconst siblingNode = siblings[index] || null;\n\n\tif (siblingNode) {\n\t\tparentNode.insertBefore(wrapperElement, siblingNode);\n\t} else {\n\t\tparentNode.appendChild(wrapperElement);\n\t}\n\n\treturn wrapperElement;\n}\n","// SvgImage uses the @svgdotjs/svg.js library that doesn't work with the <svg:svg>...</svg:svg> elements.\n// The naive solution - removing of the \"svg:\" namespace - solves the problem.\nconst removeSvgNamespace = (xml: string) => xml.replace(/<svg:svg/g, '<svg').replace(/<\\/svg:svg/g, '</svg');\n\nexport const parseFromString = (imageData: string) => {\n\tconst parser = new DOMParser();\n\tconst xml = removeSvgNamespace(atob(imageData.replace('data:image/svg+xml;base64,', '')));\n\treturn parser.parseFromString(xml, 'image/svg+xml');\n};\n\nexport default function (imageData: string, diFieldId: string) {\n\tconst doc = parseFromString(imageData);\n\treturn doc.querySelectorAll(`[id^=\"${diFieldId}\"]`);\n}\n","import {Modification, PositionX, PositionY} from '../types';\n\nconst mergePositionChanges = (modifications: Array<Modification>): Array<Modification> => {\n\tconst positionModifications = modifications.filter(({type}) => type === 'positionX' || type === 'positionY');\n\tconst restModifications = modifications.filter(({type}) => type !== 'positionX' && type !== 'positionY');\n\tconst positionByAxisModifications = positionModifications.reduce(\n\t\t(\n\t\t\tacc: {\n\t\t\t\tx: PositionX | null;\n\t\t\t\ty: PositionY | null;\n\t\t\t},\n\t\t\tmodification\n\t\t) => {\n\t\t\tif (modification.type === 'positionX') {\n\t\t\t\treturn {...acc, x: modification};\n\t\t\t} else if (modification.type === 'positionY') {\n\t\t\t\treturn {...acc, y: modification};\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{\n\t\t\tx: null,\n\t\t\ty: null\n\t\t}\n\t);\n\n\tif (positionByAxisModifications.x && positionByAxisModifications.y) {\n\t\treturn restModifications.concat([\n\t\t\t{\n\t\t\t\ttype: 'positionXY',\n\t\t\t\ttarget: positionByAxisModifications.x.target,\n\t\t\t\tpositionX: positionByAxisModifications.x.position,\n\t\t\t\tpositionY: positionByAxisModifications.y.position\n\t\t\t}\n\t\t]);\n\t} else if (positionByAxisModifications.x) {\n\t\treturn restModifications.concat([positionByAxisModifications.x]);\n\t} else if (positionByAxisModifications.y) {\n\t\treturn restModifications.concat([positionByAxisModifications.y]);\n\t} else {\n\t\treturn restModifications;\n\t}\n};\n\nexport default (modifications: Array<Modification>): Array<Modification> => {\n\tconst modificationsByTarget = modifications.reduce<Record<string, Modification[]>>(\n\t\t(acc, modification) => ({\n\t\t\t...acc,\n\t\t\t[modification.target]: [...(acc[modification.target] || []), modification]\n\t\t}),\n\t\t{}\n\t);\n\treturn Object.keys(modificationsByTarget).reduce(\n\t\t(acc: Array<Modification>, target) => acc.concat(mergePositionChanges(modificationsByTarget[target])),\n\t\t[]\n\t);\n};\n","import {SVG} from '@svgdotjs/svg.js';\n\nimport {PositionX, PositionXY, PositionY} from '../types';\n\nconst limitPercentagePosition = (position: number): number => Math.max(0, Math.min(100, position));\n\nexport default function createPositionModification(\n\telement: HTMLElement,\n\tmodification: PositionX | PositionY | PositionXY,\n\tsvgElement: SVGSVGElement\n) {\n\tconst svg = SVG(svgElement);\n\tconst targetId = element.getAttribute('id') || '';\n\tconst targetEl = svg.findOne(`#${targetId}`) as any;\n\tconst boundariesEl = svg.findOne(`#${targetId}-boundaries`) as any;\n\tconst bbox = boundariesEl ? boundariesEl.bbox() : svg.viewbox();\n\n\tif (modification.type === 'positionX') {\n\t\ttargetEl.x(bbox.x + (limitPercentagePosition(modification.position) * bbox.width) / 100);\n\t} else if (modification.type === 'positionY') {\n\t\ttargetEl.y(bbox.y + (limitPercentagePosition(modification.position) * bbox.height) / 100);\n\t} else {\n\t\ttargetEl.x(bbox.x + (limitPercentagePosition(modification.positionX) * bbox.width) / 100);\n\t\ttargetEl.y(bbox.y + (limitPercentagePosition(modification.positionY) * bbox.height) / 100);\n\t}\n}\n","import {SVG} from '@svgdotjs/svg.js';\n\nimport {Modification} from '../types';\nimport createHyperlinkModification from './createHyperlinkModification';\nimport {parseFromString} from './getMutableNodeList';\nimport transformPositionModifications from './transformPositionModifications';\nimport createPositionModification from './createPositionModification';\n\nexport default function renderSvg(\n\tsvgWrapper: HTMLDivElement,\n\timageData: string,\n\tmodifications: Modification[] | undefined,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n): SVGSVGElement | null {\n\tconst imageDocument = parseFromString(imageData);\n\tconst svgElement = imageDocument.querySelector('svg');\n\n\tif (svgElement) {\n\t\tsvgWrapper.style.height = '100%';\n\t\tsvgWrapper.innerHTML = '';\n\t\tsvgElement.style.height = '100%';\n\t\tsvgElement.style.width = '100%';\n\t\tsvgElement.classList.add('di', 'svg-image');\n\t\tif (!svgElement.getAttribute('viewBox')) {\n\t\t\tsvgElement.setAttribute('viewBox', '');\n\t\t}\n\t\tif (!svgElement.getAttribute('preserveAspectRatio')) {\n\t\t\tsvgElement.setAttribute('preserveAspectRatio', 'xMidYMid');\n\t\t}\n\t\tsvgWrapper.appendChild(svgElement);\n\t\tapplyModifications(svgElement, modifications, globalStyleElement, onInternalLinkChange);\n\t\treturn svgElement;\n\t}\n\treturn null;\n}\n\nfunction applyModifications(\n\tsvgElement: SVGSVGElement,\n\tmodifications: Modification[] | undefined,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n) {\n\tif (!modifications || !modifications.length) return;\n\n\tfor (const modification of sortModifications(transformPositionModifications(modifications))) {\n\t\tconst element = svgElement.querySelector<HTMLElement>(`[id=${modification.target}]`);\n\n\t\tif (element) {\n\t\t\tapplyModification(element, modification, svgElement, globalStyleElement, onInternalLinkChange);\n\t\t}\n\t}\n}\n\nfunction applyModification(\n\telement: HTMLElement,\n\tmodification: Modification,\n\tsvgElement: SVGSVGElement,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n) {\n\tswitch (modification.type) {\n\t\tcase 'visibility':\n\t\t\telement.setAttribute('visibility', modification.visible ? 'visible' : 'hidden');\n\t\t\tbreak;\n\n\t\tcase 'text': {\n\t\t\tconst tspan = element.querySelector('tspan');\n\n\t\t\tif (tspan) {\n\t\t\t\ttspan.textContent = modification.text;\n\t\t\t} else {\n\t\t\t\telement.textContent = modification.text;\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'color': {\n\t\t\tconst {color} = modification;\n\n\t\t\tconst changeColor = (el: Element) => {\n\t\t\t\tel.setAttribute('fill', color);\n\t\t\t\t(el as SVGElement).style.fill = color;\n\t\t\t};\n\n\t\t\tchangeColor(element);\n\t\t\telement.querySelectorAll('g, path').forEach(changeColor);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'hyperlink':\n\t\t\tcreateHyperlinkModification(element, modification, globalStyleElement, onInternalLinkChange);\n\t\t\tbreak;\n\n\t\tcase 'eventListener':\n\t\t\telement.addEventListener(modification.eventType, modification.listener, modification.options);\n\t\t\tbreak;\n\n\t\tcase 'classNames':\n\t\t\telement.classList.add(...modification.classNames);\n\n\t\t\tbreak;\n\n\t\tcase 'positionX':\n\t\tcase 'positionY':\n\t\tcase 'positionXY':\n\t\t\tcreatePositionModification(element, modification, svgElement);\n\t\t\tbreak;\n\n\t\tcase 'rotation': {\n\t\t\t// @ts-expect-error\n\t\t\tSVG(element).rotate(modification.degrees);\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tthrow new Error('Unknown modification');\n\t}\n}\n\n// rotation moved to the end of the array\nfunction sortModifications(modifications: Modification[]) {\n\treturn modifications.sort(({type: type1}, {type: type2}) => (type1 !== type2 && type2 === 'rotation' ? -1 : 1));\n}\n","import {useEffect, useRef} from 'react';\nimport {useHistory} from 'react-router-dom';\n\nimport {Modification} from './types';\nimport findConflicts from './utils/findConflicts';\nimport renderSvg from './utils/renderSvg';\n\nexport type Props = {\n\t/** base64 encoded content of the SVG file */\n\timageData: string | null | undefined;\n\n\t/** list of modifications that should be applied to the svg elements */\n\tmodifications?: Modification[];\n\n\t/** called with list of conflicting IDs which means IDs existing in the DOM and duplicated by the elements from the SVG */\n\tonConflict?: (conflictingIds: string[]) => void;\n};\n\nfunction useGlobalStyleElement() {\n\tconst styleElementRef = useRef<HTMLStyleElement | null>(null);\n\n\tuseEffect(() => {\n\t\tconst styleElement = document.createElement('style');\n\t\t// WebKit hack\n\t\tstyleElement.appendChild(document.createTextNode(''));\n\n\t\tif (document && document.head) {\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\t\tstyleElementRef.current = styleElement;\n\n\t\treturn () => {\n\t\t\tif (document && document.head && styleElement) {\n\t\t\t\tdocument.head.removeChild(styleElement);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t \n\treturn styleElementRef.current;\n}\n\nexport default function SvgImage({imageData, modifications, onConflict}: Props) {\n\tconst svgWrapperRef = useRef<HTMLDivElement>(null);\n\tconst styleElement = useGlobalStyleElement();\n\tconst {push} = useHistory();\n\n\tuseEffect(() => {\n\t\tconst {current: wrapper} = svgWrapperRef;\n\n\t\tif (wrapper && imageData) {\n\t\t\tconst svgElement = renderSvg(wrapper, imageData, modifications, styleElement, push);\n\t\t\tif (svgElement && onConflict) {\n\t\t\t\treturn findConflicts(svgElement, onConflict);\n\t\t\t}\n\t\t}\n\t}, [imageData, modifications, onConflict, push, styleElement]);\n\n\treturn <div ref={svgWrapperRef} />;\n}\n","import {parseFromString} from './getMutableNodeList';\n\nexport default (imageData: string) => {\n\ttry {\n\t\tconst imageDoc = parseFromString(imageData);\n\t\treturn imageDoc.querySelector('svg');\n\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t} catch (e: unknown) {\n\t\treturn null;\n\t}\n};\n","import getSvgElement from './getSvgElement';\n\nexport default (imageData: string): boolean => {\n\tconst svgElement = getSvgElement(imageData);\n\treturn !!svgElement && !!svgElement.style;\n};\n","import {Component} from 'react';\nimport Highcharts from 'highcharts';\nimport HighchartsReact from 'highcharts-react-official';\nimport {isEqual} from 'lodash';\n\nfunction createTooltip(header: string, name: string, value: number | string) {\n\treturn `<div>${header}</div><div>${name}: <strong>${value}</strong></div>`;\n}\n\nconst initialOptions: Record<string, any> = {\n\tglobal: {\n\t\tuseUTC: false\n\t},\n\tchart: {\n\t\tstyle: {\n\t\t\tfontFamily: 'arial'\n\t\t},\n\t\tplotBackgroundColor: null,\n\t\tplotBorderWidth: 0,\n\t\tplotShadow: false\n\t},\n\tcredits: {\n\t\tenabled: false\n\t},\n\tlegend: {\n\t\talign: 'right',\n\t\tverticalAlign: 'center',\n\t\tlayout: 'vertical'\n\t},\n\ttitle: {\n\t\tuseHTML: true\n\t},\n\tplotOptions: {\n\t\tpie: {\n\t\t\tdataLabels: {\n\t\t\t\tenabled: false\n\t\t\t},\n\t\t\tshowInLegend: true,\n\t\t\tstartAngle: -90,\n\t\t\tendAngle: 270\n\t\t}\n\t},\n\ttooltip: {\n\t\tuseHTML: true,\n\n\t\tformatter() {\n\t\t\treturn createTooltip('', this.point.name, this.point.y);\n\t\t}\n\t},\n\txAxis: {\n\t\ttype: 'category'\n\t},\n\tyAxis: {\n\t\tmin: 0,\n\t\ttitle: {\n\t\t\ttext: ''\n\t\t}\n\t},\n\toptions: {\n\t\tlgo: 123\n\t}\n};\n\ntype Item = {\n\tlabel: string;\n\tvalue: number;\n};\n\nexport type Props = {\n\t/** 'pie' | 'column'*/\n\ttype: 'pie' | 'column';\n\n\t/** title displayed above the chart*/\n\ttitle?: string;\n\n\t/** tooltip title displayed when the chart item is hovered */\n\ttooltipTitle?: string;\n\n\t/** array of pairs {label, value} displayed in chart */\n\titems: Array<Item>;\n\n\t/** Optional function allowing to set custom value formatter */\n\tvalueFormatter?: (value: number) => string;\n\n\t/** Optional click handler */\n\tonClick?: (index: number) => void;\n\n\t/** @ignore */\n\tclassName?: string;\n\n\t/** Optional function allowing to modify highcharts configuration */\n\tupdateOptions?: (options: Record<string, any>) => Record<string, any>;\n};\n\nconst getClickConfiguration = (onClick: ((index: number) => void) | null | undefined) => {\n\treturn onClick\n\t\t? {\n\t\t\t\tseries: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tpoint: {\n\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\tclick: function () {\n\t\t\t\t\t\t\t\tonClick(this.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} as Record<string, any>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t: {};\n};\n\n/**\n * Displays the provided data in form of the column chart or pie chart.\n */\nexport default class Chart extends Component<Props, Record<string, any>> {\n\tstate: Record<string, any> = {};\n\tchart: any = null;\n\tro: ResizeObserver | null | undefined = null;\n\n\tcomponentDidMount() {\n\t\tconst {type, title, items, tooltipTitle, valueFormatter, onClick} = this.props;\n\t\tthis.setState({\n\t\t\t...initialOptions,\n\t\t\tplotOptions: {...initialOptions.plotOptions, ...getClickConfiguration(onClick)},\n\t\t\ttooltip: {\n\t\t\t\t...initialOptions.tooltip,\n\n\t\t\t\tformatter() {\n\t\t\t\t\tconst format = valueFormatter || ((value) => value);\n\n\t\t\t\t\treturn createTooltip(tooltipTitle || '', this.point.name, format(this.point.y));\n\t\t\t\t}\n\t\t\t},\n\t\t\tlegend: {...initialOptions.legend, enabled: type === 'pie'},\n\t\t\tyAxis: {\n\t\t\t\t...initialOptions.yAxis,\n\t\t\t\tenabled: type === 'column',\n\t\t\t\ttitle: {\n\t\t\t\t\ttext: title || ''\n\t\t\t\t}\n\t\t\t},\n\t\t\tseries: [\n\t\t\t\t{\n\t\t\t\t\ttype,\n\t\t\t\t\tinnerSize: '50%',\n\t\t\t\t\tdata: items.map(({label, value}) => [label, value])\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t\t// Workaround of a bug: title must be set in the next cycle of the events loop to be positioned correctly.\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\ttitle: {...initialOptions.title, text: type === 'column' ? '' : title || ''}\n\t\t\t});\n\t\t}, 0);\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tconst {type, title, items, tooltipTitle, valueFormatter, onClick} = this.props;\n\n\t\tif (title !== prevProps.title) {\n\t\t\tthis.setState({\n\t\t\t\ttitle: {...this.state.title, text: type === 'column' ? '' : title || ''},\n\t\t\t\tyAxis: {\n\t\t\t\t\t...this.state.yAxis,\n\t\t\t\t\ttitle: {\n\t\t\t\t\t\ttext: title || ''\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (type !== prevProps.type) {\n\t\t\tthis.setState({\n\t\t\t\tlegend: {...this.state.legend, enabled: type === 'pie'},\n\t\t\t\ttitle: {\n\t\t\t\t\ttext: type === 'column' ? '' : title || ''\n\t\t\t\t},\n\t\t\t\tyAxis: {\n\t\t\t\t\t...this.state.yAxis,\n\t\t\t\t\tenabled: type === 'column',\n\t\t\t\t\ttitle: {\n\t\t\t\t\t\ttext: type === 'column' ? title || '' : ''\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tseries: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype,\n\t\t\t\t\t\tinnerSize: '50%',\n\t\t\t\t\t\tdata: items.map(({label, value}) => [label, value])\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t}\n\n\t\tif (!isEqual(items, prevProps.items)) {\n\t\t\tthis.setState({\n\t\t\t\tseries: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype,\n\t\t\t\t\t\tinnerSize: '50%',\n\t\t\t\t\t\tdata: items.map(({label, value}) => [label, value])\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t}\n\n\t\tif (\n\t\t\ttooltipTitle !== prevProps.tooltipTitle ||\n\t\t\tvalueFormatter !== prevProps.valueFormatter ||\n\t\t\tonClick !== prevProps.onClick\n\t\t) {\n\t\t\tthis.setState({\n\t\t\t\ttooltip: {\n\t\t\t\t\t...initialOptions.tooltip,\n\n\t\t\t\t\tformatter() {\n\t\t\t\t\t\tconst format = valueFormatter || ((value) => value);\n\n\t\t\t\t\t\treturn createTooltip(tooltipTitle || '', this.point.name, format(this.point.y));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tplotOptions: {...initialOptions.plotOptions, ...getClickConfiguration(onClick)}\n\t\t\t});\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.ro && this.chart?.renderTo) {\n\t\t\tthis.ro.unobserve(this.chart.renderTo);\n\t\t}\n\t\tthis.chart = null;\n\t\tthis.ro = null;\n\t}\n\n\thandleChart = (chart: any) => {\n\t\tthis.chart = chart;\n\t\tthis.ro = new ResizeObserver(() => {\n\t\t\tthis.chart?.reflow();\n\t\t});\n\t\tthis.ro.observe(this.chart.renderTo);\n\t};\n\n\trender() {\n\t\tconst options = this.props.updateOptions ? this.props.updateOptions(this.state) : this.state;\n\t\treturn (\n\t\t\t<HighchartsReact\n\t\t\t\thighcharts={Highcharts}\n\t\t\t\toptions={options}\n\t\t\t\tcontainerProps={{\n\t\t\t\t\tclassName: this.props.className\n\t\t\t\t}}\n\t\t\t\tcallback={this.handleChart}\n\t\t\t/>\n\t\t);\n\t}\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nlet raf = callback => +setTimeout(callback, 16);\nlet caf = num => clearTimeout(num);\nif (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {\n raf = callback => window.requestAnimationFrame(callback);\n caf = handle => window.cancelAnimationFrame(handle);\n}\nlet rafUUID = 0;\nconst rafIds = new Map();\nfunction cleanup(id) {\n rafIds.delete(id);\n}\nconst wrapperRaf = (callback, times = 1) => {\n rafUUID += 1;\n const id = rafUUID;\n function callRef(leftTimes) {\n if (leftTimes === 0) {\n // Clean up\n cleanup(id);\n\n // Trigger\n callback();\n } else {\n // Next raf\n const realId = raf(() => {\n callRef(leftTimes - 1);\n });\n\n // Bind real raf id\n rafIds.set(id, realId);\n }\n }\n callRef(times);\n return id;\n};\nwrapperRaf.cancel = id => {\n const realId = rafIds.get(id);\n cleanup(id);\n return caf(realId);\n};\nif (process.env.NODE_ENV !== 'production') {\n wrapperRaf.ids = () => rafIds;\n}\nvar _default = exports.default = wrapperRaf;","import {useRef, useEffect, ComponentType, FC, ReactElement, ReactNode} from 'react';\nimport type {SliderProps} from '@rc-component/slider';\nimport raf from '@rc-component/util/lib/raf';\nimport Slider from '@rc-component/slider';\nimport type {TooltipRef} from '@rc-component/tooltip';\nimport Tooltip from '@rc-component/tooltip';\n\ninterface HandleTooltipProps {\n\tvalue: number;\n\tchildren: ReactElement;\n\tvisible: boolean;\n\ttipFormatter?: (value: number) => ReactNode;\n}\n\nconst HandleTooltip: FC<HandleTooltipProps> = (props) => {\n\tconst {value, children, visible, tipFormatter = (val) => `${val}`, ...restProps} = props;\n\n\tconst tooltipRef = useRef<TooltipRef | null>(null);\n\tconst rafRef = useRef<number | null>(null);\n\n\tfunction cancelKeepAlign() {\n\t\tif (rafRef.current) {\n\t\t\traf.cancel(rafRef.current);\n\t\t}\n\t}\n\n\tfunction keepAlign() {\n\t\trafRef.current = raf(() => {\n\t\t\ttooltipRef.current?.forceAlign();\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (visible) {\n\t\t\tkeepAlign();\n\t\t} else {\n\t\t\tcancelKeepAlign();\n\t\t}\n\n\t\treturn cancelKeepAlign;\n\t}, [value, visible]);\n\n\treturn (\n\t\t<Tooltip\n\t\t\tplacement=\"top\"\n\t\t\toverlay={tipFormatter(value)}\n\t\t\tref={tooltipRef}\n\t\t\talign={{offset: [0, -10]}}\n\t\t\tvisible={visible}\n\t\t\t{...restProps}\n\t\t>\n\t\t\t{children}\n\t\t</Tooltip>\n\t);\n};\n\nexport const handleRender: SliderProps['handleRender'] = (node, props) => (\n\t<HandleTooltip value={props.value} visible={props.dragging}>\n\t\t{node}\n\t</HandleTooltip>\n);\n\ninterface TooltipSliderProps extends SliderProps {\n\ttipFormatter?: (value: number) => ReactNode;\n\ttipProps?: ComponentType<typeof Tooltip>;\n}\n\nconst TooltipSlider: FC<TooltipSliderProps> = ({tipFormatter, tipProps, ...props}) => {\n\tconst tipHandleRender: SliderProps['handleRender'] = (node, handleProps) => (\n\t\t<HandleTooltip\n\t\t\tvalue={handleProps.value}\n\t\t\tvisible={handleProps.dragging}\n\t\t\ttipFormatter={tipFormatter}\n\t\t\t{...tipProps}\n\t\t>\n\t\t\t{node}\n\t\t</HandleTooltip>\n\t);\n\n\treturn <Slider {...props} handleRender={tipHandleRender} />;\n};\n\nexport default TooltipSlider;\n","import {useCallback, useEffect, useState} from 'react';\n\nexport default function useLimitStyling(limit: number | undefined, min: number, max: number) {\n\tconst [slider, setSlider] = useState<HTMLDivElement | null>(null);\n\n\tuseEffect(() => {\n\t\tif (slider) {\n\t\t\tconst containerEl = slider.querySelector('.rc-slider-rail');\n\t\t\tif (!containerEl) throw new Error('.rc-slider-rail element missing');\n\t\t\tconst disabledAreaEl = containerEl?.querySelector(`.disabled-area-element`) as HTMLDivElement;\n\t\t\tconst sliderWidth = containerEl.getBoundingClientRect().width;\n\n\t\t\tif (disabledAreaEl) {\n\t\t\t\tif (limit == null) {\n\t\t\t\t\tdisabledAreaEl.remove();\n\t\t\t\t} else {\n\t\t\t\t\tconst width = Math.round(((max - limit) / (max - min)) * sliderWidth);\n\t\t\t\t\tdisabledAreaEl.style.width = `${width}px`;\n\t\t\t\t}\n\t\t\t} else if (limit != null) {\n\t\t\t\tconst width = Math.round(((max - limit) / (max - min)) * sliderWidth);\n\t\t\t\tconst disabledAreaEl = document.createElement('div');\n\t\t\t\tdisabledAreaEl.classList.add('disabled-area-element');\n\t\t\t\tdisabledAreaEl.style.width = `${width}px`;\n\t\t\t\tcontainerEl.appendChild(disabledAreaEl);\n\t\t\t}\n\t\t}\n\t}, [limit, slider, min, max]);\n\n\tconst updateLimitAreaSize = useCallback(() => {\n\t\tif (slider && limit != null) {\n\t\t\tconst containerEl = slider.querySelector('.rc-slider-rail');\n\t\t\tif (!containerEl) throw new Error('.rc-slider-rail element missing');\n\t\t\tconst disabledAreaEl = containerEl?.querySelector(`.disabled-area-element`) as HTMLDivElement;\n\t\t\tconst sliderWidth = containerEl.getBoundingClientRect().width;\n\t\t\tif (disabledAreaEl) {\n\t\t\t\tconst width = Math.round(((max - limit) / (max - min)) * sliderWidth);\n\t\t\t\tdisabledAreaEl.style.width = `${width}px`;\n\t\t\t}\n\t\t}\n\t}, [limit, max, min, slider]);\n\n\tuseEffect(() => {\n\t\tif (slider) {\n\t\t\tconst resizeObserver = new ResizeObserver(() => updateLimitAreaSize());\n\n\t\t\tresizeObserver.observe(slider);\n\t\t}\n\t}, [slider, updateLimitAreaSize]);\n\n\treturn setSlider;\n}\n","import RcSlider from '@rc-component/slider';\nimport RcSliderWithTooltip from './RcSliderWithTooltip';\n\nimport useLimitStyling from './useLimitStyling';\n\nexport type Props = {\n\t/** minimum value the slider renders */\n\tmin: number;\n\n\t/** maximum value the slider renders */\n\tmax: number;\n\n\t/** step in which increments/decrements have to be made */\n\tstep?: number;\n\n\t/** current value of the slider */\n\tvalue: number;\n\n\t/** show or hide tooltip (default: true) */\n\ttooltip?: boolean;\n\n\t/** object containing key-value pairs to label the slider */\n\tlabels?: Record<string, number | string>;\n\n\t/** formats the value in label or tooltip */\n\tformat?: (value: number) => string;\n\n\t/** gets called whenever the slider handle is being dragged or clicked */\n\tonChange?: (value: number) => void;\n\n\t/** gets called whenever the user stops dragging the slider handle */\n\tonChangeComplete?: (value: number) => void;\n\n\t/** maximum value the slider can hold */\n\tlimit?: number;\n};\n\n/**\n * Enables picking the desired value from a specified range.\n * Can have a tooltip and labels\n */\nconst Slider = ({min, max, step, value, tooltip = true, labels, format, onChange, onChangeComplete, limit}: Props) => {\n\tconst setSliderRef = useLimitStyling(limit, min, max);\n\n\tconst handleChange = (value: number | number[]) => {\n\t\tif (!onChange) return;\n\t\tconst numericValue = typeof value === 'number' ? value : value[0];\n\t\tconst allowedValue = limit != null ? Math.min(numericValue, limit) : numericValue;\n\t\tonChange(allowedValue);\n\t};\n\n\tconst handleChangeComplete = () => {\n\t\tif (!onChangeComplete) {\n\t\t\treturn;\n\t\t}\n\t\tonChangeComplete(value);\n\t};\n\n\tconst basicProps = {\n\t\tmin,\n\t\tmax,\n\t\tstep,\n\t\tvalue,\n\t\tonChange: handleChange,\n\t\tonChangeComplete: handleChangeComplete,\n\t\tmarks: labels\n\t};\n\n\treturn (\n\t\t<div className=\"di slider\" ref={setSliderRef}>\n\t\t\t{tooltip ? (\n\t\t\t\t<RcSliderWithTooltip {...basicProps} className=\"di slider with-tooltip\" tipFormatter={format} />\n\t\t\t) : (\n\t\t\t\t<RcSlider {...basicProps} className=\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kBACJ;EAED,iBAAiB,KAAK;CACvB;CAEA,MAAM,aAAa;EAClB;EACA;EACA;EACA;EACA,UAAU;EACV,kBAAkB;EAClB,OAAO;CACR;CAEA,OACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAU;EAAY,KAAK;YAC9B,UACA,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD;GAAqB,GAAI;GAAY,WAAU;GAAyB,cAAc;EAAS,CAAA,IAE/F,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;GAAU,GAAI;GAAY,WAAU;EAAa,CAAA;CAE9C,CAAA;AAEP"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/modules/messageBox/messageBox.tsx","../src/modules/utils/uuidGen.ts","../src/modules/utils/nanoidGen.ts","../src/i18n/index.ts","../src/components/treeview/treeutils.ts","../src/components/colorpicker/ColorPickerPopper.tsx","../src/components/colorpicker/GridColorPicker.tsx","../src/components/input/ValidatedTextInput.tsx","../src/components/colorpicker/ColorTextInput.tsx","../src/components/colorpicker/GradientColorPicker.tsx","../src/utils/dayjsLocales.ts","../src/components/input/DateInput.tsx","../src/components/input/UrnInput.tsx","../src/components/prompt/Prompt.tsx","../src/components/prompt/withPrompt.tsx","../src/components/link/RouteLink.tsx","../src/components/infobox/InfoBox.tsx","../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../src/utils/resolvePath.ts","../src/components/tabs/RouteTabs.tsx","../src/assets/img/icon_folder_open.png","../src/assets/img/icon_folder_closed.png","../src/assets/svg/icon_folder_loading.svg","../src/assets/img/icon_variablenode.png","../src/components/treeview/constants.ts","../src/components/treeview/components/NodeInfo.tsx","../src/components/treeview/components/Node.tsx","../src/components/treeview/TreeView.tsx","../src/assets/svg/icon_menu_vertical.svg","../src/components/multiMenu/components/MultiMenuContext.ts","../src/components/multiMenu/MultiMenu.tsx","../src/components/pagination/Pagination.tsx","../src/components/input/SelectWithSearch.tsx","../src/components/reactable/helpers/ReactableTextFilter.tsx","../src/components/reactable/helpers/helper.tsx","../src/components/reactable/helpers/ReactableTableFilterRow.tsx","../src/components/reactable/helpers/ReactableTableHeader.tsx","../src/components/reactable/helpers/ReactableTableRow.tsx","../src/components/reactable/helpers/ReactableTable.tsx","../src/components/reactable/Reactable.tsx","../src/components/reactableWithClientSidePagination/ReactableWithClientSidePagination.tsx","../src/components/upload/FileUpload.tsx","../src/components/upload/ImageUpload.tsx","../src/assets/img/icon-arrow-back.png","../src/components/contentHeader/ContentHeader.tsx","../src/components/input/DateTimeInput.tsx","../src/components/input/SelectWithSearchAsync.tsx","../src/components/multiMenu/components/MultiMenuItem.tsx","../src/components/periodpicker/components/Inputs.tsx","../src/components/periodpicker/components/MonthPicker.tsx","../src/assets/svg/icon_calendar.svg","../src/assets/svg/triangle_down.svg","../src/components/periodpicker/periods.ts","../src/components/periodpicker/components/Menu.tsx","../src/components/periodpicker/usePeriodName.ts","../src/components/periodpicker/PeriodPicker.tsx","../src/components/svg/utils/findConflicts.ts","../src/components/svg/utils/createHyperlinkModification.ts","../src/components/svg/utils/getMutableNodeList.ts","../src/components/svg/utils/transformPositionModifications.ts","../src/components/svg/utils/createPositionModification.ts","../src/components/svg/utils/renderSvg.ts","../src/components/svg/SvgImage.tsx","../src/components/svg/utils/getSvgElement.ts","../src/components/svg/utils/validateSvg.ts","../src/components/chart/Chart.tsx","../node_modules/@rc-component/util/lib/raf.js","../src/components/slider/RcSliderWithTooltip.tsx","../src/components/slider/useLimitStyling.ts","../src/components/slider/Slider.tsx"],"sourcesContent":["import {toast, ToastContent, ToastOptions, ToastContainer, ToastContainerProps, Slide} from 'react-toastify/unstyled';\n\nimport 'react-toastify/dist/ReactToastify.css';\nimport './react-toastify-custom.css';\n\nlet groupNamesToToastIds: Record<string, Array<string | number>> = {};\n\nexport const DEFAULT_AUTO_CLOSE_MS = 3000;\n\nlet globalMessageBoxOptions: ToastOptions = {};\n\nlet globalErrorMessageBoxOptions: ToastOptions = {\n\tautoClose: false\n};\n\n/**\n * Base options merged into every messageBox call (success, info, warn and error).\n * Per-call options and, for errors, the error specific global options take precedence.\n */\nexport const setGlobalMessageBoxOptions = (options: ToastOptions): void => {\n\tglobalMessageBoxOptions = options;\n};\n\nexport const setGlobalErrorMessageBoxOptions = (options: ToastOptions): void => {\n\tglobalErrorMessageBoxOptions = options;\n};\n\nconst storeGroupName = (groupName: string, toastId: string | number) => {\n\tif (groupName) {\n\t\tif (groupNamesToToastIds[groupName]) {\n\t\t\tgroupNamesToToastIds[groupName] = [...groupNamesToToastIds[groupName], toastId];\n\t\t} else {\n\t\t\tgroupNamesToToastIds[groupName] = [toastId];\n\t\t}\n\t}\n};\n\nexport const messageBoxSuccess = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\tconst toastId = toast.success(content, {...globalMessageBoxOptions, ...options});\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxInfo = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\tconst toastId = toast.info(content, {...globalMessageBoxOptions, ...options});\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxWarn = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\tconst toastId = toast.warn(content, {...globalMessageBoxOptions, ...options});\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxError = (content: ToastContent, options?: ToastOptions, groupName?: string): void => {\n\t// default is autoClose=false to force the user to close errors\n\tconst toastId = toast.error(content, {...globalMessageBoxOptions, ...globalErrorMessageBoxOptions, ...options});\n\tif (groupName) storeGroupName(groupName, toastId);\n};\n\nexport const messageBoxDismissSingle = (id: number): void => {\n\ttoast.dismiss(id);\n};\n\nexport const messageBoxDismissGroup = (groupName: string): void => {\n\tif (groupNamesToToastIds[groupName]) {\n\t\tgroupNamesToToastIds[groupName].forEach((toastId) => toast.dismiss(toastId));\n\t\tdelete groupNamesToToastIds[groupName];\n\t}\n};\n\nexport const messageBoxDismissAll = (): void => {\n\tgroupNamesToToastIds = {};\n\ttoast.dismiss();\n};\n\nexport const MessageBoxContainer = ({\n\tposition = 'top-center',\n\ttheme = 'colored',\n\tautoClose = DEFAULT_AUTO_CLOSE_MS,\n\thideProgressBar = true,\n\ttransition = Slide,\n\t...props\n}: ToastContainerProps = {}) => (\n\t<ToastContainer\n\t\tposition={position}\n\t\ttheme={theme}\n\t\tautoClose={autoClose}\n\t\thideProgressBar={hideProgressBar}\n\t\ttransition={transition}\n\t\t{...props}\n\t/>\n);\n","export const uuidV4 = (length = 32): string => {\n\tlet uuid = '';\n\n\tfor (let i = 0; i < length; i++) {\n\t\tconst random = (Math.random() * 16) | 0;\n\n\t\tif (i === 8 || i === 12 || i === 16 || i === 20) {\n\t\t\tuuid += '-';\n\t\t}\n\n\t\tuuid += (i === 12 ? 4 : i === 16 ? (random & 3) | 8 : random).toString(16);\n\t}\n\n\treturn uuid;\n};\n","import {customAlphabet} from 'nanoid';\n\nconst alphabet = '0123456789abcdefghijklmnopqrstuvwxyz';\n\nexport const nanoid10: () => string = customAlphabet(alphabet, 10);\n","import {TOptions} from 'i18next';\nimport {useTranslation as useReactI18NextTranslation, Trans as ReactTrans} from 'react-i18next';\n\nexport let Trans: typeof ReactTrans;\nexport let useTranslation: UseTranslation;\n\ntype UseTranslation = typeof useReactI18NextTranslation;\n\nexport type TFunction = (key: string, options?: TOptions, context?: any) => string;\n\nexport function initializeTranslation(transComponent: typeof ReactTrans, useTranslationHook: UseTranslation) {\n\tTrans = transComponent;\n\tuseTranslation = useTranslationHook;\n}\n","/* eslint-disable */\nimport {Tree, NodeId, DataSetConfig} from './types';\n\nexport function removeDuplicatesFromArray<T>(arr: Array<T>): Array<T> {\n\treturn arr.filter((id, index, arr) => arr.indexOf(id) === index);\n}\n\nexport function removeNodeIds(nodeIds: Array<NodeId>, nodeIdsToRemove: Array<NodeId>): Array<NodeId> {\n\treturn nodeIds.filter((id) => !nodeIdsToRemove.includes(id));\n}\n\n/**\n * Returns the union of two arrays. Examples\n * [1,2,3] u [2,3,4,5] -> [1,2,3,4,5]\n * @param {Array<NodeId>} nodeIds1 An array of string or integers defining the nodeid\n * @param {Array<NodeId>} nodeIds2 An array of string or integers defining the nodeid\n */\nexport function mergeNodeIdArrays(nodeIds1: Array<NodeId>, nodeIds2: Array<NodeId>): Array<NodeId> {\n\treturn removeDuplicatesFromArray([...nodeIds1, ...nodeIds2]);\n}\n\n/**\n * Returns the intersection of two arrays. Example\n * [1,2,3] n [2,3,4,5] -> [2,3]\n * @param {Array} array1\n * @param {Array} array2\n */\nexport function intersectArrays<T>(array1: Array<T>, array2: Array<T>): Array<T> {\n\treturn array1.filter((value) => array2.includes(value));\n}\n\n/**\n * Returns the count of all leaves in the tree @node\n * @param {Tree} node tree to calculate the treesize for\n */\nexport function getTreeSize(node: Tree): number {\n\tif (node.children) {\n\t\tconst numberOfChildren = node.children.length;\n\t\treturn numberOfChildren + node.children.reduce((l, child) => l + getTreeSize(child), 0);\n\t}\n\n\treturn 0;\n}\n\n/**\n * Returns the leaves of the tree given by @node\n * @param {Tree} node The root node of the tree that should be processed\n */\nexport function getAllLeaves(node: Tree): Array<Tree> {\n\tif (node.children) {\n\t\treturn node.children.reduce((childNodes: Array<Tree>, child) => [...childNodes, ...getAllLeaves(child)], []);\n\t}\n\n\treturn [node];\n}\n\n/**\n * Returns the ids of all leaves of the tree given by @node\n * @param {Tree} node The root node of the tree that should be processed\n */\nexport function getAllLeafIds(node: Tree): Array<NodeId> {\n\treturn getAllLeaves(node).map((node) => node.id);\n}\n\n/**\n * Returns a function that converts an arbitrary hierarchical tree data structure into a treestructure\n * that is processable by the * @Node component. The properties defined in @childNodeKey , @idKey ,\n * @displayNameKey , @typeKey are injected into the returned function @convert . The @convert function\n * returns a new tree of the same structure of smaller size with different parameters.\n *\n * @param {string} childNodeKey The name of the property that holds child nodes\n * @param {string} idKey The name of the property of the node identifier\n * @param {string} displayNameKey The name of the property of the node's name\n * @param {string} typeKey The name of the property to decide if it is a leaf or a \"folder\" node\n * @param {string} lazyLoadableKey\n * @param {ExpandableNode} nodeMetaData An object containing the value for the node's property @typeKey as well as image paths\n * @param {Leaf} leafMetaData An object containing the value for the node's property @typeKey as well as image paths\n */\nexport function convertToTree<T>({\n\tchildNodeKey,\n\tidKey,\n\tdisplayNameKey,\n\ttypeKey,\n\tlazyLoadableKey,\n\tnodeMetaData,\n\tleafMetaData\n}: DataSetConfig): (hierarchicalData: Array<any>, nodePath?: string) => Array<Tree> {\n\tconst {typeValue: leafTypeValue, image, resolver: leafResolver} = leafMetaData;\n\tconst {typeValue: nodeTypeValue, expandedImage, closedImage, resolver: nodeResolver} = nodeMetaData;\n\treturn function convert(hierarchicalData: Array<any>, nodePath = ''): Array<Tree> {\n\t\treturn hierarchicalData.map((rootNode) => {\n\t\t\tconst id = rootNode[idKey];\n\t\t\tconst name = rootNode[displayNameKey];\n\t\t\tconst children = rootNode[childNodeKey];\n\t\t\tconst lazyLoadable = rootNode[lazyLoadableKey];\n\t\t\tconst isNode = nodeResolver ? nodeResolver(rootNode) : rootNode[typeKey] === nodeTypeValue;\n\t\t\tconst isLeaf = leafResolver ? leafResolver(rootNode) : rootNode[typeKey] === leafTypeValue;\n\t\t\tconst path = `${nodePath}/${name}`;\n\t\t\tconst originalNode = rootNode;\n\n\t\t\tif (isNode) {\n\t\t\t\treturn {\n\t\t\t\t\tid,\n\t\t\t\t\tname,\n\t\t\t\t\tchildren: convert(children || [], path),\n\t\t\t\t\tlazyLoadable,\n\t\t\t\t\texpandedImage,\n\t\t\t\t\tclosedImage,\n\t\t\t\t\tpath,\n\t\t\t\t\toriginalNode\n\t\t\t\t};\n\t\t\t} else if (isLeaf) {\n\t\t\t\treturn {\n\t\t\t\t\tid,\n\t\t\t\t\tname,\n\t\t\t\t\timage,\n\t\t\t\t\tpath,\n\t\t\t\t\toriginalNode\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthrow new Error('unknown node or leaf type provided');\n\t\t});\n\t};\n}\n\n/**\n * Merges the properties of @node with the properties of @patch .\n * @param {Tree} node The single node to apply the patch against\n * @param {Tree} patch An object holding new properties and additional children for the node\n */\nfunction patchNode(node: Tree, patch: Partial<Tree>) {\n\tlet patchedChildren;\n\n\tif (patch.children !== undefined) {\n\t\tif (node.children !== undefined) {\n\t\t\tpatchedChildren = [...node.children, ...patch.children];\n\t\t} else {\n\t\t\tpatchedChildren = [...patch.children];\n\t\t}\n\t}\n\n\treturn {...node, ...patch, children: patchedChildren || undefined};\n}\n\n/**\n * Find the node with @nodeId in the tree @node and replace properties defined in the provided @patch .\n * If the node with id @nodeId is not found the tree is returned with the same structure.\n * In any case (@nodeId is found or not found) a new object is created and returned, containing the resulting tree.\n *\n * @param {Tree} node The initial tree to add children on\n * @param {NodeId} nodeId The specific node id of the node to add the children\n * @param {Array<Tree>} patch An object containing Tree properties to change on the node with id @nodeId\n */\nexport function findNodeAndApplyPatch(node: Tree, nodeId: NodeId, patch: Partial<Tree>): Tree {\n\tif (node.children === undefined) {\n\t\treturn node;\n\t}\n\n\tif (node.id === nodeId) {\n\t\treturn patchNode(node, patch);\n\t}\n\n\treturn {...node, children: node.children.map((childNode) => findNodeAndApplyPatch(childNode, nodeId, patch))};\n}\n\nfunction getTreeNodePathByIdArray(\n\tcurrentNode: any,\n\tidToFind: string,\n\tidKey: string,\n\tchildNodeKey: string,\n\tdisplayNameKey: string\n): Array<string> | null | undefined {\n\tif (currentNode[idKey] === idToFind) {\n\t\treturn [currentNode[displayNameKey]];\n\t} else if (currentNode[childNodeKey]) {\n\t\tfor (let i = 0; i < currentNode[childNodeKey].length; i++) {\n\t\t\tconst path = getTreeNodePathByIdArray(\n\t\t\t\tcurrentNode[childNodeKey][i],\n\t\t\t\tidToFind,\n\t\t\t\tidKey,\n\t\t\t\tchildNodeKey,\n\t\t\t\tdisplayNameKey\n\t\t\t);\n\n\t\t\tif (path) {\n\t\t\t\tpath.unshift(currentNode[displayNameKey]);\n\t\t\t\treturn path;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n\nexport function getTreeNodePathById(\n\tcurrentNode: any,\n\tidToFind: string,\n\tidKey: string,\n\tchildNodeKey: string,\n\tdisplayNameKey: string\n): null | string {\n\tconst nodePathArray = getTreeNodePathByIdArray(currentNode, idToFind, idKey, childNodeKey, displayNameKey);\n\treturn nodePathArray ? nodePathArray.join('.') : null;\n}\n","import {Placement, Popup} from '@deviceinsight/ng-ui-basic-components';\nimport {CSSProperties, PropsWithChildren} from 'react';\n\ntype Props = {\n\tisOpen: boolean;\n\tonOpenChange: (open: boolean) => void;\n\tvalue?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tplacement?: Placement;\n};\n\nexport default function ColorPickerPopper({\n\tisOpen,\n\tonOpenChange,\n\tclassName,\n\tstyle,\n\tvalue,\n\tplacement,\n\tchildren\n}: PropsWithChildren<Props>) {\n\treturn (\n\t\t<Popup\n\t\t\thandler={\n\t\t\t\t<div className={`di color-picker-popper ${className || ''}`} style={style}>\n\t\t\t\t\t<div className=\"trigger\" style={{...style, backgroundColor: value}} />\n\t\t\t\t</div>\n\t\t\t}\n\t\t\topen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tplacement={placement}\n\t\t>\n\t\t\t<div className=\"color-picker-box\">\n\t\t\t\t<div className=\"content\">{children}</div>\n\t\t\t</div>\n\t\t</Popup>\n\t);\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport {Placement} from '@deviceinsight/ng-ui-basic-components';\n\nimport ColorPickerPopper from './ColorPickerPopper';\n\nexport type Props = {\n\t/** if set to false, a popper component will be shown */\n\tinline?: boolean;\n\n\t/** the current value - only RGB(A) */\n\tvalue?: string;\n\n\t/** an array of colors, e.g. `['#88cc00', '#ffeb3c', '#fec107']` */\n\tcolors: Array<string>;\n\n\t/** callback function that is executed when the user picks a color */\n\tonPick: (color: string) => void;\n\n\t/** if true and inline is false, the color picker popup will be shown on init */\n\tisOpen?: boolean;\n\n\t/** if a function is provided and inline is false, the function will be called when the popper open state changes */\n\tonOpenStateChange?: (arg0: boolean) => void;\n\n\t/** styles for the popper component */\n\tstyle?: React.CSSProperties;\n\n\t/** styles for the colorpicker */\n\tpickerStyle?: React.CSSProperties;\n\n\t/** class for the popper component */\n\tclassName?: string;\n\n\t/** class for the colorpicker */\n\tpickerClassName?: string;\n\n\t/** where to align the popper component */\n\tdirection?: Placement;\n};\n\n/**\n * Unlike the GradientColorPicker, the GridColorPicker uses a predefined set of colors.\n * The colors can be defined individually for each GridColorPicker and passed in as prop.\n * Each line can take up to five cells.\n * The cell width within the grid is then calculated automatically via the `styles` prop.\n */\nexport default function GridColorPicker({\n\tvalue,\n\tisOpen,\n\tonOpenStateChange,\n\tdirection,\n\tcolors,\n\tonPick,\n\tpickerStyle,\n\tpickerClassName,\n\tinline = true,\n\tclassName,\n\tstyle\n}: Props) {\n\tconst [open, setOpen] = useState(false);\n\n\tconst picker = (\n\t\t<div className={classNames('di color-picker grid-color-picker clearfix', pickerClassName)} style={pickerStyle}>\n\t\t\t{colors.map((color) => (\n\t\t\t\t<div\n\t\t\t\t\tkey={color}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tonPick(color);\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={`color ${color === value ? 'selected' : ''}`}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: color\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n\n\tif (inline) {\n\t\treturn picker;\n\t}\n\n\treturn (\n\t\t<ColorPickerPopper\n\t\t\tclassName={className}\n\t\t\tstyle={style}\n\t\t\tvalue={value}\n\t\t\tisOpen={isOpen ?? open}\n\t\t\tonOpenChange={onOpenStateChange ?? setOpen}\n\t\t\tplacement={direction}\n\t\t>\n\t\t\t{picker}\n\t\t</ColorPickerPopper>\n\t);\n}\n","import * as React from 'react';\n\nconst isValid = (value: string, pattern: RegExp, required: boolean): boolean => {\n\tif (!value.length) {\n\t\treturn !required;\n\t}\n\n\treturn pattern.test(value);\n};\n\nexport type Props = {\n\t/** Value of the input field */\n\tvalue: string;\n\n\t/** Function, executed on change, takes value and valid as arguments */\n\tonChange: (value: string, valid: boolean) => void;\n\n\t/** Pattern to validate the input */\n\tpattern: RegExp;\n\n\t/** If true, marks the input field as mandatory */\n\trequired: boolean;\n\n\t/** Placeholder */\n\tplaceholder: string;\n\n\t/** @ignore */\n\tstyle?: React.CSSProperties;\n\n\t/** @ignore */\n\tclassName?: string;\n\n\t/** @ignore */\n\tonBlur?: () => void;\n\n\t/** @ignore */\n\tdisabled?: boolean;\n\n\t/** (Optional) sets custom styles if the input field's value isn't valid */\n\tinvalidStyle?: React.CSSProperties;\n};\n\n/**\n * ValidatedTextInput provides an easy way to validate a text inputs value for a certain pattern.\n * This is best used for any form of forms.\n */\nexport default class ValidatedTextInput extends React.Component<Props> {\n\tstatic defaultProps: {\n\t\trequired: boolean;\n\t} = {\n\t\trequired: false\n\t};\n\n\thandleChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\n\t\tconst {value} = e.target as HTMLInputElement;\n\t\tconst {pattern, required, onChange} = this.props;\n\t\tconst valid = isValid(value, pattern, required);\n\t\tonChange(value, valid);\n\t};\n\n\trender() {\n\t\tconst {style, invalidStyle, value, ...props} = this.props;\n\t\tconst {pattern, required, ...otherProps} = props;\n\t\treturn (\n\t\t\t<input\n\t\t\t\t{...otherProps}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={this.handleChange}\n\t\t\t\tstyle={isValid(value, pattern, required) ? style : {...style, ...invalidStyle}}\n\t\t\t\ttype=\"text\"\n\t\t\t/>\n\t\t);\n\t}\n}\n","import {CSSProperties, useEffect, useState} from 'react';\nimport ValidatedTextInput from '../input/ValidatedTextInput';\n\ntype Props = {\n\tvalue: string;\n\tpattern: RegExp;\n\tonChange: (color: string) => void;\n\tplaceholder: string;\n\tstyle?: CSSProperties;\n};\n\nexport function ColorTextInput({value, pattern, onChange, placeholder, style}: Props) {\n\tconst [text, setText] = useState(value);\n\n\tuseEffect(() => {\n\t\t \n\t\tsetText(value);\n\t}, [value]);\n\n\tfunction handleChange(value: string, valid: boolean) {\n\t\tsetText(value);\n\t\tif (valid) {\n\t\t\tonChange(value);\n\t\t}\n\t}\n\n\treturn (\n\t\t<ValidatedTextInput\n\t\t\tvalue={text}\n\t\t\tonChange={handleChange}\n\t\t\tpattern={pattern}\n\t\t\tinvalidStyle={{\n\t\t\t\tborderColor: 'red'\n\t\t\t}}\n\t\t\tplaceholder={placeholder}\n\t\t\trequired\n\t\t\tstyle={style}\n\t\t/>\n\t);\n}\n","import {useState} from 'react';\nimport {convert, parse} from 'pure-color';\nimport classNames from 'classnames';\nimport {RgbaStringColorPicker, RgbStringColorPicker, HexColorPicker} from 'react-colorful';\n\nimport ColorPickerPopper from './ColorPickerPopper';\nimport {ColorTextInput} from './ColorTextInput';\nimport {Placement} from '@deviceinsight/ng-ui-basic-components';\n\nconst VALIDATE_HEX_COLOR_REGEX = /^#([A-Fa-f0-9]{6})$/;\nconst VALIDATE_RGB_COLOR_REGEX = /^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/;\n\nexport type Props = {\n\t/** if set to false, a popper component will be shown */\n\tinline?: boolean;\n\n\t/** the current value - only RGB(A) */\n\tvalue?: string;\n\n\t/** shows the opacity slider */\n\topacitySlider?: boolean;\n\n\t/** callback function that is executed when the user picks a color */\n\tonPick: (color: string) => void;\n\n\t/** if true and inline is false, the colorpicker popup will be shown on init */\n\tisOpen?: boolean;\n\n\t/** if a function is provided and inline is false, the function will be called when the popper open state changes */\n\tonOpenStateChange?: (arg0: boolean) => void;\n\n\t/** if true, the user can also add hex color via text input - cannot be used with opacity slider */\n\tallowTextInput?: boolean;\n\n\t/** styles for the popper component */\n\tstyle?: React.CSSProperties;\n\n\t/** styles for the colorpicker */\n\tpickerStyle?: React.CSSProperties;\n\n\t/** class for the popper component */\n\tclassName?: string;\n\n\t/** class for the colorpicker */\n\tpickerClassName?: string;\n\n\t/** where to align the popper component */\n\tdirection?: Placement;\n};\n\nconst convertRgbaToRgb = (color: string): Array<number> => {\n\treturn parse(color).splice(0, 3);\n};\n\nconst convertToHex = (color?: string): string => {\n\treturn color && color.length > 6 ? convert.rgb.hex(convertRgbaToRgb(color)) : '';\n};\n\nconst convertToRgb = (color?: string): string => {\n\treturn color ? convert.rgb.string(convertRgbaToRgb(color)) : '';\n};\n\n/**\n * The GradientColorPicker provides the functionality to generate any valid RGB color.\n * This is especially useful for setting and defining a custom color.\n */\nexport default function GradientColorPicker({\n\tonOpenStateChange,\n\tonPick,\n\tallowTextInput,\n\tclassName,\n\tdirection,\n\tinline = true,\n\tisOpen,\n\topacitySlider,\n\tpickerClassName,\n\tpickerStyle,\n\tstyle,\n\tvalue\n}: Props) {\n\tconst [open, setOpen] = useState(false);\n\tconst hexValue = convertToHex(value);\n\tconst rgbValue = convertToRgb(value);\n\n\tconst ColorPicker =\n\t\tvalue === hexValue\n\t\t\t? HexColorPicker\n\t\t\t: opacitySlider && !allowTextInput\n\t\t\t\t? RgbaStringColorPicker\n\t\t\t\t: RgbStringColorPicker;\n\n\tconst picker = (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'di gradient-color-picker',\n\t\t\t\t{\n\t\t\t\t\t'with-textfield': allowTextInput\n\t\t\t\t},\n\t\t\t\tpickerClassName\n\t\t\t)}\n\t\t\tstyle={pickerStyle}\n\t\t>\n\t\t\t<ColorPicker color={value} onChange={onPick} />\n\t\t\t{allowTextInput && (\n\t\t\t\t<div className=\"inputs\">\n\t\t\t\t\t<ColorTextInput\n\t\t\t\t\t\tvalue={hexValue}\n\t\t\t\t\t\tonChange={onPick}\n\t\t\t\t\t\tpattern={VALIDATE_HEX_COLOR_REGEX}\n\t\t\t\t\t\tplaceholder=\"#FF00FF\"\n\t\t\t\t\t\tstyle={{width: 60}}\n\t\t\t\t\t/>\n\t\t\t\t\t<ColorTextInput\n\t\t\t\t\t\tvalue={rgbValue}\n\t\t\t\t\t\tonChange={onPick}\n\t\t\t\t\t\tpattern={VALIDATE_RGB_COLOR_REGEX}\n\t\t\t\t\t\tplaceholder=\"rgb(255,0,255)\"\n\t\t\t\t\t\tstyle={{width: 115}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tif (inline) {\n\t\treturn picker;\n\t}\n\n\treturn (\n\t\t<ColorPickerPopper\n\t\t\tclassName={className}\n\t\t\tstyle={style}\n\t\t\tvalue={value}\n\t\t\tisOpen={isOpen ?? open}\n\t\t\tonOpenChange={onOpenStateChange ?? setOpen}\n\t\t\tplacement={direction}\n\t\t>\n\t\t\t{picker}\n\t\t</ColorPickerPopper>\n\t);\n}\n","import 'dayjs/locale/en';\nimport 'dayjs/locale/en-gb';\nimport 'dayjs/locale/en-ca';\nimport 'dayjs/locale/de';\nimport 'dayjs/locale/de-at';\nimport 'dayjs/locale/de-ch';\nimport 'dayjs/locale/it';\nimport 'dayjs/locale/ja';\n\nconst supportedLocales = ['en', 'en-gb', 'en-ca', 'de', 'de-at', 'de-ch', 'it', 'ja'];\n\nexport function isLocaleSupported(locale: string) {\n\treturn supportedLocales.includes(locale);\n}\n","import {CSSProperties, forwardRef, useCallback, useEffect, useMemo, useState} from 'react';\nimport timezone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\nimport DatePicker, {registerLocale} from 'react-datepicker';\nimport {debounce} from 'lodash';\nimport dayjs from 'dayjs';\nimport localeData from 'dayjs/plugin/localeData';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport i18n from 'i18next';\nimport cx from 'classnames';\nimport {useTranslation} from '../../i18n';\nimport * as Locales from 'date-fns/locale';\n\nimport {Button, Icon, Popup} from '@deviceinsight/ng-ui-basic-components';\n\nimport 'react-datepicker/dist/react-datepicker.css';\nimport './react-datepicker-custom.css';\nimport {isLocaleSupported} from '../../utils/dayjsLocales';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(localeData);\ndayjs.extend(localizedFormat);\ndayjs.extend(customParseFormat);\n\nfunction registerLanguage(locale: string) {\n\tconst [localeSegment1, localeSegment2] = locale.split('-');\n\n\tlet module;\n\tif (localeSegment1 && localeSegment2) {\n\t\t// @ts-ignore\n\t\tmodule = Locales[`${localeSegment1}${localeSegment2}`] ?? Locales[localeSegment1];\n\t} else if (localeSegment1) {\n\t\t// @ts-ignore\n\t\tmodule = Locales[localeSegment1];\n\t} else {\n\t\tmodule = null;\n\t}\n\n\tif (module) {\n\t\tregisterLocale(locale, module);\n\t}\n}\n\nasync function changeDayjsLocale(locale: string) {\n\tlet dayjsLocale = null;\n\tconst [localeSegment1] = locale.split('-');\n\tif (isLocaleSupported(locale.toLowerCase())) {\n\t\tdayjsLocale = locale.toLowerCase();\n\t} else if (isLocaleSupported(localeSegment1.toLowerCase())) {\n\t\tdayjsLocale = localeSegment1.toLowerCase();\n\t}\n\n\tif (dayjsLocale) {\n\t\tdayjs.locale(dayjsLocale);\n\t}\n}\n\ntype Props = {\n\t/** the current value (millis since 1970-01-01 or formatted string) */\n\tvalue: number | string | null | undefined;\n\n\t/** (optional) timezone */\n\ttimezone?: string;\n\n\t/** callback function that is executed when the user picks a date */\n\tonChange: (date: number | null | undefined, fromTextField?: boolean) => void;\n\n\t/** makes the input field clearable */\n\tclearable?: boolean;\n\n\t/** displays the date picker inline */\n\tinline?: boolean;\n\n\t/** displays the DateInput read only */\n\treadOnly?: boolean;\n\n\t/** (optional) class name for the wrapping elements */\n\twrapperClassName?: string;\n\n\t/** (optional) locale, if not set, the i18next.language is taken */\n\tlocale?: string;\n\n\t/** (optional) minimum selectable date */\n\tminDate?: Date;\n\n\t/** (optional) maximum selectable date */\n\tmaxDate?: Date;\n\n\tstyle?: CSSProperties;\n};\n\nfunction isInputValid(value: number | string | null | undefined, pattern: string) {\n\tif (value == null || value === '') {\n\t\treturn true;\n\t}\n\tif (typeof value === 'number') {\n\t\treturn !isNaN(value);\n\t}\n\tif (typeof value === 'string') {\n\t\treturn dayjs(value, pattern, true).isValid();\n\t}\n\treturn false;\n}\n\nfunction inputToDate(\n\tvalue: number | string | null | undefined,\n\tpattern: string,\n\ttimezone: string | undefined\n): Date | null {\n\tif (typeof value === 'number' && !Number.isNaN(value)) {\n\t\treturn new Date(value);\n\t}\n\tif (typeof value === 'string' && dayjs(value, pattern, true).isValid()) {\n\t\treturn dayjs.tz(value, pattern, timezone).toDate();\n\t}\n\treturn null;\n}\n\nfunction inputToTzDate(\n\tvalue: number | string | null | undefined,\n\tpattern: string,\n\ttimezone: string | undefined\n): dayjs.Dayjs | null {\n\tif (typeof value === 'number') {\n\t\treturn dayjs.tz(value, timezone);\n\t}\n\tif (typeof value === 'string' && dayjs(value, pattern, true).isValid()) {\n\t\treturn dayjs.tz(value, pattern, timezone);\n\t}\n\treturn null;\n}\n\n/**\n * DateInput is used to let users set a date conveniently.\n * Usually the user's locale is used for displaying the correct date format.\n */\nconst DateInput = forwardRef<HTMLInputElement, Props>(\n\t({value, clearable, inline, readOnly, wrapperClassName, onChange, locale, timezone, ...otherProps}, ref) => {\n\t\tconst [pattern, setPattern] = useState<string>(dayjs.localeData().longDateFormat('L'));\n\t\tconst {t} = useTranslation();\n\t\tconst [valid, setValid] = useState(false);\n\t\tconst [popupOpen, setPopupOpen] = useState(false);\n\t\tconst [inputText, setInputText] = useState('');\n\n\t\tconst debouncedSetPopupActive = useMemo(() => debounce(setPopupOpen, 30), []);\n\n\t\tuseEffect(() => {\n\t\t\tconst language = locale ?? i18n.language;\n\n\t\t\tif (language) {\n\t\t\t\tregisterLanguage(language);\n\t\t\t\tchangeDayjsLocale(language).then(() => setPattern(dayjs.localeData().longDateFormat('L')));\n\t\t\t}\n\t\t}, [locale]);\n\n\t\tconst formattedDate = useCallback(\n\t\t\t(value: number | string | null | undefined) => {\n\t\t\t\tif (value == null || value == '') {\n\t\t\t\t\treturn '';\n\t\t\t\t} else if (!isInputValid(value, pattern)) {\n\t\t\t\t\treturn t('dateInput.invalidDate', {\n\t\t\t\t\t\tdefaultValue: 'invalid date'\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\treturn typeof value === 'number' ? dayjs.tz(value, timezone).format(pattern) : value;\n\t\t\t\t}\n\t\t\t},\n\t\t\t[pattern, t, timezone]\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tif (value == null) {\n\t\t\t\tsetInputText('');\n\t\t\t} else {\n\t\t\t\tsetInputText(formattedDate(value));\n\t\t\t}\n\t\t}, [formattedDate, value]);\n\n\t\tuseEffect(() => {\n\t\t\tsetValid(isInputValid(value, pattern));\n\t\t}, [pattern, value]);\n\n\t\tuseEffect(() => {\n\t\t\tdayjs.locale(locale ?? i18n.language);\n\t\t\tsetPattern(dayjs.localeData().longDateFormat('L'));\n\t\t}, [locale]);\n\n\t\tconst handleInputTextChange = (text: string) => {\n\t\t\tsetInputText(text);\n\n\t\t\tif (text) {\n\t\t\t\tconst valid = dayjs(text, pattern, true).isValid();\n\n\t\t\t\tif (valid) {\n\t\t\t\t\tconst prevDate = inputToTzDate(value, pattern, timezone);\n\t\t\t\t\tconst newDate = dayjs.tz(text, pattern, timezone ?? dayjs.tz.guess());\n\t\t\t\t\tif (prevDate) {\n\t\t\t\t\t\tnewDate.set('hour', prevDate.hour());\n\t\t\t\t\t\tnewDate.set('minute', prevDate.minute());\n\t\t\t\t\t\tnewDate.set('second', prevDate.second());\n\t\t\t\t\t\tnewDate.set('millisecond', prevDate.millisecond());\n\t\t\t\t\t}\n\t\t\t\t\tonChange(newDate.valueOf(), true);\n\t\t\t\t}\n\n\t\t\t\tsetValid(valid);\n\t\t\t} else {\n\t\t\t\tonChange(null, true);\n\t\t\t\tsetValid(true);\n\t\t\t}\n\t\t};\n\n\t\tconst handlePickerChange = (date: Date | null | undefined) => {\n\t\t\tonChange(date ? date.valueOf() : null);\n\t\t\tsetInputText(formattedDate(date ? date.getTime() : null));\n\t\t\tsetPopupOpen(false);\n\t\t};\n\n\t\tconst handleClear = () => handleInputTextChange('');\n\n\t\tif (inline) {\n\t\t\treturn (\n\t\t\t\t<DatePicker\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tonChange={handlePickerChange}\n\t\t\t\t\tselected={inputToDate(value, pattern, timezone)}\n\t\t\t\t\tlocale={locale ?? i18n.language}\n\t\t\t\t\tisClearable={clearable}\n\t\t\t\t\tplaceholderText={pattern}\n\t\t\t\t\tclassName={cx('date', {invalid: !valid})}\n\t\t\t\t\tinline\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (readOnly) {\n\t\t\treturn (\n\t\t\t\t<DatePicker\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tonChange={() => {}}\n\t\t\t\t\tselected={inputToDate(value, pattern, timezone)}\n\t\t\t\t\tlocale={locale ?? i18n.language}\n\t\t\t\t\tcustomInput={\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<input type=\"text\" value={formattedDate(value)} readOnly />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t}\n\t\t\t\t\tplaceholderText={pattern}\n\t\t\t\t\treadOnly\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Popup\n\t\t\t\thandler={\n\t\t\t\t\t<span className=\"di date-input-wrapper\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\tdata-testid=\"date-input\"\n\t\t\t\t\t\t\tclassName={cx('date', {invalid: !valid})}\n\t\t\t\t\t\t\tonChange={(e) => handleInputTextChange(e.target.value)}\n\t\t\t\t\t\t\tvalue={inputText}\n\t\t\t\t\t\t\tplaceholder={pattern}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\thandleInputTextChange(formattedDate(value));\n\t\t\t\t\t\t\t\tdebouncedSetPopupActive(false);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{clearable && (\n\t\t\t\t\t\t\t<Button naked small onClick={handleClear}>\n\t\t\t\t\t\t\t\t<Icon del />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t\tmode={['click', 'focus']}\n\t\t\t\tclassName=\"date-input\"\n\t\t\t\thandlerWrapperClassName={wrapperClassName}\n\t\t\t\topen={popupOpen}\n\t\t\t\tonOpenChange={setPopupOpen}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"di date-picker-popup-wrapper\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonFocus={() => {\n\t\t\t\t\t\tdebouncedSetPopupActive(true);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t{...otherProps}\n\t\t\t\t\t\tselected={inputToDate(value, pattern, timezone)}\n\t\t\t\t\t\tonChange={handlePickerChange}\n\t\t\t\t\t\tlocale={locale ?? i18n.language}\n\t\t\t\t\t\tisClearable={clearable}\n\t\t\t\t\t\tplaceholderText={pattern}\n\t\t\t\t\t\tclassName={cx('date', {invalid: !valid})}\n\t\t\t\t\t\tinline\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Popup>\n\t\t);\n\t}\n);\n\nexport default DateInput;\n","import * as React from 'react';\n\nimport {Button, Icon} from '@deviceinsight/ng-ui-basic-components';\n\nexport type Props = {\n\t/** Current value of input field */\n\tvalue: string;\n\n\t/** Function, executed on change */\n\tonChange: (value: string) => any;\n};\n\ntype State = {\n\teditMode: boolean;\n};\n\n/**\n * UrnInput offers a convenient way to add or edit Asset URNs.\n * Usually, a generated default value is passed in as prop.\n */\nexport default class UrnInput extends React.Component<Props, State> {\n\tstate: State = {\n\t\teditMode: false\n\t};\n\n\thandleEdit: () => void = () =>\n\t\tthis.setState({\n\t\t\teditMode: true\n\t\t});\n\n\thandleChangeValue: (event: React.SyntheticEvent<HTMLInputElement>) => any = (\n\t\tevent: React.SyntheticEvent<HTMLInputElement>\n\t) => this.props.onChange((event.target as HTMLInputElement).value);\n\n\trender() {\n\t\tconst {editMode} = this.state;\n\t\tconst {value} = this.props;\n\n\t\tif (editMode) {\n\t\t\treturn (\n\t\t\t\t<input\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={this.handleChangeValue}\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tmarginRight: 10\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button small onClick={this.handleEdit}>\n\t\t\t\t\t\t<Icon edit />\n\t\t\t\t\t</Button>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\t}\n}\n","import {useEffect, useRef, useState} from 'react';\nimport {Trans, useTranslation} from '../../i18n';\n\nimport {Button, Modal} from '@deviceinsight/ng-ui-basic-components';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\nexport type Props = {\n\t/** Title of the Prompt's content */\n\ttitle: TranslationDescriptor;\n\n\t/** Label of the Prompt's input field */\n\tmessage: TranslationDescriptor;\n\n\t/** @ignore */\n\tonAccept: (arg0: string) => void;\n\n\t/** @ignore */\n\tonCancel: (...args: Array<any>) => any;\n\n\t/** (Optional) if sets, returns custom label for the accept button */\n\tacceptButtonLabel?: TranslationDescriptor;\n\n\t/** (Optional) if sets, returns custom label for the cancel button */\n\tcancelButtonLabel?: TranslationDescriptor;\n\n\t/** (Optional) if sets, returns custom placeholder for the input field */\n\tinputPlaceholder?: TranslationDescriptor;\n};\n\n/**\n * This component should not be used directly, instead use `@withPrompt` to inject a promise-based prompt method\n */\nexport default function Prompt({\n\ttitle,\n\tmessage,\n\tonAccept,\n\tonCancel,\n\tinputPlaceholder,\n\tcancelButtonLabel,\n\tacceptButtonLabel\n}: Props) {\n\tconst {t} = useTranslation();\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst [value, setValue] = useState('');\n\n\tuseEffect(() => {\n\t\tinputRef.current?.focus();\n\t});\n\n\treturn (\n\t\t<Modal\n\t\t\theader={t(title.id, {\n\t\t\t\tdefaultValue: title.defaultValue\n\t\t\t})}\n\t\t\tcontent={\n\t\t\t\t<div className=\"di form\">\n\t\t\t\t\t<div className=\"field\">\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t<Trans i18nKey={message.id}>{message.defaultValue}</Trans>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: 250\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tref={inputRef}\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\tinputPlaceholder\n\t\t\t\t\t\t\t\t\t? t(inputPlaceholder.id, {\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue: inputPlaceholder.defaultValue\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={(event) => setValue(event.target.value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<div>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tprimary\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tonAccept(value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdisabled={!value.length}\n\t\t\t\t\t>\n\t\t\t\t\t\t{acceptButtonLabel ? (\n\t\t\t\t\t\t\t<Trans i18nKey={acceptButtonLabel.id}>{acceptButtonLabel.defaultValue}</Trans>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Trans i18nKey=\"form.accept\">Accept</Trans>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button onClick={onCancel}>\n\t\t\t\t\t\t{cancelButtonLabel ? (\n\t\t\t\t\t\t\t<Trans i18nKey={cancelButtonLabel.id}>{cancelButtonLabel.defaultValue}</Trans>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Trans i18nKey=\"form.cancel\">Cancel</Trans>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\twidth={600}\n\t\t/>\n\t);\n}\n","import * as React from 'react';\n\nimport {TranslationDescriptor} from '../../types/i18n';\nimport Prompt from './Prompt';\n\nexport type PromptProps = {\n\tprompt: (\n\t\ttitle: TranslationDescriptor,\n\t\tmessage: TranslationDescriptor,\n\t\tinputPlaceholder?: TranslationDescriptor,\n\t\tacceptButtonLabel?: TranslationDescriptor,\n\t\tcancelButtonLabel?: TranslationDescriptor\n\t) => Promise<string>;\n};\n\ntype State = {\n\tshow: boolean;\n\tpromptElement?: React.ReactElement<typeof Prompt>;\n};\n\nexport default function withPrompt<P>(WrappedComponent: React.ComponentType<P & PromptProps>): React.ComponentType<P> {\n\treturn class WithPromptWrapper extends React.Component<P, State> {\n\t\tstate: State = {\n\t\t\tshow: false\n\t\t};\n\t\tprompt = (\n\t\t\ttitle: TranslationDescriptor,\n\t\t\tmessage: TranslationDescriptor,\n\t\t\tinputPlaceholder?: TranslationDescriptor,\n\t\t\tacceptButtonLabel?: TranslationDescriptor,\n\t\t\tcancelButtonLabel?: TranslationDescriptor\n\t\t): Promise<string> =>\n\t\t\tnew Promise((resolve) => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tshow: true,\n\t\t\t\t\tpromptElement: (\n\t\t\t\t\t\t<Prompt\n\t\t\t\t\t\t\ttitle={title}\n\t\t\t\t\t\t\tmessage={message}\n\t\t\t\t\t\t\tonAccept={(value) => {\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\tshow: false\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tresolve(value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonCancel={() => {\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\tshow: false\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinputPlaceholder={inputPlaceholder}\n\t\t\t\t\t\t\tacceptButtonLabel={acceptButtonLabel}\n\t\t\t\t\t\t\tcancelButtonLabel={cancelButtonLabel}\n\t\t\t\t\t\t\tkey=\"1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t});\n\t\t\t});\n\n\t\trender() {\n\t\t\treturn [\n\t\t\t\t<WrappedComponent {...this.props} prompt={this.prompt} key=\"0\" />,\n\t\t\t\tthis.state.show ? this.state.promptElement : null\n\t\t\t];\n\t\t}\n\t};\n}\n","/* eslint no-unused-vars: 0 */\nimport {useCallback, useEffect} from 'react';\n\nimport * as React from 'react';\nimport {useTranslation} from '../../i18n';\nimport {RouteComponentProps, useHistory} from 'react-router-dom';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\ntype LocationShape = RouteComponentProps['location'];\n\nconst isModifiedEvent = (event: React.MouseEvent<HTMLAnchorElement> | KeyboardEvent) =>\n\t!!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n\nexport type Props = {\n\tto: string | LocationShape;\n\n\t/** a title tooltip */\n\ttitle?: TranslationDescriptor;\n\n\t/** a keyboard shortcut that activates the link */\n\tkeyboardShortcut?: string;\n\n\t/**\n\t * a function called before the link is activated, should return a promise that either\n\t * - rejects: to abort the navigation\n\t * - resolves: to continue the navigation with\n\t * - resolves with a new location: to continue the navigation with a new path\n\t * */\n\tconfirm?: () => Promise<(string | null | undefined) | (LocationShape | null | undefined)>;\n\n\t/** @ignore */\n\tchildren?: any;\n\n\t/** @ignore */\n\tclassName?: string;\n\n\t/** @ignore */\n\t'data-testid'?: string;\n};\n\n/**\n * RouteLink enables the possibility to add new links to existing routes.\n * Those routes can also be accessed via `keyboardShortcut`\n */\nexport default function RouteLink({to, confirm, className, title, children, keyboardShortcut, ...otherProps}: Props) {\n\tconst history = useHistory();\n\tconst {t} = useTranslation();\n\n\tconst pushRoute = useCallback(() => {\n\t\tif (confirm) {\n\t\t\tconfirm()\n\t\t\t\t.then((location) => history.push(location || to))\n\t\t\t\t.catch(() => {\n\t\t\t\t\t// Exception means that the user didn't confirm, we don't need to react for that.\n\t\t\t\t});\n\t\t} else {\n\t\t\thistory.push(to);\n\t\t}\n\t}, [confirm, history, to]);\n\n\tconst handleKeyEvent = useCallback(\n\t\t(event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tkeyboardShortcut &&\n\t\t\t\tevent.key === keyboardShortcut &&\n\t\t\t\t!isModifiedEvent(event) && // @ts-ignore EventTarget is a Node and has a tagName\n\t\t\t\tevent.target.tagName && // @ts-ignore EventTarget is a Node and has a tagName\n\t\t\t\t!['INPUT', 'SELECT', 'TEXTAREA'].includes(event.target.tagName)\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tpushRoute();\n\t\t\t}\n\t\t},\n\t\t[keyboardShortcut, pushRoute]\n\t);\n\n\tuseEffect(() => {\n\t\tif (keyboardShortcut) {\n\t\t\twindow.addEventListener('keydown', handleKeyEvent);\n\t\t\treturn () => {\n\t\t\t\twindow.removeEventListener('keydown', handleKeyEvent);\n\t\t\t};\n\t\t}\n\t}, [keyboardShortcut, handleKeyEvent]);\n\n\tconst handleClickEvent = (event: React.MouseEvent<HTMLAnchorElement>) => {\n\t\tif (event.button === 0 && !isModifiedEvent(event)) {\n\t\t\tevent.preventDefault();\n\t\t\tpushRoute();\n\t\t}\n\t};\n\tconst href = history.createHref(typeof to === 'string' ? {pathname: to} : to);\n\n\treturn (\n\t\t<a\n\t\t\thref={href}\n\t\t\tonClick={handleClickEvent}\n\t\t\tclassName={`di route-link ${className || ''}`}\n\t\t\ttitle={\n\t\t\t\ttitle\n\t\t\t\t\t? t(title.id, {\n\t\t\t\t\t\t\tdefaultValue: title.defaultValue\n\t\t\t\t\t\t})\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t{...otherProps}\n\t\t>\n\t\t\t{children}\n\t\t</a>\n\t);\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport {useTranslation} from '../../i18n';\n\nimport {Icon} from '@deviceinsight/ng-ui-basic-components';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\nconst colors = {\n\tinfo: '#ffffff',\n\tsuccess: '#cce0cc',\n\twarning: '#fed254',\n\terror: '#d66961'\n};\nexport type Props = {\n\t/** Color scheme type based on InfoBox purpose */\n\ttype?: 'info' | 'success' | 'warning' | 'error';\n\n\t/** The message to display in the InfoBox */\n\tmessage: TranslationDescriptor | string;\n\n\t/** Optional icon of the InfoBox */\n\ticon?: string;\n\n\t/** Optional flag whether the InfoBox should be hideable */\n\thideable?: boolean;\n\n\t/** Optional additional classnames for the parent div container */\n\tclassName?: string;\n\n\t/** Optional additional information to display under the info header */\n\tchildren?: React.ReactNode;\n};\n\n/**\n * InfoBox is best used for highlighting information, especially if a warning and/or an error shall be displayed.\n */\nfunction InfoBox({type = 'info', hideable = false, className, icon, message: inputMessage, children}: Props) {\n\tconst [visible, setVisible] = useState(true);\n\tconst {t} = useTranslation();\n\n\tfunction getMessage(): string {\n\t\tif (typeof inputMessage !== 'string') {\n\t\t\tconst {id, defaultValue, ...rest} = inputMessage;\n\t\t\treturn t(id, {...rest, defaultValue});\n\t\t}\n\n\t\treturn inputMessage;\n\t}\n\n\tconst message = getMessage();\n\n\treturn visible ? (\n\t\t<div className={`infobox ${className ? className : ''}`}>\n\t\t\t<div\n\t\t\t\tclassName=\"infobox-header\"\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: colors[type]\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className=\"infobox-header-content\">\n\t\t\t\t\t{icon && (\n\t\t\t\t\t\t<div className=\"infobox-iconcontainer\">\n\t\t\t\t\t\t\t<img src={icon} alt=\"info-icon\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"infobox-message\">{message}</div>\n\t\t\t\t</div>\n\t\t\t\t{hideable && (\n\t\t\t\t\t<button className=\"infobox-closebutton\" onClick={() => setVisible(false)}>\n\t\t\t\t\t\t<Icon del large />\n\t\t\t\t\t</button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{children}\n\t\t</div>\n\t) : null;\n}\n\nexport default InfoBox;\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","export default function resolvePath(basePath: string, match: string): string {\n\tconst divider = basePath.endsWith('/') ? '' : '/';\n\treturn `${basePath}${divider}${match}`;\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport {Link, Redirect, Route, Switch, useLocation} from 'react-router-dom';\nimport {CSS} from '@dnd-kit/utilities';\nimport {closestCenter, DndContext, DragEndEvent} from '@dnd-kit/core';\nimport {horizontalListSortingStrategy, SortableContext, useSortable} from '@dnd-kit/sortable';\nimport {restrictToHorizontalAxis} from '@dnd-kit/modifiers';\nimport cx from 'classnames';\n\nimport resolvePath from '../../utils/resolvePath';\n\ntype Page = {\n\tpath: string;\n\trenderHeading: (props: unknown) => React.ReactNode;\n\theadingTitle?: string;\n\trenderBody: (props: any) => React.ReactNode;\n\tdraggingDisabled?: boolean;\n\tdisabled?: boolean;\n};\n\nexport type Props = {\n\t/** Path of the page where this component is rendered */\n\tbasePath?: string;\n\n\t/** Array of pages to be displayed */\n\tpages: Page[];\n\n\t/** (Optional) function, executed if the order of the tabs get changed */\n\tonOrderChange?: (oldIndex: number, newIndex: number) => void;\n};\n\ntype TabHeaderProps = {\n\tid: string | number;\n\tdraggingDisabled: boolean;\n};\n\nconst TabHeader = ({\n\tid,\n\tto,\n\tclassName,\n\ttitle,\n\tchildren,\n\tdraggingDisabled\n}: React.ComponentProps<Link> & TabHeaderProps) => {\n\tconst {attributes, listeners, setNodeRef, transform, transition} = useSortable({\n\t\tid,\n\t\tdisabled: draggingDisabled,\n\t\tstrategy: horizontalListSortingStrategy\n\t});\n\n\tconst style = {\n\t\ttransform: transform ? CSS.Transform.toString({...transform, scaleX: 1}) : undefined,\n\t\ttransition\n\t};\n\n\tconst {pathname} = useLocation();\n\tconst isActive = pathname.endsWith(to.toString());\n\n\tif (isActive) {\n\t\treturn (\n\t\t\t<button\n\t\t\t\tdata-testid=\"tab-button\"\n\t\t\t\tclassName={cx('tab-header item active', className)}\n\t\t\t\ttitle={title}\n\t\t\t\tref={setNodeRef}\n\t\t\t\tstyle={style}\n\t\t\t\ttype=\"button\"\n\t\t\t\t{...attributes}\n\t\t\t\t{...listeners}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Link\n\t\t\tdata-testid=\"tab-button\"\n\t\t\tto={to}\n\t\t\ttitle={title}\n\t\t\tclassName={cx('tab-header item', className)}\n\t\t\tref={setNodeRef}\n\t\t\tstyle={style}\n\t\t\t{...attributes}\n\t\t\t{...listeners}\n\t\t>\n\t\t\t{children}\n\t\t</Link>\n\t);\n};\n\n/**\n * RouteTabs add the possibility to unite several homogeneous pages into one.\n * Each tab can be accessed individually via the browser's history\n */\nexport default function RouteTabs({pages, onOrderChange, basePath, ...otherProps}: Props) {\n\tconst [dragging, setDragging] = useState(false);\n\tconst {pathname, state} = useLocation();\n\n\tfunction determineBasePath() {\n\t\tconst lastPathSegment = pathname.split('/').reverse()[0];\n\n\t\tif (pages.some((page) => page.path === lastPathSegment)) {\n\t\t\treturn pathname.substring(0, pathname.lastIndexOf('/'));\n\t\t} else {\n\t\t\treturn pathname;\n\t\t}\n\t}\n\n\tfunction handleDragEnd(event: DragEndEvent) {\n\t\tsetDragging(false);\n\t\tconst {active, over} = event;\n\n\t\tif (active.id !== over?.id && onOrderChange) {\n\t\t\tconst oldIndex = pages.findIndex((page) => page.path === active.id);\n\t\t\tconst newIndex = pages.findIndex((page) => page.path === over?.id);\n\t\t\tonOrderChange(oldIndex, newIndex);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className={dragging ? 'draggable-area' : ''}>\n\t\t\t<DndContext\n\t\t\t\tcollisionDetection={closestCenter}\n\t\t\t\tonDragEnd={handleDragEnd}\n\t\t\t\tonDragStart={() => setDragging(true)}\n\t\t\t\tmodifiers={[restrictToHorizontalAxis]}\n\t\t\t>\n\t\t\t\t<div className=\"di tabs\">\n\t\t\t\t\t<SortableContext\n\t\t\t\t\t\titems={pages.map((page) => ({...page, id: page.path}))}\n\t\t\t\t\t\tstrategy={horizontalListSortingStrategy}\n\t\t\t\t\t>\n\t\t\t\t\t\t{pages.map(({path, renderHeading, headingTitle, draggingDisabled, disabled: pageDisabled}) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TabHeader\n\t\t\t\t\t\t\t\t\tid={path}\n\t\t\t\t\t\t\t\t\tkey={path}\n\t\t\t\t\t\t\t\t\tto={resolvePath(basePath || determineBasePath(), path)}\n\t\t\t\t\t\t\t\t\ttitle={headingTitle}\n\t\t\t\t\t\t\t\t\tdraggingDisabled={\n\t\t\t\t\t\t\t\t\t\tpageDisabled ||\n\t\t\t\t\t\t\t\t\t\tdraggingDisabled ||\n\t\t\t\t\t\t\t\t\t\t!onOrderChange ||\n\t\t\t\t\t\t\t\t\t\t(!dragging && !pathname.endsWith(path))\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderHeading(otherProps)}\n\t\t\t\t\t\t\t\t</TabHeader>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</SortableContext>\n\t\t\t\t</div>\n\t\t\t</DndContext>\n\t\t\t<Switch>\n\t\t\t\t{pages.map(({renderBody, path}) => (\n\t\t\t\t\t<Route\n\t\t\t\t\t\tkey={path}\n\t\t\t\t\t\tpath={resolvePath(basePath || determineBasePath(), path)}\n\t\t\t\t\t\trender={() => renderBody(otherProps)}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t\t<Route>\n\t\t\t\t\t<Redirect\n\t\t\t\t\t\tto={{\n\t\t\t\t\t\t\tpathname: resolvePath(basePath || determineBasePath(), pages[0].path),\n\t\t\t\t\t\t\tstate\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</Route>\n\t\t\t</Switch>\n\t\t</div>\n\t);\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMZJREFUeNpi/P//PwMtARMDjcHQt4ABGgchQPwKxMWBzwKxKFlmQy14g8dwGL5MqiXIFvynEgb5VJmWFoDwImQLWNB8pQ/EjyiM1j/IHHQLPgHxB3ok00dUCKpnuCzQAmJZKjh+Jy4L3KkUOjgtcKNG/gXi3cg5GRZuGkD8jQrhfwpmNroPbIGYkwo+2IErFXlQKfx3oRd2MK99oELwfIDlL+Qgegul+ang+u0ouRnqg0ACxTWx+CIQKyGbzThaJw+4BQABBgBH38BkTQm7ZwAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGpJREFUeNpi/P//PwMtARMDjcHQt4ABFAfQeAgH4jcgIRy4gyxzkSzAZzjJlmCz4D+VMMih4TBzGWHJlJGRkZrp9S3QXBGwuTSyAOR6xtF8MGrBqAUDYMFbahYV5BTXlBV2o5E8YBYABBgAxQJ9mxTaZMQAAAAASUVORK5CYII=\"","export default \"data:image/svg+xml,%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3crect%20x='0'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3crect%20x='9'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0.2s'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3crect%20x='19'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0.4s'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3c/svg%3e\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8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iLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5FrZPxAAAA5UlEQVR42qzTvQ7BUBTA8UpEYraJWAwSNVgMHsDIZvUEngWDisTiBTyA4A3EJEiMYrBJGBBf/yO3UlVNq07y63Cbc3rvuaea9hkZ1LHAUZmrtYzmEhG0cMX9C3nXQdQpeeiSaDdSOa8wfCSbWmayjssPBSRHD/EoqzMtscEeN8SQQwVVhB361pRHDX1VYGf5whZjlJDHymEXclPaycN2e4hjYFs/eS0gJkiibVmT4z634bVxaxRQxBQzKdDw2X0Zpi7SSEiBbIBrTAUZJOOvoxz4Z7KGriZMBuuMg+p2U/XrLR4CDACHu7RW+98pzwAAAABJRU5ErkJggg==\"","export enum SelectionState {\n\tALL = 'all',\n\tSOME = 'some',\n\tNONE = 'none'\n}\n","import * as React from 'react';\n\nimport defaultIconFolderOpen from '../../../assets/img/icon_folder_open.png';\nimport defaultIconFolderClosed from '../../../assets/img/icon_folder_closed.png';\nimport defaultIconFolderLoading from '../../../assets/svg/icon_folder_loading.svg';\nimport defaultIconLeafNode from '../../../assets/img/icon_variablenode.png';\nimport {SelectionState} from '../constants';\nimport {Tree} from '../types';\n\ntype NodeImageProps = {\n\tnode: Tree;\n\tleafNode: boolean;\n\texpanded: boolean;\n\tisLoading: boolean;\n\tonExpand?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n};\n\ntype NodeInfoProps = {\n\tnode: Tree;\n\tdisplayName: string;\n\tleafNode: boolean;\n\texpanded: boolean;\n\tisLastChild?: boolean;\n\tselectionState: SelectionState;\n\tisLoading: boolean;\n\tonExpand: () => void;\n\tonSelect: (toggled: boolean) => void;\n};\n\nconst Skeleton = ({lastChild}: {lastChild: boolean}) => (\n\t<div className=\"skeleton\">\n\t\t<div className=\"skeleton-cell top\" />\n\t\t<div\n\t\t\tclassName=\"skeleton-cell bottom\"\n\t\t\tstyle={{\n\t\t\t\tvisibility: lastChild ? 'hidden' : 'initial'\n\t\t\t}}\n\t\t/>\n\t</div>\n);\n\nconst NodeImage = ({node, leafNode, expanded, isLoading, onExpand}: NodeImageProps) => {\n\tlet imageSrc;\n\n\tif (leafNode) {\n\t\timageSrc = node.image || defaultIconLeafNode;\n\t} else {\n\t\tif (isLoading) {\n\t\t\timageSrc = defaultIconFolderLoading;\n\t\t} else if (expanded) {\n\t\t\timageSrc = node.expandedImage || defaultIconFolderOpen;\n\t\t} else {\n\t\t\timageSrc = node.closedImage || defaultIconFolderClosed;\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className=\"icon-container\">\n\t\t\t<img src={imageSrc} alt=\"node\" onClick={onExpand} />\n\t\t</div>\n\t);\n};\n\nexport default class NodeInfo extends React.PureComponent<NodeInfoProps> {\n\tinputRef: HTMLInputElement | null | undefined;\n\n\tcomponentDidMount() {\n\t\tthis.updateSelectionState();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.updateSelectionState();\n\t}\n\n\tupdateSelectionState() {\n\t\tconst {selectionState} = this.props;\n\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.indeterminate = selectionState === SelectionState.SOME;\n\t\t}\n\t}\n\n\tonSelect = (event: React.SyntheticEvent<HTMLInputElement>): void => {\n\t\tconst {onSelect, selectionState} = this.props;\n\t\tonSelect(selectionState === SelectionState.SOME ? false : event.currentTarget.checked);\n\t};\n\n\tonLabelClick = (): void => {\n\t\tconst {onSelect, selectionState} = this.props;\n\t\tonSelect(selectionState === SelectionState.SOME ? false : this.inputRef ? !this.inputRef.checked : false);\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tnode,\n\t\t\tnode: {name},\n\t\t\tleafNode,\n\t\t\texpanded,\n\t\t\tisLastChild,\n\t\t\tonExpand,\n\t\t\tselectionState,\n\t\t\tisLoading\n\t\t} = this.props;\n\t\tconst selected = selectionState === SelectionState.ALL;\n\t\treturn (\n\t\t\t<div className={`node-info ${selected ? 'selected' : ''}`}>\n\t\t\t\t{isLastChild !== undefined && <Skeleton lastChild={isLastChild} />}\n\t\t\t\t<NodeImage\n\t\t\t\t\tnode={node}\n\t\t\t\t\tleafNode={leafNode}\n\t\t\t\t\texpanded={expanded}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tonExpand={onExpand}\n\t\t\t\t/>\n\t\t\t\t<input\n\t\t\t\t\tref={(ref) => {\n\t\t\t\t\t\tthis.inputRef = ref;\n\t\t\t\t\t}}\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tchecked={selectionState === SelectionState.ALL}\n\t\t\t\t\tonChange={this.onSelect}\n\t\t\t\t/>\n\t\t\t\t<div className=\"name\" onClick={this.onLabelClick}>\n\t\t\t\t\t{name}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\n\nimport NodeInfo from './NodeInfo';\nimport {SelectionState} from '../constants';\nimport {getAllLeafIds, getAllLeaves, intersectArrays} from '../treeutils';\nimport {NodeId, Tree} from '../types';\n\ntype Props = {\n\tselectedNodes: Array<NodeId>;\n\tnode: Tree;\n\tisLastChild?: boolean;\n\ttreeSize: number;\n\tselectNodes: (ids: Array<Tree>) => void;\n\tdeselectNodes: (ids: Array<Tree>) => void;\n\tlazyLoadingFunction: (node: Tree) => Promise<any>;\n};\n\ntype State = {\n\texpanded: boolean;\n\tselectionState: SelectionState;\n\tisLoading: boolean;\n};\n\nexport default class Node extends Component<Props, State> {\n\tstate: State = {\n\t\texpanded: false,\n\t\tselectionState: this.getSelectionState(),\n\t\tisLoading: false\n\t};\n\n\t/**\n\t * Update folder nodes only if the selection changed, or expanded changed\n\t * Update leaf nodes only if the previously selected nodes include this leaf and the currently\n\t * selected nodes do not include this leaf, and vice versa.\n\t * @param {Props} prevProps\n\t * @param {State} prevState\n\t */\n\tshouldComponentUpdate(prevProps: Props, prevState: State): boolean {\n\t\tconst {selectedNodes: prevSelectedNodes, treeSize: prevTreeSize} = prevProps;\n\t\tconst {expanded: prevExpanded, selectionState: prevSelectionState, isLoading: prevIsLoading} = prevState;\n\t\tconst {selectedNodes, node, treeSize} = this.props;\n\t\tconst {expanded, selectionState, isLoading} = this.state;\n\t\tif (prevIsLoading !== isLoading) return true;\n\t\tif (prevTreeSize !== treeSize) return true;\n\n\t\tif (this.isLeaf()) {\n\t\t\tconst selectionChangedForLeaf =\n\t\t\t\t(prevSelectedNodes.includes(node.id) && !selectedNodes.includes(node.id)) ||\n\t\t\t\t(!prevSelectedNodes.includes(node.id) && selectedNodes.includes(node.id));\n\t\t\treturn selectionChangedForLeaf || prevSelectionState !== selectionState;\n\t\t} else {\n\t\t\treturn (\n\t\t\t\tprevSelectedNodes.length !== selectedNodes.length ||\n\t\t\t\tprevExpanded !== expanded ||\n\t\t\t\tprevSelectionState !== selectionState\n\t\t\t);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setState({\n\t\t\tselectionState: this.getSelectionState()\n\t\t});\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.setState({\n\t\t\tselectionState: this.getSelectionState()\n\t\t});\n\t}\n\n\tisLeaf(): boolean {\n\t\tconst {node} = this.props;\n\t\treturn node.children === undefined;\n\t}\n\n\tgetSelectionState() {\n\t\tconst {node, selectedNodes} = this.props;\n\n\t\tif (this.isLeaf()) {\n\t\t\treturn selectedNodes.includes(node.id) ? SelectionState.ALL : SelectionState.NONE;\n\t\t} else {\n\t\t\tconst leafIds = getAllLeafIds(node);\n\t\t\tconst intersection = intersectArrays(leafIds, selectedNodes);\n\n\t\t\tif (intersection.length === leafIds.length && leafIds.length !== 0) {\n\t\t\t\treturn SelectionState.ALL;\n\t\t\t} else if (intersection.length === 0) {\n\t\t\t\treturn SelectionState.NONE;\n\t\t\t}\n\n\t\t\treturn SelectionState.SOME;\n\t\t}\n\t}\n\n\t// handle this the same way as selection?\n\ttoggleExpand: () => void = () => {\n\t\tconst {node, lazyLoadingFunction} = this.props;\n\n\t\tif (node.lazyLoadable) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tisLoading: true\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tlazyLoadingFunction(node).then(() =>\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\texpanded: true,\n\t\t\t\t\t\t\tisLoading: false\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\texpanded: !this.state.expanded\n\t\t\t});\n\t\t}\n\t};\n\tonSelect: (toggled: boolean) => void = (toggled: boolean) => {\n\t\tconst {node, selectNodes, deselectNodes, selectedNodes} = this.props;\n\n\t\tif (toggled) {\n\t\t\tconst childNodes = getAllLeaves(node).filter((node) => !selectedNodes.includes(node.id));\n\t\t\tselectNodes(childNodes);\n\t\t} else {\n\t\t\tconst childNodes = getAllLeaves(node).filter((node) => selectedNodes.includes(node.id));\n\t\t\tdeselectNodes(childNodes);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {node, isLastChild, ...commonNodeProps} = this.props;\n\t\tconst {expanded, selectionState, isLoading} = this.state;\n\t\treturn (\n\t\t\t<div className=\"node\">\n\t\t\t\t<NodeInfo\n\t\t\t\t\tnode={node}\n\t\t\t\t\tdisplayName={node.name}\n\t\t\t\t\tleafNode={this.isLeaf()}\n\t\t\t\t\texpanded={expanded}\n\t\t\t\t\tisLastChild={isLastChild}\n\t\t\t\t\tonExpand={this.toggleExpand}\n\t\t\t\t\tonSelect={this.onSelect}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tselectionState={selectionState}\n\t\t\t\t/>\n\t\t\t\t{expanded &&\n\t\t\t\t\tnode.children &&\n\t\t\t\t\tnode.children.map((childNode, i) => (\n\t\t\t\t\t\t<Node\n\t\t\t\t\t\t\t{...commonNodeProps}\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tnode={childNode}\n\t\t\t\t\t\t\tisLastChild={i === (node.children || []).length - 1}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\n\nimport {Tree, NodeId, DataSetConfig, SelectionItem} from './types';\nimport Node from './components/Node';\nimport {convertToTree, mergeNodeIdArrays, removeNodeIds, getTreeSize, findNodeAndApplyPatch} from './treeutils';\n\nexport type Props = {\n\t/** Configuration of keys for id, name, children, node/leaf images and lazy loading */\n\tdataSetConfig: DataSetConfig;\n\n\t/** Function executed when selecting nodes or folders */\n\tonSelect: (arg0: Array<SelectionItem>) => void;\n\n\t/** Function executed when deselecting nodes or folders */\n\tonDeselect: (arg0: Array<SelectionItem>) => void;\n\n\t/** Arbitrary hierarchical initial data set to render */\n\ttreeData: Array<any>;\n\n\t/** Array of initially selected nodes in the tree */\n\tselectedNodes?: Array<NodeId>;\n\n\t/** Function to execute on a lazy loadable node */\n\tlazyLoadingFunction?: (nodeData: any) => Promise<any>;\n};\n\ntype State = {\n\ttree: Tree;\n\ttreeData: Array<any>;\n\tselectedNodes: Array<NodeId>;\n\ttreeSize: number;\n};\n\n/**\n * TreeView adds the functionality to display \"folders\" and their content.\n * This can come in handy for several data structures.\n */\nexport default class TreeView extends Component<Props, State> {\n\tstate: State = {\n\t\ttreeData: this.props.treeData,\n\t\ttree: {\n\t\t\tid: 'virtualRootNode',\n\t\t\tname: '',\n\t\t\tchildren: [],\n\t\t\tpath: '/',\n\t\t\toriginalNode: {}\n\t\t},\n\t\ttreeSize: 0,\n\t\tselectedNodes: this.props.selectedNodes || []\n\t};\n\n\tconvert: (hierarchicalData: Array<any>, nodePath?: string) => Array<Tree> = convertToTree(this.props.dataSetConfig);\n\n\tcomponentDidMount() {\n\t\tconst {treeData} = this.props;\n\t\tconst tree = this.initTree(treeData);\n\t\tconst treeSize = getTreeSize(tree);\n\t\tthis.setState({\n\t\t\ttree,\n\t\t\ttreeSize\n\t\t});\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tconst {selectedNodes: prevNodes} = prevProps;\n\t\tconst {selectedNodes} = this.props;\n\n\t\tif (selectedNodes && prevNodes && prevNodes.length !== selectedNodes.length) {\n\t\t\tthis.setState({\n\t\t\t\tselectedNodes\n\t\t\t});\n\t\t}\n\t}\n\n\tinitTree(treeData: Array<any>): {\n\t\tchildren?: Array<Tree>;\n\t\tclosedImage?: string;\n\t\texpandedImage?: string;\n\t\tid: string;\n\t\timage?: string;\n\t\tlazyLoadable?: boolean;\n\t\tname: string;\n\t\toriginalNode: any;\n\t\tpath: string;\n\t} {\n\t\treturn {\n\t\t\tid: 'virtualRootNode',\n\t\t\tname: '',\n\t\t\tchildren: this.convert(treeData),\n\t\t\tpath: '/',\n\t\t\toriginalNode: {}\n\t\t};\n\t}\n\n\tselectNodes: (nodes: Array<Tree>) => void = (nodes: Array<Tree>) => {\n\t\tconst {onSelect} = this.props;\n\t\tconst {selectedNodes} = this.state;\n\t\tthis.setState({\n\t\t\tselectedNodes: mergeNodeIdArrays(\n\t\t\t\tselectedNodes,\n\t\t\t\tnodes.map(({id}) => id)\n\t\t\t)\n\t\t});\n\t\tonSelect(nodes.map(({originalNode, path}) => ({...originalNode, $$path: path})));\n\t};\n\n\tdeselectNodes: (nodes: Array<Tree>) => void = (nodes: Array<Tree>) => {\n\t\tconst {onDeselect} = this.props;\n\t\tconst {selectedNodes} = this.state;\n\t\tthis.setState({\n\t\t\tselectedNodes: removeNodeIds(\n\t\t\t\tselectedNodes,\n\t\t\t\tnodes.map(({id}) => id)\n\t\t\t)\n\t\t});\n\t\tonDeselect(nodes.map(({originalNode, path}) => ({...originalNode, $$path: path})));\n\t};\n\n\taddTreeData = (dataSet: Array<any>, underNode: Tree) => {\n\t\tconst {tree} = this.state;\n\t\tconst subTree = this.convert(dataSet, underNode.path);\n\t\tconst newTree = {\n\t\t\tid: 'virtualRootNode',\n\t\t\tname: '',\n\t\t\tchildren: (tree.children || []).map((rootNode) =>\n\t\t\t\tfindNodeAndApplyPatch(rootNode, underNode.id, {\n\t\t\t\t\tlazyLoadable: false,\n\t\t\t\t\tchildren: subTree\n\t\t\t\t})\n\t\t\t),\n\t\t\tpath: '/',\n\t\t\toriginalNode: {}\n\t\t};\n\t\tconst newTreeSize = getTreeSize(newTree);\n\t\tthis.setState({\n\t\t\ttree: newTree,\n\t\t\ttreeSize: newTreeSize\n\t\t});\n\t};\n\n\tlazyLoadingFunction: (node: Tree) => Promise<void> = (node: Tree): Promise<void> => {\n\t\tconst {lazyLoadingFunction} = this.props;\n\t\tif (!lazyLoadingFunction) return Promise.resolve();\n\t\treturn lazyLoadingFunction(node.originalNode)\n\t\t\t.then((dataSet) => {\n\t\t\t\tthis.addTreeData(dataSet, node);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\treturn Promise.resolve();\n\t\t\t});\n\t};\n\n\trender() {\n\t\tconst {tree, selectedNodes, treeSize} = this.state;\n\t\treturn (\n\t\t\t<div className=\"treeview\">\n\t\t\t\t{tree.children &&\n\t\t\t\t\ttree.children.map((item, i) => (\n\t\t\t\t\t\t<Node\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tnode={item}\n\t\t\t\t\t\t\tselectedNodes={selectedNodes}\n\t\t\t\t\t\t\tselectNodes={this.selectNodes}\n\t\t\t\t\t\t\tdeselectNodes={this.deselectNodes}\n\t\t\t\t\t\t\ttreeSize={treeSize}\n\t\t\t\t\t\t\tlazyLoadingFunction={this.lazyLoadingFunction}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","export default \"data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3ccircle%20cx='7.5'%20cy='3.5'%20r='1.5'/%3e%3ccircle%20cx='7.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20cx='7.5'%20cy='11.5'%20r='1.5'/%3e%3c/svg%3e\"","import * as React from 'react';\n\ntype ContextType = {\n\ttoggleMenu: () => void;\n};\n\nconst MultiMenuContext: React.Context<ContextType> = React.createContext<ContextType>({\n\ttoggleMenu: () => {}\n});\n\nexport default MultiMenuContext;\n","import {ReactNode, useState} from 'react';\nimport {Placement, Popup} from '@deviceinsight/ng-ui-basic-components';\n\nimport Context from './components/MultiMenuContext';\n\nexport type Props = {\n\t/** Enabler for the Multimenu */\n\tmenuButton: ReactNode;\n\n\t/** (Optional) if set, sets the direction in which the MultiMenu should open */\n\tdirection?: Placement;\n\n\t/** Should contain several <MultiMenuItem/> elements */\n\tchildren?: ReactNode;\n\n\t/** (Optional) sets additional (css) classes */\n\tclassName?: string;\n\n\t/** (Optional) if set, controls the open state of the MultiMenu */\n\topen?: boolean;\n\n\t/** (Optional) if set, is called when the open state of the MultiMenu changes */\n\tonOpenChange?: (open: boolean) => void;\n};\n\n/**\n * MultiMenu enables a toggleable menu to either show more content and further functionality.\n */\nexport default function MultiMenuFunctional({menuButton, children, direction, className, open, onOpenChange}: Props) {\n\tconst [contentVisible, setContentVisible] = useState(false);\n\n\tconst toggleMenu = () => {\n\t\tsetContentVisible(!contentVisible);\n\t};\n\n\treturn (\n\t\t<span>\n\t\t\t<Popup\n\t\t\t\topen={open ?? contentVisible}\n\t\t\t\tonOpenChange={onOpenChange ?? setContentVisible}\n\t\t\t\thandler={menuButton}\n\t\t\t\tplacement={direction}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t<div className=\"di multimenu\">\n\t\t\t\t\t<div className={`drop ${direction ? direction : 'bottom'} ${contentVisible ? 'show' : ''}`}>\n\t\t\t\t\t\t<Context.Provider value={{toggleMenu}}>{children}</Context.Provider>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Popup>\n\t\t</span>\n\t);\n}\n","import * as React from 'react';\nimport {Trans} from '../../i18n';\nimport {debounce} from 'lodash';\n\nimport {Button} from '@deviceinsight/ng-ui-basic-components';\n\nimport iconSettings from '../../assets/svg/icon_menu_vertical.svg';\nimport MultiMenu from '../multiMenu/MultiMenu';\nimport {useEffect, useRef, useState} from 'react';\n\nexport type Props = {\n\t/** Current page */\n\tpage: number;\n\n\t/** Total number of pages */\n\ttotalPages: number;\n\n\t/** Function, executed when the current page changes */\n\tonChangePage: (page: number) => void;\n\n\t/** (Optional) Function, executed when the number of elements per page changes */\n\tonChangeSize?: (size: number) => void;\n\n\t/** (Optional) Number of elements per page*/\n\tsize?: number;\n};\n\nconst sizeOptions = [5, 10, 15, 20, 50];\n\n/**\n * Pagination enables a convenient way to display and navigate through a paginated search result\n */\nexport default function Pagination({onChangePage, page, totalPages, onChangeSize, size}: Props) {\n\tconst changePageDebouncedRef = useRef<typeof onChangePage | null>(null);\n\tconst {current: changePageDebounced} = changePageDebouncedRef;\n\tconst [pageRaw, setPageRaw] = useState(`${page + 1}`);\n\tconst [menuOpen, setMenuOpen] = useState(false);\n\n\tuseEffect(() => {\n\t\tchangePageDebouncedRef.current = debounce(onChangePage, 500);\n\t}, [onChangePage]);\n\n\tuseEffect(() => {\n\t\t \n\t\tsetPageRaw(`${page + 1}`);\n\t}, [page]);\n\n\tfunction goToFirstPage() {\n\t\tonChangePage(0);\n\t}\n\n\tfunction goToPrevPage() {\n\t\tif (page > 0) {\n\t\t\tonChangePage(page - 1);\n\t\t}\n\t}\n\n\tfunction goToNextPage() {\n\t\tif (page < totalPages - 1) {\n\t\t\tonChangePage(page + 1);\n\t\t}\n\t}\n\n\tfunction goToLastPage() {\n\t\tonChangePage(totalPages - 1);\n\t}\n\n\tfunction handleChangeSize(event: React.ChangeEvent<HTMLSelectElement>) {\n\t\tif (onChangeSize) {\n\t\t\tconst newSize = parseInt(event.target.value, 10);\n\t\t\tonChangeSize(newSize);\n\t\t\tsetMenuOpen(false);\n\t\t}\n\t}\n\n\tfunction handlePageInputChange(event: React.ChangeEvent<HTMLInputElement>) {\n\t\tconst rawValue = event.target.value;\n\t\tif (rawValue.trim() === '') {\n\t\t\tsetPageRaw(rawValue);\n\t\t\treturn;\n\t\t}\n\t\tconst parsedPage = Number(event.target.value);\n\t\tif (!Number.isNaN(parsedPage) && parsedPage >= 1 && parsedPage <= totalPages) {\n\t\t\tchangePageDebounced?.(parsedPage - 1);\n\t\t\tsetPageRaw(rawValue);\n\t\t}\n\t}\n\n\tfunction handlePageInputBlur() {\n\t\tsetPageRaw(`${page + 1}`);\n\t}\n\n\tconst isLastPage = page >= totalPages - 1;\n\treturn (\n\t\t<div className=\"di pagination-holder\">\n\t\t\t<div className=\"di pagination\">\n\t\t\t\t<span className={`prev ${page === 0 ? 'disabled' : ''}`} onClick={goToFirstPage}>\n\t\t\t\t\t«\n\t\t\t\t</span>\n\t\t\t\t<span className={`prev ${page === 0 ? 'disabled' : ''}`} onClick={goToPrevPage}>\n\t\t\t\t\t‹\n\t\t\t\t</span>\n\t\t\t\t<span className=\"info\">\n\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.page\">Page</Trans>\n\t\t\t\t\t<input value={pageRaw} onChange={handlePageInputChange} onBlur={handlePageInputBlur} />\n\n\t\t\t\t\t{typeof process !== 'undefined' && process?.env?.STORYBOOK_MODE ? (\n\t\t\t\t\t\t<>of {totalPages}</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.ofTotal\"> of {{totalPages}}</Trans>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t\t<span className={`next ${isLastPage ? 'disabled' : ''}`} onClick={goToNextPage}>\n\t\t\t\t\t›\n\t\t\t\t</span>\n\t\t\t\t<span className={`next ${isLastPage ? 'disabled' : ''}`} onClick={goToLastPage}>\n\t\t\t\t\t»\n\t\t\t\t</span>\n\t\t\t\t{onChangeSize && (\n\t\t\t\t\t<div className=\"options\">\n\t\t\t\t\t\t<MultiMenu\n\t\t\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\t\t\topen={menuOpen}\n\t\t\t\t\t\t\tonOpenChange={setMenuOpen}\n\t\t\t\t\t\t\tmenuButton={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tnaked\n\t\t\t\t\t\t\t\t\ttitle={{\n\t\t\t\t\t\t\t\t\t\tid: 'trend.settings.buttonTitle',\n\t\t\t\t\t\t\t\t\t\tdefaultValue: 'Settings'\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<img src={iconSettings} alt=\"settings icon\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"di form\"\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\twidth: 200,\n\t\t\t\t\t\t\t\t\tpadding: 10\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"field\">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.entriesPerPage\">Entries per page</Trans>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<select onChange={handleChangeSize} value={size}>\n\t\t\t\t\t\t\t\t\t\t{sizeOptions.map((sizeOption) => (\n\t\t\t\t\t\t\t\t\t\t\t<option key={sizeOption} value={sizeOption}>\n\t\t\t\t\t\t\t\t\t\t\t\t{sizeOption}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.pagination.changePageWillBeStored\">\n\t\t\t\t\t\t\t\t\t\tYour changes will be stored for view.\n\t\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</MultiMenu>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import {createRef, Component} from 'react';\nimport Select from 'react-select';\nimport {orderBy, isEqual} from 'lodash';\n\nimport './react-select.css';\nimport './react-select-custom.css';\n\nexport type Item = {\n\ttype: 'item';\n\tvalue: string;\n\tlabel: string;\n};\n\nexport type Group = {\n\ttype: 'group';\n\tlabel: string;\n\toptions: Array<Item>;\n};\n\nexport type Props = {\n\t/** Flag to preselect the status of the checkbox */\n\tvalue: Item | null | undefined;\n\n\t/** Function, executed when selecting value */\n\tonChange: (arg0: Item | null | undefined) => void;\n\n\t/** Array of select options values */\n\toptions: Array<Item> | Array<Group>;\n\n\t/** Array of special select options values */\n\tspecialOptions?: Array<Item> | null | undefined;\n\n\t/** Message displayed when no results found by search feature */\n\tnoResultsMessage?: string;\n\n\t/** Placeholder */\n\tplaceholder?: string;\n\n\t/** Clearable */\n\tclearable?: boolean;\n\n\t/** Loading */\n\tloading?: boolean;\n\n\t/** Function comparing two options - used for sorting */\n\tcompareOptions?: (value1: Item, value2: Item) => number;\n\n\t/** (Optional) Whether the menu should use a portal, and where it should attach */\n\tmenuPortalTarget?: HTMLElement;\n\n\t/** (Optional) indicates if the component is disabled or not */\n\tdisabled?: boolean;\n\n\t/** Enables free-form input mode */\n\tfreeForm?: boolean;\n\n\t/** @ignore */\n\t'data-testid'?: string;\n};\n\ntype State = {\n\toptions: Array<Item> | Array<Group>;\n\tinputValue: string | null;\n};\n\nfunction getSortedOptions(\n\toptions: Array<Item> | Array<Group>,\n\tcompareOptions?: (value1: Item, value2: Item) => number\n): Array<Item> | Array<Group> {\n\tif (!compareOptions) {\n\t\t// @ts-ignore\n\t\treturn orderBy(options, 'label', 'asc');\n\t}\n\n\t// @ts-ignore\n\tif (options.every((option: any) => !option.options)) {\n\t\tconst singleOptions = options as Array<Item>;\n\t\treturn [...singleOptions].sort(compareOptions);\n\t}\n\n\t// @ts-ignore\n\tif (options.every((option) => option.options)) {\n\t\tconst groupOptions: Array<Group> = options as any;\n\t\treturn groupOptions.map<Group>((option) => ({...option, options: [...option.options].sort(compareOptions)}));\n\t}\n\n\tthrow new Error('Mixing groups with single options not allowed');\n}\n\n/**\n * SelectWithSearch enhances a native select list by applying a search functionality to it.\n * Additional entries can be added by setting and adjusting `specialOptions`\n */\nexport default class SelectWithSearch extends Component<Props, State> {\n\tstate: State = {\n\t\toptions: [] as Array<Item>,\n\t\tinputValue: null\n\t};\n\tselectRef: {\n\t\tcurrent: any | null;\n\t} = createRef<typeof Select>();\n\n\tportalRoot: HTMLElement | null = null;\n\n\tcomponentDidMount() {\n\t\tthis.updateOptions();\n\n\t\tif (this.props['data-testid'] && this.selectRef && this.selectRef.current) {\n\t\t\tthis.selectRef.current.controlRef.setAttribute('data-testid', this.props['data-testid']);\n\t\t}\n\n\t\tif (this.props.menuPortalTarget) {\n\t\t\tthis.portalRoot = document.createElement('div');\n\t\t\tconst classes = this.getContainerClasses();\n\t\t\tthis.portalRoot.classList.add(...classes);\n\t\t\tthis.props.menuPortalTarget.appendChild(this.portalRoot);\n\t\t}\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tif (!isEqual(prevProps.options, this.props.options) || prevProps.freeForm !== this.props.freeForm) {\n\t\t\tthis.updateOptions();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.props.menuPortalTarget && this.portalRoot) {\n\t\t\tthis.props.menuPortalTarget.removeChild(this.portalRoot);\n\t\t}\n\t}\n\n\tupdateOptions: () => void = () => {\n\t\tconst {options, specialOptions, compareOptions} = this.props;\n\t\tconst sortedOptions = getSortedOptions(options, compareOptions);\n\n\t\tif (specialOptions) {\n\t\t\tthis.setState({\n\t\t\t\t// @ts-ignore\n\t\t\t\toptions: [...sortedOptions, ...specialOptions]\n\t\t\t});\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\toptions: sortedOptions\n\t\t\t});\n\t\t}\n\t};\n\n\tfilterOption = (option: Item, inputValue: string): boolean => {\n\t\treturn option.label.toString().toLowerCase().startsWith(inputValue.toLowerCase());\n\t};\n\n\tgetContainerClasses = () => {\n\t\tconst {specialOptions} = this.props;\n\t\tif (specialOptions) {\n\t\t\treturn ['select-search-container', 'special'];\n\t\t}\n\t\treturn ['select-search-container'];\n\t};\n\n\trender() {\n\t\tconst {noResultsMessage, placeholder, value, onChange, clearable, loading, disabled} = this.props;\n\t\tconst {options} = this.state;\n\t\tconst dataTestId = this.props['data-testid'];\n\t\treturn (\n\t\t\t<Select\n\t\t\t\tref={this.selectRef}\n\t\t\t\tjoinValues\n\t\t\t\tname=\"form-field-name\"\n\t\t\t\tclassName={this.getContainerClasses().join(' ')}\n\t\t\t\tclassNamePrefix=\"select-search\"\n\t\t\t\tisClearable={clearable}\n\t\t\t\tnoOptionsMessage={noResultsMessage ? () => noResultsMessage : undefined}\n\t\t\t\toptions={options}\n\t\t\t\tvalue={value || null}\n\t\t\t\tonChange={onChange}\n\t\t\t\tonInputChange={(newValue) => {\n\t\t\t\t\tif (this.props.freeForm && newValue) {\n\t\t\t\t\t\tthis.setState({inputValue: newValue});\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\t// @ts-ignore\n\t\t\t\tfilterOption={this.filterOption}\n\t\t\t\tisLoading={loading}\n\t\t\t\tmenuPortalTarget={this.portalRoot}\n\t\t\t\tisDisabled={disabled}\n\t\t\t\tformatOptionLabel={\n\t\t\t\t\tdataTestId\n\t\t\t\t\t\t? (option: Item) => (\n\t\t\t\t\t\t\t\t<span data-testid={`${dataTestId}-option-${option.label}`}>{option.label}</span>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tif (this.props.freeForm && this.state.inputValue !== null) {\n\t\t\t\t\t\tthis.setState({options: this.props.options});\n\t\t\t\t\t\tthis.setState({inputValue: this.state.inputValue}, () => {\n\t\t\t\t\t\t\tconst newItem: Item = {\n\t\t\t\t\t\t\t\ttype: 'item',\n\t\t\t\t\t\t\t\tvalue: this.state.inputValue!,\n\t\t\t\t\t\t\t\tlabel: this.state.inputValue!\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t\t(prevState) =>\n\t\t\t\t\t\t\t\t\t({\n\t\t\t\t\t\t\t\t\t\toptions: [newItem, ...prevState.options]\n\t\t\t\t\t\t\t\t\t}) as Pick<State, 'options'>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthis.state.inputValue = null;\n\t\t\t\t\t\t\tonChange(newItem);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n}\n","import {useState} from 'react';\nimport * as React from 'react';\nimport {useTranslation} from '../../../i18n';\nimport {ReactableColumnDef} from '../types';\n\ntype Props = {\n\tcolumnDef: ReactableColumnDef<any>;\n\tchangeFilter: (columnName: string, value: any) => void;\n\t'data-testid'?: string;\n};\n\nconst getInitialValueFromColumnDef = (columnDef: ReactableColumnDef<any>) => {\n\treturn columnDef.filterable?.initialValue ?? '';\n};\n\nconst ReactableTextFilter: React.FC<Props> = ({columnDef, changeFilter, 'data-testid': testId}) => {\n\tconst {t} = useTranslation();\n\n\tconst [value, setValue] = useState(getInitialValueFromColumnDef(columnDef));\n\n\tconst handleChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n\t\tconst newValue = (event.target as HTMLInputElement).value;\n\t\tsetValue(newValue);\n\t\tchangeFilter(columnDef.name, newValue);\n\t};\n\n\treturn (\n\t\t<input\n\t\t\ttype=\"text\"\n\t\t\tplaceholder={t(`${columnDef.filterable?.placeholder ?? 'reactable.filter.placeholder'}`, {\n\t\t\t\tdefaultValue: 'Filter...'\n\t\t\t})}\n\t\t\tonChange={handleChange}\n\t\t\tvalue={value}\n\t\t\tdata-testid={testId}\n\t\t/>\n\t);\n};\n\nexport default ReactableTextFilter;\n","import {Checkbox} from '@deviceinsight/ng-ui-basic-components';\n\nimport {Pageable, Sort, PaginationSettings} from '../../../types/pagination';\nimport {ReactableColumnDef, ReactableFilterSettings} from '../types';\n\nexport function makePageable<T>(\n\titems: Array<T> | null | undefined,\n\tpaginationSettings: PaginationSettings,\n\tcustomSortFunction:\n\t\t| ((items: Array<T>, sort: Sort, defaultSortItems: (items: Array<T>, sort: Sort) => Array<T>) => Array<T>)\n\t\t| null\n\t\t| undefined\n): Pageable<T> | null | undefined {\n\tif (!items) {\n\t\treturn null;\n\t}\n\n\tconst {page, size, sort} = paginationSettings;\n\tconst sortedItems = customSortFunction ? customSortFunction(items, sort, sortItems) : sortItems(items, sort);\n\treturn {\n\t\tcontent: sortedItems.slice(page * size, (page + 1) * size),\n\t\ttotalElements: items.length,\n\t\ttotalPages: Math.ceil(items.length / size),\n\t\tnumber: page,\n\t\tsize,\n\t\tsort: [sort]\n\t};\n}\n\nconst getDefaultFilterFn = (filterType: string, fieldName: string) => {\n\tif (filterType === 'text') {\n\t\treturn (item: any, filterValue: string) =>\n\t\t\titem[fieldName] && item[fieldName].toString().toLowerCase().includes(filterValue.toLowerCase());\n\t} else {\n\t\treturn (item: any, filterValue: string) => item[fieldName] === filterValue;\n\t}\n};\n\nexport function filterItems<T>(\n\titems: Array<T> | null | undefined,\n\tcolumnDefs: Array<ReactableColumnDef<any>>,\n\tfilterSettings: ReactableFilterSettings\n): Array<T> | null | undefined {\n\tif (items) {\n\t\treturn items.filter((item) => {\n\t\t\treturn Object.keys(filterSettings).every((columnName) => {\n\t\t\t\tconst filterValue = filterSettings[columnName];\n\n\t\t\t\tif (filterValue && filterValue.length > 0) {\n\t\t\t\t\tconst columnDef = findColumnDefByName(columnName, columnDefs);\n\n\t\t\t\t\tif (columnDef.filterable) {\n\t\t\t\t\t\tconst filterFn =\n\t\t\t\t\t\t\tcolumnDef.filterable.filterFn ||\n\t\t\t\t\t\t\tgetDefaultFilterFn(columnDef.filterable.filterType, columnDef.name);\n\t\t\t\t\t\treturn filterFn(item as any, filterValue);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t});\n\t\t});\n\t}\n\n\treturn null;\n}\n\nfunction findColumnDefByName(columnName: string, columnDefs: Array<ReactableColumnDef<any>>): ReactableColumnDef<any> {\n\tconst columnDef = columnDefs.find((cd) => cd.name === columnName);\n\n\tif (!columnDef) {\n\t\tthrow Error(`column definition not found for ${columnName}`);\n\t}\n\n\treturn columnDef;\n}\n\nexport function sortItems<T>(items: Array<T>, sort: Sort): Array<T> {\n\treturn items.sort((itemA: T, itemB: T) => {\n\t\tconst a = (typeof itemA === 'object' && (itemA as Record<string, unknown>)?.[sort.property]) || 0;\n\t\tconst b = (typeof itemB === 'object' && (itemB as Record<string, unknown>)?.[sort.property]) || 0;\n\t\tconst reverseFactor = sort.direction === 'ASC' ? 1 : -1;\n\n\t\tif (a === b) {\n\t\t\treturn 0;\n\t\t} else if (typeof a === 'string' && typeof b === 'string') {\n\t\t\treturn a.localeCompare(b) * reverseFactor;\n\t\t} else if (typeof a === 'number' && typeof b === 'number') {\n\t\t\treturn (a - b) * reverseFactor;\n\t\t} else {\n\t\t\treturn a.toString().localeCompare(b.toString()) * reverseFactor;\n\t\t}\n\t});\n}\n\nexport function extendColumnDefsWithCheckboxes<T>(\n\tcolumnDefs: Array<ReactableColumnDef<T>>,\n\tonSelectChange: (selected: boolean, item: T) => void,\n\tonSelectAllChange: (selected: boolean) => void,\n\tselectedAll: boolean,\n\tselectedItems: Array<any>,\n\tuniqueItemKey: (arg0: T) => any\n): Array<ReactableColumnDef<T>> {\n\treturn [\n\t\t{\n\t\t\tname: 'checkbox',\n\t\t\tlabel: (\n\t\t\t\t<Checkbox\n\t\t\t\t\tvalue={selectedAll}\n\t\t\t\t\tonChange={onSelectAllChange}\n\t\t\t\t\ttitle={{\n\t\t\t\t\t\tid: 'components.filtertable.selectAllItems',\n\t\t\t\t\t\tdefaultValue: 'Select/deselect all items in search result'\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t),\n\t\t\tsortable: false,\n\t\t\trender: (item: T) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tvalue={selectedItems.includes(uniqueItemKey(item))}\n\t\t\t\t\t\tonChange={(selected) => onSelectChange(selected, item)}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t},\n\t\t\twidth: '1%'\n\t\t},\n\t\t...columnDefs\n\t];\n}\n\nexport function getClassName(tableName: string | undefined, columnName: string): string {\n\treturn `${tableName || 'unnamedTable'}-${columnName}`;\n}\n","import * as React from 'react';\nimport {useEffect, useRef, useState} from 'react';\nimport {useTranslation} from '../../../i18n';\nimport SelectWithSearch from '../../input/SelectWithSearch';\nimport {ReactableColumnDef, ReactableFilterSettings} from '../types';\nimport ReactableTextFilter from './ReactableTextFilter';\nimport {getClassName} from './helper';\n\ntype Props = {\n\tcolumnDefs: Array<ReactableColumnDef<any>>;\n\tonFilter: (filterColumns: ReactableFilterSettings) => void;\n\ttableName?: string;\n\t'data-testid'?: string;\n};\nconst ReactableTableFilterRow: React.FC<Props> = ({columnDefs, onFilter, tableName, 'data-testid': testId}) => {\n\tconst {t} = useTranslation();\n\n\tconst [state, setState] = useState<Record<string, string>>({});\n\tconst onFilterRef = useRef(onFilter);\n\n\tuseEffect(() => {\n\t\tonFilterRef.current = onFilter;\n\t}, [onFilter]);\n\n\tuseEffect(() => {\n\t\tsetState((prev) => {\n\t\t\tconst merged: Record<string, string> = {};\n\t\t\tfor (const cd of columnDefs) {\n\t\t\t\tmerged[cd.name] = prev[cd.name] !== undefined ? prev[cd.name] : (cd.filterable?.initialValue ?? '');\n\t\t\t}\n\n\t\t\tconst prevKeys = Object.keys(prev);\n\t\t\tconst mergedKeys = Object.keys(merged);\n\t\t\tconst sameKeys = mergedKeys.length === prevKeys.length && mergedKeys.every((k) => prevKeys.includes(k));\n\t\t\tconst sameValues = sameKeys && mergedKeys.every((k) => merged[k] === prev[k]);\n\n\t\t\tif (sameKeys && sameValues) {\n\t\t\t\treturn prev; // no change\n\t\t\t}\n\n\t\t\tif (Object.values(merged).some((v) => v)) {\n\t\t\t\tonFilterRef.current(merged);\n\t\t\t}\n\n\t\t\treturn merged;\n\t\t});\n\t}, [columnDefs]);\n\n\tconst changeFilter = (columnName: string, value: any) => {\n\t\tconst newState = {...state, [columnName]: value};\n\t\tsetState(newState);\n\t\tonFilter(newState);\n\t};\n\n\tconst getFilterByColumnDef = (columnDef: ReactableColumnDef<any>): React.ReactElement<any> | null => {\n\t\tif (columnDef.filterable) {\n\t\t\tswitch (columnDef.filterable.filterType) {\n\t\t\t\tcase 'text':\n\t\t\t\t\treturn textFilter(columnDef);\n\n\t\t\t\tcase 'options':\n\t\t\t\t\treturn optionsFilter(columnDef);\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Filter type ${columnDef.filterable.filterType} not supported`);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst getFilterTestId = (columnDef: ReactableColumnDef<any>): string | undefined => {\n\t\treturn testId ? `${testId}-filter-${columnDef.name}` : undefined;\n\t};\n\n\tconst textFilter = (columnDef: ReactableColumnDef<any>): React.ReactElement => {\n\t\treturn (\n\t\t\t<ReactableTextFilter\n\t\t\t\tcolumnDef={columnDef}\n\t\t\t\tchangeFilter={changeFilter}\n\t\t\t\tdata-testid={getFilterTestId(columnDef)}\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst optionsFilter = (columnDef: ReactableColumnDef<any>): React.ReactElement => {\n\t\tif (!columnDef.filterable?.filterOptions) {\n\t\t\tthrow new Error(`No filterOptions found for column type: options on columnDef: ${columnDef.name}`);\n\t\t}\n\n\t\tconst filterOptions = columnDef.filterable.filterOptions;\n\t\tif (columnDef.filterable.searchableOptions) {\n\t\t\tconst searchableOptions = filterOptions.map((option) => ({\n\t\t\t\ttype: 'item' as const,\n\t\t\t\tlabel:\n\t\t\t\t\ttypeof option.label === 'string'\n\t\t\t\t\t\t? option.label\n\t\t\t\t\t\t: t(option.label.id, {defaultValue: option.label.defaultValue}),\n\t\t\t\tvalue: option.value\n\t\t\t}));\n\t\t\tconst value = state[columnDef.name];\n\n\t\t\treturn (\n\t\t\t\t<SelectWithSearch\n\t\t\t\t\toptions={searchableOptions}\n\t\t\t\t\tonChange={(item) => {\n\t\t\t\t\t\tchangeFilter(columnDef.name, item?.value);\n\t\t\t\t\t}}\n\t\t\t\t\tvalue={value ? searchableOptions.find((opt) => opt.value === value.toString()) : null}\n\t\t\t\t\tclearable\n\t\t\t\t\tdata-testid={getFilterTestId(columnDef)}\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<select\n\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLSelectElement>) => {\n\t\t\t\t\t\tchangeFilter(columnDef.name, event.target.value);\n\t\t\t\t\t}}\n\t\t\t\t\tvalue={state[columnDef.name]}\n\t\t\t\t\tdata-testid={getFilterTestId(columnDef)}\n\t\t\t\t>\n\t\t\t\t\t<option key=\"\" value=\"\">\n\t\t\t\t\t\t{t('reactable.filter.all', {\n\t\t\t\t\t\t\tdefaultValue: '- All -'\n\t\t\t\t\t\t})}\n\t\t\t\t\t</option>\n\t\t\t\t\t{filterOptions.map((option) => (\n\t\t\t\t\t\t<option\n\t\t\t\t\t\t\tclassName={getClassName(tableName, columnDef.name)}\n\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\tvalue={option.value}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{typeof option.label === 'string'\n\t\t\t\t\t\t\t\t? option.label\n\t\t\t\t\t\t\t\t: t(option.label.id, {defaultValue: option.label.defaultValue})}\n\t\t\t\t\t\t</option>\n\t\t\t\t\t))}\n\t\t\t\t</select>\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<tr className=\"di filterrow form\">\n\t\t\t{columnDefs.map((columnDef) => (\n\t\t\t\t<td\n\t\t\t\t\tkey={columnDef.name}\n\t\t\t\t\tclassName={getClassName(tableName, columnDef.name)}\n\t\t\t\t\tstyle={{textAlign: columnDef.align || 'left'}}\n\t\t\t\t>\n\t\t\t\t\t{getFilterByColumnDef(columnDef)}\n\t\t\t\t</td>\n\t\t\t))}\n\t\t</tr>\n\t);\n};\n\nexport default ReactableTableFilterRow;\n","import {Component} from 'react';\nimport {Trans} from '../../../i18n';\n\nimport {ReactableColumnDef, ReactableColumnLabel} from '../types';\nimport {PaginationSettings, SortDirection} from '../../../types/pagination';\nimport {getClassName} from './helper';\nimport {TranslationDescriptor} from '../../../types/i18n';\n\nconst toggleSortDirection = (direction: SortDirection): SortDirection => (direction === 'ASC' ? 'DESC' : 'ASC');\n\ntype Props = {\n\tcolumnDefs: Array<ReactableColumnDef<any>>;\n\tpaginationSettings: PaginationSettings;\n\tonSort: (property: string, direction: SortDirection) => void;\n\ttableName?: string;\n};\n\nexport default class ReactableTableHeader extends Component<Props> {\n\thandleSort: (columnDef: ReactableColumnDef<unknown>) => void = (columnDef: ReactableColumnDef<any>) => {\n\t\tconst {paginationSettings, onSort} = this.props;\n\t\tconst direction =\n\t\t\tcolumnDef.name === paginationSettings.sort.property\n\t\t\t\t? toggleSortDirection(paginationSettings.sort.direction)\n\t\t\t\t: columnDef.defaultSortDirection || 'ASC';\n\t\tonSort(columnDef.name, direction);\n\t};\n\n\tgetClassName = (columnDef: ReactableColumnDef<any>) => {\n\t\tconst {paginationSettings, tableName} = this.props;\n\t\tconst className = getClassName(tableName, columnDef.name);\n\n\t\tif (columnDef.sortable) {\n\t\t\tif (columnDef.name === paginationSettings.sort.property) {\n\t\t\t\tif (paginationSettings.sort.direction === 'ASC') {\n\t\t\t\t\treturn `${className} sortable sortAsc`;\n\t\t\t\t} else {\n\t\t\t\t\treturn `${className} sortable sortDes`;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn `${className} sortable`;\n\t\t\t}\n\t\t} else {\n\t\t\treturn `${className}`;\n\t\t}\n\t};\n\n\tprintLabel = (label: ReactableColumnLabel) => {\n\t\tif (isTranslationDescriptor(label)) {\n\t\t\treturn <Trans i18nKey={label.id}>{label.defaultValue}</Trans>;\n\t\t}\n\n\t\treturn label;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<tr>\n\t\t\t\t{this.props.columnDefs.map((columnDef) => (\n\t\t\t\t\t<th\n\t\t\t\t\t\tkey={columnDef.name}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\twidth: columnDef.width || 'auto',\n\t\t\t\t\t\t\ttextAlign: columnDef.align || 'left'\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName={this.getClassName(columnDef)}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tif (columnDef.sortable) {\n\t\t\t\t\t\t\t\tthis.handleSort(columnDef);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.printLabel(columnDef.label)}\n\t\t\t\t\t</th>\n\t\t\t\t))}\n\t\t\t</tr>\n\t\t);\n\t}\n}\n\nfunction isTranslationDescriptor(label: unknown): label is TranslationDescriptor {\n\treturn typeof label === 'object' && label != null && 'id' in label && label.id !== undefined;\n}\n","import {Component} from 'react';\n\nimport {ReactableColumnDef, ReactableRowDef} from '../types';\nimport {getClassName} from './helper';\n\ntype Props<T> = {\n\tcolumnDefs: Array<ReactableColumnDef<T>>;\n\titem: T;\n\trowDef: ReactableRowDef<T> | null | undefined;\n\ttableName?: string;\n};\n\nexport default class ReactableTableRow extends Component<Props<any>> {\n\tgetRowClass = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && typeof rowDef.getRowClass === 'function') {\n\t\t\treturn rowDef.getRowClass(item);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t};\n\n\thandleClick = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && typeof rowDef.onClick === 'function') {\n\t\t\trowDef.onClick(item);\n\t\t}\n\t};\n\n\tgetTooltip = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && typeof rowDef.getTooltip === 'function') {\n\t\t\treturn rowDef.getTooltip(item);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t};\n\n\tgetRowStyle = () => {\n\t\tconst {rowDef, item} = this.props;\n\n\t\tif (rowDef && rowDef.getRowStyle) {\n\t\t\treturn rowDef.getRowStyle(item);\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {columnDefs, item, tableName} = this.props;\n\t\treturn (\n\t\t\t<tr\n\t\t\t\tclassName={this.getRowClass()}\n\t\t\t\tonClick={this.handleClick}\n\t\t\t\ttitle={this.getTooltip()}\n\t\t\t\tstyle={this.getRowStyle()}\n\t\t\t>\n\t\t\t\t{columnDefs.map((columnDef) => {\n\t\t\t\t\tconst textAlign = columnDef.align || 'left';\n\t\t\t\t\tconst cursor = columnDef.onClick ? 'pointer' : 'inherit';\n\t\t\t\t\tconst whiteSpace = columnDef.whiteSpace || undefined;\n\t\t\t\t\tconst onClick = columnDef.onClick\n\t\t\t\t\t\t? () => (columnDef.onClick ? columnDef.onClick(item) : undefined)\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<td\n\t\t\t\t\t\t\tkey={`${item.id}_${columnDef.name}`}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\ttextAlign,\n\t\t\t\t\t\t\t\tcursor,\n\t\t\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t\t\twhiteSpace\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t\t\tclassName={getClassName(tableName, columnDef.name)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{columnDef.render(item)}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</tr>\n\t\t);\n\t}\n}\n","import cx from 'classnames';\nimport {useEffect, useRef, useState} from 'react';\nimport {Trans} from '../../../i18n';\n\nimport {readAccountObject, writeAccountObject} from '@deviceinsight/ng-ui-api-client';\nimport {Button, Modal, SpinnerContainer} from '@deviceinsight/ng-ui-basic-components';\nimport {Pageable, PaginationSettings, SortDirection} from '../../../types/pagination';\nimport {ReactableColumnDef, ReactableFilterSettings, ReactableRowDef} from '../types';\nimport ReactableTableFilterRow from './ReactableTableFilterRow';\nimport ReactableTableHeader from './ReactableTableHeader';\nimport ReactableTableRow from './ReactableTableRow';\n\ntype Props<T, ID extends string | number | undefined | null> = {\n\tcolumnDefs: ReactableColumnDef<T>[];\n\tuniqueItemKey: (item: T) => ID;\n\tpaginationSettings: PaginationSettings;\n\tonSort: (property: string, direction: SortDirection) => void;\n\tonFilter?: (filterSettings: ReactableFilterSettings) => void;\n\ttableName?: string;\n\tpageable?: Pageable<T> | null;\n\tisLoading: boolean;\n\trowDef?: ReactableRowDef<T>;\n\tclickable?: boolean;\n\tmessageWhenEmpty?: string;\n\t'data-testid'?: string;\n};\n\nexport default function ReactableTable<T, ID extends string | number | undefined | null>({\n\tcolumnDefs,\n\tuniqueItemKey,\n\tpaginationSettings,\n\tonSort,\n\tonFilter,\n\ttableName,\n\tpageable,\n\tisLoading,\n\trowDef,\n\tclickable,\n\tmessageWhenEmpty,\n\t'data-testid': testId\n}: Props<T, ID>) {\n\tconst containerRef = useRef<HTMLDivElement | null>(null);\n\tconst tableRef = useRef<HTMLTableElement | null>(null);\n\tconst [showScrollingAdvice, setShowScrollingAdvice] = useState(false);\n\tconst [neverShowScrollingAdvice, setNeverShowScrollingAdvice] = useState(true);\n\tconst [hasInitialized, setHasInitialized] = useState(false);\n\tconst HIDE_SCROLLING_ADVICE_PATH = 'uiConfigurations/nevershowscrollingadvice';\n\tconst LOCALSTORAGE_KEY = 'reactable.neverShowScrollingAdvice';\n\tconst neverShowScrollingAdviceRef = useRef(neverShowScrollingAdvice);\n\n\tuseEffect(() => {\n\t\tneverShowScrollingAdviceRef.current = neverShowScrollingAdvice;\n\t}, [neverShowScrollingAdvice]);\n\n\tconst updateScrollingAdvice = () => {\n\t\tif (containerRef.current && tableRef.current) {\n\t\t\tsetShowScrollingAdvice(\n\t\t\t\t!neverShowScrollingAdviceRef.current && tableRef.current.scrollWidth > containerRef.current.offsetWidth\n\t\t\t);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tsetTimeout(() => {\n\t\t\t(async () => {\n\t\t\t\t// First check localStorage for immediate feedback\n\t\t\t\tconst localValue = localStorage.getItem(LOCALSTORAGE_KEY);\n\t\t\t\tconst hasLocalValue = localValue !== null;\n\n\t\t\t\ttry {\n\t\t\t\t\tconst value = await readAccountObject(HIDE_SCROLLING_ADVICE_PATH);\n\t\t\t\t\tconst neverShow = value === true;\n\t\t\t\t\tsetNeverShowScrollingAdvice(neverShow);\n\t\t\t\t\tneverShowScrollingAdviceRef.current = neverShow;\n\t\t\t\t\t// Sync localStorage with server value\n\t\t\t\t\tlocalStorage.setItem(LOCALSTORAGE_KEY, String(neverShow));\n\t\t\t\t\tif (!neverShow) {\n\t\t\t\t\t\tupdateScrollingAdvice();\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// On network error, fall back to localStorage\n\t\t\t\t\tif (hasLocalValue) {\n\t\t\t\t\t\tconst neverShow = localValue === 'true';\n\t\t\t\t\t\tsetNeverShowScrollingAdvice(neverShow);\n\t\t\t\t\t\tneverShowScrollingAdviceRef.current = neverShow;\n\t\t\t\t\t\tif (!neverShow) {\n\t\t\t\t\t\t\tupdateScrollingAdvice();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No localStorage value - this is a truly new user, show the advice\n\t\t\t\t\t\tsetNeverShowScrollingAdvice(false);\n\t\t\t\t\t\tneverShowScrollingAdviceRef.current = false;\n\t\t\t\t\t\tupdateScrollingAdvice();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetHasInitialized(true);\n\t\t\t})();\n\t\t}, 0);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tupdateScrollingAdvice();\n\t\twindow.addEventListener('resize', updateScrollingAdvice);\n\t\treturn () => window.removeEventListener('resize', updateScrollingAdvice);\n\t}, [pageable, columnDefs]);\n\n\tconst showFilterRow = columnDefs.some((col) => col.filterable);\n\n\treturn (\n\t\t<SpinnerContainer show={isLoading}>\n\t\t\t<div ref={containerRef} className=\"di reactable scroll-x\">\n\t\t\t\t{hasInitialized && showScrollingAdvice && !isLoading && (\n\t\t\t\t\t<Modal\n\t\t\t\t\t\tclassName=\"scroll-horizontally-advice\"\n\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.scrollHorizontally.advice\">\n\t\t\t\t\t\t\t\t\tSHIFT + mouse wheel to scroll horizontally\n\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t<div className=\"scroll-horizontally-advice-buttons\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tprimary\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait writeAccountObject(HIDE_SCROLLING_ADVICE_PATH, true);\n\t\t\t\t\t\t\t\t\t\t\tlocalStorage.setItem(LOCALSTORAGE_KEY, 'true');\n\t\t\t\t\t\t\t\t\t\t\tsetNeverShowScrollingAdvice(true);\n\t\t\t\t\t\t\t\t\t\t\tneverShowScrollingAdviceRef.current = true;\n\t\t\t\t\t\t\t\t\t\t\tsetShowScrollingAdvice(false);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.scrollHorizontally.neverShowAgain\">\n\t\t\t\t\t\t\t\t\t\t\tNever show again\n\t\t\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button onClick={() => setShowScrollingAdvice(false)}>\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"reactable.scrollHorizontally.ok\">OK</Trans>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidth={'40%'}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<table\n\t\t\t\t\tref={tableRef}\n\t\t\t\t\tclassName={cx('di reactable sortable hoverable', {selectable: clickable})}\n\t\t\t\t\tdata-testid={testId}\n\t\t\t\t>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<ReactableTableHeader\n\t\t\t\t\t\t\tcolumnDefs={columnDefs}\n\t\t\t\t\t\t\tpaginationSettings={paginationSettings}\n\t\t\t\t\t\t\tonSort={onSort}\n\t\t\t\t\t\t\ttableName={tableName}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t{onFilter && showFilterRow && (\n\t\t\t\t\t\t\t<ReactableTableFilterRow\n\t\t\t\t\t\t\t\tcolumnDefs={columnDefs}\n\t\t\t\t\t\t\t\tonFilter={onFilter}\n\t\t\t\t\t\t\t\ttableName={tableName}\n\t\t\t\t\t\t\t\tdata-testid={testId}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{pageable?.content.length\n\t\t\t\t\t\t\t? pageable.content\n\t\t\t\t\t\t\t\t\t.slice(0, paginationSettings.size)\n\t\t\t\t\t\t\t\t\t.map((item) => (\n\t\t\t\t\t\t\t\t\t\t<ReactableTableRow\n\t\t\t\t\t\t\t\t\t\t\tkey={uniqueItemKey(item)}\n\t\t\t\t\t\t\t\t\t\t\tcolumnDefs={columnDefs}\n\t\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\t\trowDef={rowDef}\n\t\t\t\t\t\t\t\t\t\t\ttableName={tableName}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t: !isLoading && (\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colSpan={columnDefs.length}>\n\t\t\t\t\t\t\t\t\t\t\t<Trans i18nKey={messageWhenEmpty ?? 'reactable.noEntriesFound'}>\n\t\t\t\t\t\t\t\t\t\t\t\tNo entries found\n\t\t\t\t\t\t\t\t\t\t\t</Trans>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</SpinnerContainer>\n\t);\n}\n","import {Component} from 'react';\n\nimport Pagination from '../pagination/Pagination';\nimport ReactableTable from './helpers/ReactableTable';\nimport {ReactableColumnDef, ReactableRowDef, ReactableFilterSettings} from './types';\nimport {Pageable, PaginationSettings, SortDirection} from '../../types/pagination';\n\nexport type Props<T, ID extends string | number | undefined | null = any> = {\n\t/** Array of column definitions, each column can be configured independently */\n\tcolumnDefs: Array<ReactableColumnDef<T>>;\n\n\t/** Function, sets identifier for each element in Reactable */\n\tuniqueItemKey: (item: T) => ID;\n\n\t/** Settings for paginated content */\n\tpaginationSettings: PaginationSettings;\n\n\t/** Function, executed if the current page changes */\n\tonChangePage: (page: number) => void;\n\n\t/** Function, executed if sorting changes */\n\tonSort: (property: string, direction: SortDirection) => void;\n\n\t/** (Optional) function, executed if the page size changes */\n\tonChangeSize?: (size: number) => void;\n\n\t/** (Optional) function, executed if the Reactable gets filtered */\n\tonFilter?: (filterSettings: ReactableFilterSettings) => void;\n\n\t/** (Optional) name of the table */\n\ttableName?: string;\n\n\t/** Content, totalElements, totalPages, number, size, sort */\n\tpageable: Pageable<T> | null | undefined;\n\n\t/** (Optional) can set custom event handler and/or functions in general */\n\trowDef?: ReactableRowDef<T>;\n\n\t/** It true, shows loading indicator */\n\tisLoading: boolean;\n\n\t/** (Optional) if true, makes rows clickable */\n\tclickable?: boolean;\n\n\t/** (Optional) shown message when the table is empty */\n\tmessageWhenEmpty?: string;\n\n\t'data-testid'?: string;\n};\n\n/**\n * Reactable displays paginated results nicely, while adding the possibility to add further functionality to each row.\n * Each column can also be extended to be sortable and/or filterable\n */\nexport default class Reactable<T = any, ID extends string | number | undefined | null = any> extends Component<\n\tProps<T, ID>\n> {\n\tcomponentDidUpdate() {\n\t\tconst {pageable, paginationSettings, onChangePage} = this.props;\n\n\t\tif (!pageable) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst totalPages = pageable.totalPages || 0;\n\t\tconst currentPage = paginationSettings.page;\n\t\tconst clampedPage = totalPages > 0 ? Math.min(currentPage, totalPages - 1) : 0;\n\n\t\tif (currentPage !== clampedPage) {\n\t\t\tonChangePage(clampedPage);\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {paginationSettings, pageable, onChangePage, onChangeSize} = this.props;\n\t\tconst showPagination = onChangeSize\n\t\t\t? pageable && pageable.totalElements > 0\n\t\t\t: pageable && pageable.totalPages > 1;\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<ReactableTable<T, ID> {...this.props} />\n\t\t\t\t{pageable && showPagination && (\n\t\t\t\t\t<Pagination\n\t\t\t\t\t\tpage={paginationSettings.page}\n\t\t\t\t\t\ttotalPages={pageable.totalPages}\n\t\t\t\t\t\tonChangePage={onChangePage}\n\t\t\t\t\t\tonChangeSize={onChangeSize}\n\t\t\t\t\t\tsize={paginationSettings.size}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\nimport {isEqual, difference, uniqWith} from 'lodash';\n\nimport {Pageable, PaginationSettings, Sort, SortDirection} from '../../types/pagination';\nimport Reactable from '../reactable/Reactable';\nimport {ReactableColumnDef, ReactableRowDef, ReactableFilterSettings} from '../reactable/types';\nimport {extendColumnDefsWithCheckboxes, filterItems, makePageable} from '../reactable/helpers/helper';\n\nexport type Props<T, ID extends string | number | undefined | null = any> = {\n\t/** Array of column definitions, each column can be configured independently */\n\tcolumnDefs: Array<ReactableColumnDef<T>>;\n\n\t/** (Optional) can set custom event handler and/or functions in general */\n\trowDef?: ReactableRowDef<T>;\n\n\t/** Function, sets identifier for each element in Reactable */\n\tuniqueItemKey: (arg0: T) => ID;\n\n\t/**\n\t * (Deprecated) This property will be removed in the future release, use paginationSettings instead\n\t * @deprecated\n\t */\n\tinitialPaginationSettings?: PaginationSettings;\n\n\t/** (Optional) settings for paginated content */\n\tpaginationSettings?: PaginationSettings;\n\t// todo make required when initialPaginationSettings will be removed\n\n\t/** Array of elements */\n\titems: Array<T> | null | undefined;\n\n\t/** It true, shows loading indicator */\n\tisLoading: boolean;\n\n\t/** (Optional) sets custom sort function */\n\tcustomSortFunction?: (\n\t\titems: Array<T>,\n\t\tsort: Sort,\n\t\tdefaultSortItems: (items: Array<T>, sort: Sort) => Array<T>\n\t) => Array<T>;\n\n\t/** (Optional) if set, resets pagination to initial state if items change */\n\tforceResetPaginationOnItemsChange?: boolean;\n\n\t/** (Optional) Function, executed on filter */\n\tonFilter?: (filterSettings: ReactableFilterSettings) => void;\n\n\t/** (Optional) Function, executed on content change */\n\tonContentChange?: (content: Array<T>) => void;\n\n\t/** (Optional) Function, executed if filtered items change */\n\tonFilteredItemsChanged?: (filteredItems: Array<T>) => void;\n\n\t/** (Optional) name of the table */\n\ttableName?: string;\n\n\t/** (Optional) if true, makes rows clickable */\n\tclickable?: boolean;\n\n\t/** If equals *true* additional column with checkboxes is rendered */\n\tselectable?: boolean;\n\n\t/** (Optional) enables selection of items */\n\tselectedItems?: Array<ID>;\n\n\t/** (Optional) function, executed on change of selected items */\n\tonSelectedItemsChange?: (selectedItems: Array<ID>) => void;\n\n\t/** (Optional) function, executed if the page size changes */\n\tonChangeSize?: (size: number) => void;\n\n\t'data-testid'?: string;\n};\n\ntype State<T> = {\n\tpaginationSettings: PaginationSettings;\n\tfilterSettings: ReactableFilterSettings;\n\tfilteredItems: Array<T> | null | undefined;\n};\n\nconst DEFAULT_PAGINATION_SETTINGS: PaginationSettings = {\n\tpage: 0,\n\tsize: 15,\n\tsort: {\n\t\tproperty: 'name',\n\t\tdirection: 'DESC'\n\t}\n};\n\n/**\n * Reactable displays paginated results nicely, while adding the possibility to add further functionality to each row.\n * Each column can also be extended to be sortable and/or filterable.\n * Also adds client-side pagination.\n */\nexport default class ReactableWithClientSidePagination<\n\tT = any,\n\tID extends string | number | undefined | null = any\n> extends Component<Props<T, ID>, State<T>> {\n\tconstructor(props: Props<T>) {\n\t\tsuper(props);\n\t\tlet paginationSettings = DEFAULT_PAGINATION_SETTINGS;\n\n\t\tif (props.paginationSettings) {\n\t\t\tpaginationSettings = props.paginationSettings;\n\t\t} else if (props.initialPaginationSettings) {\n\t\t\tconsole.warn('initialPaginationSettings is deprecated! Please use \"paginationSettings\" instead');\n\t\t\tpaginationSettings = props.initialPaginationSettings;\n\t\t} else {\n\t\t\tconsole.error('Missing pagination settings!');\n\t\t}\n\n\t\tthis.state = {\n\t\t\tpaginationSettings: paginationSettings || DEFAULT_PAGINATION_SETTINGS,\n\t\t\tfilterSettings: {},\n\t\t\tfilteredItems: null\n\t\t};\n\t}\n\n\tprivate content: Array<T> = [];\n\n\tcalculatePageNumber: (items: Array<T>, paginationSettings: PaginationSettings) => void = (\n\t\titems: Array<T>,\n\t\tpaginationSettings: PaginationSettings\n\t) => {\n\t\tconst {forceResetPaginationOnItemsChange} = this.props;\n\n\t\tif (!forceResetPaginationOnItemsChange) {\n\t\t\tconst maxPageNumber = Math.floor((items.length - 1) / paginationSettings.size);\n\n\t\t\tif (maxPageNumber <= 0) {\n\t\t\t\tthis.handleChangePage(0);\n\t\t\t} else if (maxPageNumber < paginationSettings.page) {\n\t\t\t\tthis.handleChangePage(maxPageNumber);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.handleChangePage(0);\n\t\t}\n\t};\n\n\tcomponentDidUpdate(prevProps: Props<T>) {\n\t\tconst {items} = this.props;\n\t\tconst {items: prevItems} = prevProps;\n\t\tconst settings = this.props.paginationSettings || this.props.initialPaginationSettings;\n\t\tconst prevSettings = prevProps.paginationSettings || prevProps.initialPaginationSettings;\n\n\t\tif (items && prevItems && items.length !== prevItems.length) {\n\t\t\tthis.calculatePageNumber(items, this.state.paginationSettings);\n\t\t}\n\n\t\tif (settings && !isEqual(settings, prevSettings)) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tpaginationSettings: settings\n\t\t\t\t},\n\t\t\t\t() => this.handleChangePage(0)\n\t\t\t);\n\t\t}\n\t}\n\n\thandleChangePage: (page: number) => void = (page: number) => {\n\t\tthis.setState({\n\t\t\tpaginationSettings: {...this.state.paginationSettings, page}\n\t\t});\n\t};\n\n\thandleSort: (property: string, direction: SortDirection) => void = (property: string, direction: SortDirection) => {\n\t\tthis.setState({\n\t\t\tpaginationSettings: {\n\t\t\t\t...this.state.paginationSettings,\n\t\t\t\tsort: {\n\t\t\t\t\tproperty,\n\t\t\t\t\tdirection\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\thandleFilter: (filterSettings: ReactableFilterSettings) => void = (filterSettings: ReactableFilterSettings) => {\n\t\tconst {items, onFilter, columnDefs, onFilteredItemsChanged} = this.props;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tpaginationSettings: {...this.state.paginationSettings, page: 0},\n\t\t\t\tfilterSettings\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (onFilter) {\n\t\t\t\t\tonFilter(filterSettings);\n\t\t\t\t}\n\t\t\t\tconst filteredItems = filterItems(items, columnDefs, filterSettings);\n\t\t\t\tthis.setState({\n\t\t\t\t\tfilteredItems\n\t\t\t\t});\n\n\t\t\t\tif (filteredItems) {\n\t\t\t\t\tonFilteredItemsChanged?.(filteredItems);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tgetPageable: () => Pageable<T> | null | undefined = () => {\n\t\tconst {customSortFunction, items, columnDefs, onContentChange} = this.props;\n\t\tconst {filterSettings, paginationSettings} = this.state;\n\t\tconst filteredItems = filterItems(items, columnDefs, filterSettings);\n\t\tconst pageable = makePageable<T>(filteredItems, paginationSettings, customSortFunction);\n\n\t\tif (pageable && pageable.content && !isEqual(pageable.content, this.content)) {\n\t\t\tthis.content = pageable.content;\n\n\t\t\tif (onContentChange) {\n\t\t\t\tonContentChange(this.content);\n\t\t\t}\n\t\t}\n\n\t\treturn pageable;\n\t};\n\n\thandleSelectChange: (selected: boolean, item: T) => void = (selected: boolean, item: T) => {\n\t\tconst {onSelectedItemsChange, selectedItems = [], uniqueItemKey} = this.props;\n\n\t\tif (onSelectedItemsChange) {\n\t\t\tif (selected) {\n\t\t\t\tconst newSelectedItems = selectedItems.concat(uniqueItemKey(item));\n\t\t\t\tonSelectedItemsChange(newSelectedItems);\n\t\t\t} else {\n\t\t\t\tonSelectedItemsChange(selectedItems.filter((key) => key !== uniqueItemKey(item)));\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.warn('ReactableWithClientSidePagination: onSelectedItemsChange property is missing');\n\t\t}\n\t};\n\n\thandleSelectAllChange: (selectedAll: boolean) => void = (selectedAll: boolean) => {\n\t\tconst {onSelectedItemsChange, items, selectedItems = [], uniqueItemKey} = this.props;\n\t\tconst {filteredItems} = this.state;\n\t\tconst visibleItems = (filteredItems || items || []).map(uniqueItemKey);\n\n\t\tif (onSelectedItemsChange) {\n\t\t\tif (selectedAll) {\n\t\t\t\tonSelectedItemsChange(uniqWith([...selectedItems, ...visibleItems], isEqual).sort());\n\t\t\t} else {\n\t\t\t\tonSelectedItemsChange(difference(selectedItems, visibleItems));\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.warn('ReactableWithClientSidePagination: onSelectedItemsChange property is missing');\n\t\t}\n\t};\n\n\tareSelectedAll: () => boolean = () => {\n\t\tconst {items, selectedItems, uniqueItemKey} = this.props;\n\t\tconst {filteredItems} = this.state;\n\t\tconst visibleItems = filteredItems || items || [];\n\t\treturn (\n\t\t\t!!selectedItems && visibleItems.every((item) => selectedItems.some((key) => key === uniqueItemKey(item)))\n\t\t);\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tuniqueItemKey,\n\t\t\tisLoading,\n\t\t\tcolumnDefs,\n\t\t\trowDef,\n\t\t\ttableName,\n\t\t\tclickable,\n\t\t\tselectable,\n\t\t\tselectedItems,\n\t\t\tonChangeSize\n\t\t} = this.props;\n\t\tconst finalColumnDefs = selectable\n\t\t\t? extendColumnDefsWithCheckboxes(\n\t\t\t\t\tcolumnDefs,\n\t\t\t\t\tthis.handleSelectChange,\n\t\t\t\t\tthis.handleSelectAllChange,\n\t\t\t\t\tthis.areSelectedAll(),\n\t\t\t\t\tselectedItems || [],\n\t\t\t\t\tuniqueItemKey\n\t\t\t\t)\n\t\t\t: columnDefs;\n\t\treturn (\n\t\t\t<Reactable<T, ID>\n\t\t\t\tcolumnDefs={finalColumnDefs}\n\t\t\t\trowDef={rowDef}\n\t\t\t\tuniqueItemKey={uniqueItemKey}\n\t\t\t\tpaginationSettings={this.state.paginationSettings}\n\t\t\t\tonChangePage={this.handleChangePage}\n\t\t\t\tonChangeSize={onChangeSize}\n\t\t\t\tonSort={this.handleSort}\n\t\t\t\tonFilter={this.handleFilter}\n\t\t\t\ttableName={tableName}\n\t\t\t\tpageable={this.getPageable()}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tclickable={clickable}\n\t\t\t\tdata-testid={this.props['data-testid']}\n\t\t\t/>\n\t\t);\n\t}\n}\n","import cx from 'classnames';\n/* eslint no-unused-vars: 0 */\nimport * as React from 'react';\nimport Dropzone, {Accept, FileRejection} from 'react-dropzone';\nimport classNames from 'classnames';\nimport {Trans} from '../../i18n';\n\nimport {TranslationDescriptor} from '../../types/i18n';\n\nexport type DropzoneFileRejection = FileRejection;\n\nexport interface DropzoneFile extends File {\n\tpreview?: string;\n}\n\nexport type PreviewComponentProps = {\n\tfile: DropzoneFile | null;\n\tonRemoveFile: () => void;\n\tonDownloadFile?: (() => void) | undefined;\n};\n\nexport type Props = {\n\t/** (Optional) string for accepting files */\n\taccept?: Accept;\n\n\t/** Optional Function, executed to download the file */\n\tonDownloadFile?: (file: DropzoneFile) => void;\n\n\t/** (Optional) function, executed when a file gets dragged into the upload field and accepted */\n\tonDropAccepted?: () => void;\n\n\t/** (Optional) function, executed when a file gets dragged into the upload field and rejected */\n\tonDropRejected?: (files: FileRejection[]) => void;\n\n\t/** (Optional) Hint for dragging files into upload field */\n\tdropHint?: TranslationDescriptor;\n\n\t/** (Optional) Hint for hovering over upload field */\n\thoverHint?: TranslationDescriptor;\n\n\t/** (Optional) Hint for accepting file in upload field*/\n\tacceptHint?: TranslationDescriptor;\n\n\t/** (Optional) Hint for rejecting file in upload field*/\n\trejectHint?: TranslationDescriptor;\n\n\t/** (Optional) Component to display preview of uploaded field */\n\tpreviewComponent?: React.ComponentType<PreviewComponentProps>;\n\n\t/** (Optional) Maximum upload size */\n\tmaxSize?: number;\n} & (\n\t| {\n\t\t\t/** (Optional) accept multiple files */\n\t\t\tmultiple?: false;\n\n\t\t\t/** Function, executed when files get added or removed */\n\t\t\tonChange?: (files: DropzoneFile[]) => void;\n\n\t\t\t/** Function, executed when a file gets removed */\n\t\t\tonRemoveFile: (file: DropzoneFile) => void;\n\n\t\t\t/** Function, executed when a file gets selected */\n\t\t\tonSelectFile: (file: DropzoneFile) => void;\n\t }\n\t| {\n\t\t\t/** (Optional) accept multiple files */\n\t\t\tmultiple: true;\n\n\t\t\t/** Function, executed when files get added or removed */\n\t\t\tonChange: (files: DropzoneFile[]) => void;\n\n\t\t\t/** Function, executed when a file gets removed */\n\t\t\tonRemoveFile?: (file: DropzoneFile) => void;\n\n\t\t\t/** Function, executed when a file gets selected */\n\t\t\tonSelectFile?: (file: DropzoneFile) => void;\n\t }\n);\n\nexport type State = {\n\tfiles: DropzoneFile[];\n};\n\n/**\n * FileUpload enables the possibility to upload files conveniently\n */\nexport default class FileUpload extends React.Component<Props, State> {\n\tstatic defaultProps: {\n\t\tacceptHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t\tdropHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t\thoverHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t\trejectHint: {\n\t\t\tdefaultValue: string;\n\t\t\tid: string;\n\t\t};\n\t} = {\n\t\tdropHint: {\n\t\t\tid: 'fileUpload.dropHint',\n\t\t\tdefaultValue: 'Drop file here, or click to browse ...'\n\t\t},\n\t\thoverHint: {\n\t\t\tid: 'fileUpload.hoverHint',\n\t\t\tdefaultValue: 'Drop file here, or click to browse ...'\n\t\t},\n\t\tacceptHint: {\n\t\t\tid: 'fileUpload.acceptHint',\n\t\t\tdefaultValue: 'This file type can be uploaded'\n\t\t},\n\t\trejectHint: {\n\t\t\tid: 'fileUpload.rejectHint',\n\t\t\tdefaultValue: 'This file type cannot be uploaded'\n\t\t}\n\t};\n\n\tstate: State = {\n\t\tfiles: []\n\t};\n\n\thandleDrop = (accepted: DropzoneFile[], rejected: FileRejection[]) => {\n\t\tif (!this.props.multiple && accepted.length > 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (rejected.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t/** Prevent console error on <Dropzone /> component */\n\t\tsetTimeout(() => this.selectFile(accepted), 100);\n\t};\n\n\tselectFile: (files: DropzoneFile[]) => void = (files) => {\n\t\tconst {onSelectFile, onChange} = this.props;\n\t\tfiles.forEach((file) => {\n\t\t\tfile.preview = URL.createObjectURL(file);\n\t\t});\n\t\tconst newFiles = [...this.state.files, ...files];\n\t\tthis.setState({files: newFiles});\n\t\tonChange?.(newFiles);\n\t\tif (onSelectFile) {\n\t\t\tfiles.forEach((file) => {\n\t\t\t\tonSelectFile(file);\n\t\t\t});\n\t\t}\n\t};\n\n\thandleRemoveFile: (file: DropzoneFile) => void = (file) => {\n\t\tconst {files} = this.state;\n\n\t\tif (file) {\n\t\t\tif (file.preview) window.URL.revokeObjectURL(file.preview);\n\t\t\tconst newFiles = files.filter((f) => f !== file);\n\t\t\tthis.setState({files: newFiles});\n\t\t\tthis.props.onChange?.(newFiles);\n\t\t\tthis.props.onRemoveFile?.(file);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {files} = this.state;\n\t\tconst {\n\t\t\taccept,\n\t\t\tpreviewComponent: Preview,\n\t\t\tdropHint,\n\t\t\thoverHint,\n\t\t\tacceptHint,\n\t\t\trejectHint,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\tonChange,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\tonRemoveFile,\n\t\t\tonDownloadFile,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\tonSelectFile,\n\t\t\tonDropRejected,\n\t\t\tonDropAccepted,\n\t\t\tmaxSize,\n\t\t\tmultiple,\n\t\t\t...otherProps\n\t\t} = this.props;\n\t\tconst dropHintOrDefault = dropHint || FileUpload.defaultProps.dropHint;\n\t\tconst hoverHintOrDefault = hoverHint || FileUpload.defaultProps.hoverHint;\n\t\tconst acceptHintOrDefault = acceptHint || FileUpload.defaultProps.acceptHint;\n\t\tconst rejectHintOrDefault = rejectHint || FileUpload.defaultProps.rejectHint;\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...otherProps}\n\t\t\t\tclassName={classNames('di upload', {\n\t\t\t\t\tclickable: !files.length,\n\t\t\t\t\thasContent: !!files.length\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{!!Preview &&\n\t\t\t\t\tfiles.map((file, i) => (\n\t\t\t\t\t\t<Preview\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tfile={file}\n\t\t\t\t\t\t\tonRemoveFile={() => this.handleRemoveFile(file)}\n\t\t\t\t\t\t\tonDownloadFile={onDownloadFile ? () => onDownloadFile(file) : undefined}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t{(multiple || !files.length) && (\n\t\t\t\t\t<Dropzone\n\t\t\t\t\t\taccept={accept}\n\t\t\t\t\t\tmultiple={multiple ?? false}\n\t\t\t\t\t\tonDrop={this.handleDrop}\n\t\t\t\t\t\tonDropRejected={onDropRejected}\n\t\t\t\t\t\tonDropAccepted={onDropAccepted}\n\t\t\t\t\t\tmaxSize={maxSize || Infinity}\n\t\t\t\t\t>\n\t\t\t\t\t\t{({getRootProps, getInputProps, isDragAccept, isDragReject, isDragActive}) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={cx('drag-drop-text-container', {\n\t\t\t\t\t\t\t\t\tactive: isDragActive,\n\t\t\t\t\t\t\t\t\taccept: isDragAccept,\n\t\t\t\t\t\t\t\t\treject: isDragReject\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t{...getRootProps()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<input {...getInputProps()} />\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-hint\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={dropHintOrDefault.id}>{dropHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-hover-hint\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={hoverHintOrDefault.id}>{hoverHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-accept\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={acceptHintOrDefault.id}>{acceptHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p className=\"drag-drop-reject\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey={rejectHintOrDefault.id}>{rejectHintOrDefault.defaultValue}</Trans>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Dropzone>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import {Component} from 'react';\nimport {Trans} from '../../i18n';\n\nimport FileUpload, {DropzoneFile, Props as FileUploadProps} from './FileUpload';\n\ntype PreviewComponentProps = {\n\turl: string;\n\timageSize?: 'contain' | 'cover';\n\tonRemoveFile: () => void;\n\tonDragOver: () => void;\n\tonDownloadFile?: () => void;\n};\n\nconst PreviewImage = ({url, imageSize, onRemoveFile, onDragOver, onDownloadFile}: PreviewComponentProps) => (\n\t<div className=\"di upload preview-container\" onDragOver={onDragOver}>\n\t\t<div\n\t\t\tclassName=\"preview\"\n\t\t\tstyle={{\n\t\t\t\tbackgroundImage: `url(${url})`,\n\t\t\t\t...(imageSize && {backgroundSize: imageSize})\n\t\t\t}}\n\t\t>\n\t\t\t<button className=\"action-button\" onClick={onRemoveFile} data-testid=\"delete-button\">\n\t\t\t\t<Trans i18nKey=\"imageUpload.remove\">Remove</Trans>\n\t\t\t</button>\n\t\t\t{onDownloadFile && (\n\t\t\t\t<button className=\"action-button\" onClick={onDownloadFile} data-testid=\"download-button\">\n\t\t\t\t\t<Trans i18nKey=\"imageUpload.download\">Download</Trans>\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t</div>\n);\n\nexport type Props = Omit<FileUploadProps, 'multiple'> & {\n\t/** (Optional) Url for the image preview */\n\timageUrl: string | null | undefined;\n\timageSize?: 'contain' | 'cover';\n};\n\ntype ImageUploadState = {\n\tdragOverPreview: boolean;\n\tfile: DropzoneFile | null;\n};\n\n/**\n * ImageUpload enables the possibility to upload images conveniently\n */\nexport default class ImageUpload extends Component<Props, ImageUploadState> {\n\tstate: ImageUploadState = {\n\t\tdragOverPreview: false,\n\t\tfile: null\n\t};\n\n\tcomponentDidUpdate(prevProps: Props): void {\n\t\tif (prevProps.imageUrl !== this.props.imageUrl) {\n\t\t\tthis.setState({\n\t\t\t\tdragOverPreview: false\n\t\t\t});\n\t\t}\n\t}\n\n\thandleDragOver: () => void = () => {\n\t\tthis.setState({\n\t\t\tdragOverPreview: true\n\t\t});\n\t};\n\n\trender() {\n\t\tconst {accept, imageUrl, imageSize, onSelectFile, onRemoveFile, onDownloadFile, ...otherProps} = this.props;\n\t\tconst {dragOverPreview, file} = this.state;\n\n\t\tif (imageUrl && !dragOverPreview && file) {\n\t\t\treturn (\n\t\t\t\t<PreviewImage\n\t\t\t\t\turl={imageUrl}\n\t\t\t\t\timageSize={imageSize}\n\t\t\t\t\tonRemoveFile={() => onRemoveFile?.(file)}\n\t\t\t\t\tonDownloadFile={onDownloadFile ? () => onDownloadFile(file) : undefined}\n\t\t\t\t\tonDragOver={this.handleDragOver}\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<FileUpload\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tonRemoveFile={(file) => {\n\t\t\t\t\t\tthis.setState({file: null});\n\t\t\t\t\t\tonRemoveFile?.(file);\n\t\t\t\t\t}}\n\t\t\t\t\tonSelectFile={(file) => {\n\t\t\t\t\t\tthis.setState({file});\n\t\t\t\t\t\tonSelectFile?.(file);\n\t\t\t\t\t}}\n\t\t\t\t\taccept={\n\t\t\t\t\t\taccept || {\n\t\t\t\t\t\t\t'image/*': ['.jpeg', '.jpg', '.png', '.webp']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t}\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIF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IiShtaASS3lSWjRwA8d4/gAutxSLJrsr3/6kKUc0uPKnDgioQS2BKUwY8HBhzFoc+/31ipAF0JkoDY7cQyiWTmzJLADZN2HIwn2dD5Ct5EzBiK1XE+BBgAvZQfJzDjL2UAAAAASUVORK5CYII=\"","import * as React from 'react';\nimport {useHistory, useLocation} from 'react-router-dom';\nimport {useTranslation} from '../../i18n';\n\nimport {Button} from '@deviceinsight/ng-ui-basic-components';\n\nimport arrowBackIcon from '../../assets/img/icon-arrow-back.png';\nimport {TranslationDescriptor} from '../../types/i18n';\n\nexport type Props = {\n\t/** title which is going to be displayed */\n\ttitle: string | TranslationDescriptor;\n\n\t/** (optional) subtitle which is going to be displayed */\n\tsubtitle?: string | TranslationDescriptor;\n\n\t/** (optional) if set to true, enables back button */\n\tparentPageLink?: boolean;\n\n\t/** (optional) if set, navigates back got certain parent page */\n\tsubPagePathPrefix?: string;\n\n\t/** @ignore */\n\tsubPagePathPrefixArray?: Array<string>;\n\n\t/** (optional) renders additional components as children */\n\tchildren?: React.ReactNode;\n};\n\n/**\n * `parentPageLink` set to true shows a back button to go to the parent page.\n * `subPagePathPrefix` needs to be used with `parentPageLink` set to true. It allows to customize what is considered the parent page.\n * With only the `parentPageLink` set to true the parent page is the direct parent, e.g. of `/assets/1234/conditions/5678` the parent is `/assets/1234/conditions`\n * To make the parent of e.g. `/assets/1234/conditions/edit/5678` the page `/assets/1234/conditions`, `subPagePathPrefix=\"/edit\"` needs to be used.\n */\nconst ContentHeader = ({\n\tparentPageLink,\n\ttitle,\n\tsubPagePathPrefixArray,\n\tsubPagePathPrefix,\n\tsubtitle,\n\tchildren\n}: Props) => {\n\tconst {push} = useHistory();\n\tconst {pathname} = useLocation();\n\tconst {t} = useTranslation();\n\n\tconst goToParentPage = () => {\n\t\tif (subPagePathPrefix) {\n\t\t\tpush(pathname.substring(0, pathname.lastIndexOf(subPagePathPrefix)));\n\t\t} else if (subPagePathPrefixArray) {\n\t\t\tsubPagePathPrefixArray.forEach((pathPrefix) => {\n\t\t\t\tif (pathname.includes(pathPrefix)) {\n\t\t\t\t\tpush(pathname.substring(0, pathname.lastIndexOf(pathPrefix)));\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tpush(pathname.substring(0, pathname.lastIndexOf('/')));\n\t\t}\n\t};\n\n\tconst printStringOrMessage = (stringOrMessage: string | TranslationDescriptor) => {\n\t\tif (typeof stringOrMessage === 'string') {\n\t\t\treturn stringOrMessage;\n\t\t} else {\n\t\t\tconst {id, defaultValue} = stringOrMessage;\n\t\t\treturn t(id, {\n\t\t\t\tdefaultValue\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<h1 className=\"di header\">\n\t\t\t{parentPageLink && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={goToParentPage}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tmarginRight: '15px'\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={arrowBackIcon}\n\t\t\t\t\t\talt={t('general.navigation.goBack', {\n\t\t\t\t\t\t\tdefaultValue: 'Go Back'\n\t\t\t\t\t\t})}\n\t\t\t\t\t/>\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<span>{printStringOrMessage(title)}</span>\n\t\t\t{subtitle && <span className=\"search-result-count\">{printStringOrMessage(subtitle)}</span>}\n\t\t\t{children}\n\t\t</h1>\n\t);\n};\n\nexport default ContentHeader;\n","import dayjs from 'dayjs';\nimport {forwardRef, useEffect, useState} from 'react';\n\nimport DateInput from './DateInput';\nimport ValidatedTextInput from './ValidatedTextInput';\n\nconst formatTime = (timezone: string | undefined, date: number) => {\n\ttry {\n\t\treturn dayjs.tz(date, timezone).format('HH:mm');\n\t} catch (error) {\n\t\tconsole.error('DateTimeInput: Error while extracting time from date', error);\n\t\treturn '00:00';\n\t}\n};\n\nexport type Props = {\n\t/** the current value (millis since 1970-01-01) */\n\ttimestamp: number;\n\n\t/** callback function that is executed when the user picks a date */\n\tonChange: (date: number | null | undefined, fromTextField?: boolean) => void;\n\n\t/** (optional) if set to true, displays warning styles */\n\twarning?: boolean;\n\n\t/** displays the DateTimeInput read-only */\n\treadOnly?: boolean;\n\tselectsStart?: boolean;\n\tselectsEnd?: boolean;\n\tstartDate?: Date;\n\tendDate?: Date;\n\n\t/** (optional) locale, if not set, the i18next.language is taken */\n\tlocale?: string;\n\n\t/** (optional) timezone */\n\ttimezone?: string;\n};\n\n/**\n * Extends DateInput but also displaying the current time.\n * Usually the user's locale is used for displaying the correct date format.\n */\nconst DateTimeInput = forwardRef<HTMLInputElement, Props>(\n\t({timestamp, timezone, warning, readOnly = false, onChange, ...otherProps}: Props, ref) => {\n\t\tconst [time, setTime] = useState<string>(formatTime(timezone, timestamp));\n\t\tconst timeValue = time == null ? formatTime(timezone, timestamp) : time;\n\n\t\tuseEffect(() => {\n\t\t\tsetTime(formatTime(timezone, timestamp));\n\t\t}, [timezone, timestamp]);\n\n\t\tfunction handleChangeDate(date: number | null | undefined, fromTextField?: boolean) {\n\t\t\tconst currentDate = dayjs.tz(timestamp, timezone);\n\t\t\tconst newDate = dayjs\n\t\t\t\t.tz(date, timezone)\n\t\t\t\t.set('hour', currentDate.hour())\n\t\t\t\t.set('minute', currentDate.minute())\n\t\t\t\t.set('second', currentDate.second())\n\t\t\t\t.set('millisecond', currentDate.millisecond());\n\n\t\t\tonChange(newDate.valueOf(), fromTextField);\n\t\t}\n\n\t\tfunction handleChangeTime(time: string, valid: boolean) {\n\t\t\tif (valid) {\n\t\t\t\tconst [hours, minutes] = time.split(':').map(Number);\n\t\t\t\tconst newDate = dayjs.tz(timestamp, timezone).set('hours', hours).set('minutes', minutes);\n\t\t\t\tonChange(newDate.valueOf(), true);\n\t\t\t}\n\t\t\tsetTime(time);\n\t\t}\n\n\t\tfunction tryFixTime() {\n\t\t\tif (time && /^[0-9]:[0-5][0-9]$/.test(time)) {\n\t\t\t\thandleChangeTime(time.padStart(5, '0'), true);\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<span className={`di date-time-input ${warning ? 'with-warning' : ''}`}>\n\t\t\t\t<DateInput\n\t\t\t\t\t{...otherProps}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tvalue={timestamp}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t\tonChange={handleChangeDate}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t/>\n\t\t\t\t<ValidatedTextInput\n\t\t\t\t\tdata-testid=\"time-input\"\n\t\t\t\t\tvalue={timeValue}\n\t\t\t\t\tonChange={handleChangeTime}\n\t\t\t\t\tpattern={/^(([01][0-9])|2[0-3]):[0-5][0-9]$/}\n\t\t\t\t\trequired\n\t\t\t\t\tinvalidStyle={{\n\t\t\t\t\t\tborderColor: 'red'\n\t\t\t\t\t}}\n\t\t\t\t\tplaceholder=\"00:00\"\n\t\t\t\t\tclassName=\"time\"\n\t\t\t\t\tonBlur={tryFixTime}\n\t\t\t\t\tdisabled={readOnly}\n\t\t\t\t/>\n\t\t\t</span>\n\t\t);\n\t}\n);\n\nexport default DateTimeInput;\n","import {Component, createRef} from 'react';\nimport {AsyncPaginate} from 'react-select-async-paginate';\n\nimport {Pageable} from '../../types/pagination';\nimport './react-select.css';\nimport './react-select-custom.css';\n\nexport type Props<Item, ID> = {\n\t/** Flag to preselect the status of the checkbox */\n\tvalue: ID | null | undefined;\n\n\t/** Function, executed when selecting value */\n\tonChange: (item: ID | null | undefined) => void;\n\n\t/** Identifier for value */\n\tvalueKey: string;\n\n\t/** Identifier for label */\n\tlabelKey: string;\n\n\t/** Function, executed when the component mounts and updates */\n\tsearchByQuery: (query: string, offset: number) => Promise<Pageable<Item>>;\n\n\t/** Function, executed when the component mounts and updates */\n\tsearchById: (id: ID) => Promise<Item | null | undefined>;\n\n\t/** (Optional) if set, returns a custom message if no results are available*/\n\tnoResultsMessage?: string;\n\n\t/** (Optional) if true, enables button to clear field on click */\n\tclearable?: boolean;\n\n\t/** (Optional) indicates if the component is disabled or not */\n\tdisabled?: boolean;\n\n\t/** (Optional) Whether the menu should use a portal, and where it should attach */\n\tmenuPortalTarget?: HTMLElement;\n\n\t/** Placeholder */\n\tplaceholder?: string;\n\n\t/** @ignore */\n\t'data-testid'?: string;\n};\n\ntype SelectItem<ID> = {\n\tvalue: ID;\n\tlabel: string;\n};\n\ntype State<ID extends string | number> = {\n\tcache: Record<ID, SelectItem<ID>>;\n\tcurrentItem: SelectItem<ID> | null | undefined;\n};\n\n/**\n * SelectWithSearchAsync enhances a native select list by applying a search functionality to it.\n * Fetches selectable results asynchronously while showing small loading indicator\n */\nexport default class SelectWithSearchAsync<Item, ID extends string | number> extends Component<\n\tProps<Item, ID>,\n\tState<ID>\n> {\n\tstate: State<ID> = {\n\t\tcache: {} as Record<ID, SelectItem<ID>>,\n\t\tcurrentItem: null\n\t};\n\n\tselectRef = createRef<any>();\n\n\tcomponentDidMount() {\n\t\tconst {value, searchById} = this.props;\n\n\t\tif (value) {\n\t\t\tsearchById(value).then(this.addBackendItemToCache);\n\t\t}\n\n\t\tif (this.props['data-testid']) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (this.selectRef?.current?.controlRef) {\n\t\t\t\t\tthis.selectRef.current.controlRef.setAttribute('data-testid', this.props['data-testid']);\n\t\t\t\t}\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconst {value, searchById} = this.props;\n\t\tconst {currentItem} = this.state;\n\n\t\tif (value && (!currentItem || currentItem.value !== value)) {\n\t\t\tconst foundInCache = this.reloadItemFromCache();\n\n\t\t\tif (!foundInCache) {\n\t\t\t\tsearchById(value).then(this.addBackendItemToCache);\n\t\t\t}\n\t\t} else if (!value && currentItem) {\n\t\t\tthis.setState({\n\t\t\t\tcurrentItem: null\n\t\t\t});\n\t\t}\n\t}\n\n\ttransformBackendItemToSelectItem: (backendItem: any) => SelectItem<ID> = (backendItem: any) => {\n\t\tconst {labelKey, valueKey} = this.props;\n\t\treturn {\n\t\t\tvalue: backendItem[valueKey],\n\t\t\tlabel: backendItem[labelKey]\n\t\t};\n\t};\n\treloadItemFromCache: () => boolean = () => {\n\t\tconst {value} = this.props;\n\t\tconst {currentItem, cache} = this.state;\n\n\t\tif (value && (!currentItem || currentItem.value !== value) && cache[value]) {\n\t\t\tthis.setState({\n\t\t\t\tcurrentItem: cache[value]\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\taddBackendItemToCache: (item: Item | null | undefined) => void = (item: Item | null | undefined) => {\n\t\tif (item) {\n\t\t\tconst selectItem = this.transformBackendItemToSelectItem(item);\n\t\t\tconst id = selectItem.value;\n\t\t\tthis.setState(({cache}) => ({\n\t\t\t\tcache: {...cache, [id]: selectItem}\n\t\t\t}));\n\t\t}\n\t};\n\n\tfetchOptions: (input: string, options: Array<Item>) => Promise<{hasMore: boolean; options: Array<any>}> = async (\n\t\tinput: string,\n\t\toptions: Array<Item>\n\t) => {\n\t\tconst {searchByQuery} = this.props;\n\n\t\ttry {\n\t\t\tconst {content, number, totalPages} = await searchByQuery(input, options.length);\n\t\t\treturn {\n\t\t\t\toptions: content.map<any>(this.transformBackendItemToSelectItem),\n\t\t\t\thasMore: number < totalPages - 1\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconsole.error('Error fetching options:', error);\n\t\t\treturn {hasMore: false, options: []};\n\t\t}\n\t};\n\n\thandleChange: (item: SelectItem<ID> | null | undefined) => void = (item: SelectItem<ID> | null | undefined) => {\n\t\tconst {onChange} = this.props;\n\n\t\tif (item) {\n\t\t\tconst id = item.value;\n\t\t\tthis.setState(\n\t\t\t\t({cache}) => ({\n\t\t\t\t\tcache: {...cache, [id]: item}\n\t\t\t\t}),\n\t\t\t\t() => {\n\t\t\t\t\tonChange(id);\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tonChange(null);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {clearable, noResultsMessage, disabled, menuPortalTarget} = this.props;\n\t\tconst {currentItem} = this.state;\n\t\tconst dataTestId = this.props['data-testid'];\n\n\t\treturn (\n\t\t\t<AsyncPaginate\n\t\t\t\tselectRef={this.selectRef}\n\t\t\t\tclassName=\"select-search-container\"\n\t\t\t\tclassNamePrefix=\"select-search\"\n\t\t\t\tisClearable={clearable}\n\t\t\t\tnoResultsText={noResultsMessage}\n\t\t\t\tvalue={currentItem}\n\t\t\t\tonChange={this.handleChange}\n\t\t\t\t// @ts-ignore\n\t\t\t\tloadOptions={this.fetchOptions}\n\t\t\t\tisDisabled={disabled}\n\t\t\t\tmenuPortalTarget={menuPortalTarget}\n\t\t\t\tplaceholder={this.props.placeholder}\n\t\t\t\tformatOptionLabel={\n\t\t\t\t\tdataTestId\n\t\t\t\t\t\t? (option: SelectItem<ID>) => (\n\t\t\t\t\t\t\t\t<span data-testid={`${dataTestId}-option-${option.label}`}>{option.label}</span>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n}\n","import * as React from 'react';\nimport {Link} from 'react-router-dom';\n\nimport Context from './MultiMenuContext';\n\nexport type Props = {\n\tchildren: React.ReactNode;\n\tdisabled?: boolean;\n\ticon?: React.ReactNode;\n\tlinkTo?: string;\n\tonClick?: () => any;\n\t'data-testid'?: string;\n};\n\nexport default class MultiMenuItem extends React.PureComponent<Props> {\n\tcreateClickHandler: (toggleMenu: () => void) => () => void = (toggleMenu: () => void) => () => {\n\t\tconst {onClick} = this.props;\n\n\t\tif (onClick) {\n\t\t\tonClick();\n\t\t}\n\n\t\ttoggleMenu();\n\t};\n\n\trender() {\n\t\tconst {disabled, icon, children, linkTo} = this.props;\n\t\tconst dataTestId = this.props['data-testid'];\n\t\treturn (\n\t\t\t<Context.Consumer>\n\t\t\t\t{({toggleMenu}) =>\n\t\t\t\t\tlinkTo ? (\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tdata-testid={dataTestId}\n\t\t\t\t\t\t\tto={linkTo}\n\t\t\t\t\t\t\tclassName={`item ${disabled ? 'disabled' : ''}`}\n\t\t\t\t\t\t\tonClick={this.createClickHandler(toggleMenu)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{icon && <span className=\"item-icon\">{icon}</span>}\n\t\t\t\t\t\t\t<span className=\"item-text\">{children}</span>\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tdata-testid={dataTestId}\n\t\t\t\t\t\t\tclassName={`item ${disabled ? 'disabled' : ''}`}\n\t\t\t\t\t\t\tonClick={this.createClickHandler(toggleMenu)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{icon && <span className=\"item-icon\">{icon}</span>}\n\t\t\t\t\t\t\t<span className=\"item-text\">{children}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Context.Consumer>\n\t\t);\n\t}\n}\n","import {useRef, useState} from 'react';\nimport {isEqual} from 'lodash';\n\nimport {Period} from '../types';\nimport DateTimeInput from '../../input/DateTimeInput';\n\nconst ONE_HOUR = 60 * 60 * 1000;\n\ntype Props = {\n\tperiod: Period;\n\tonChange: (period: Period) => void;\n\treadOnly?: boolean;\n\tlocale?: string;\n\ttimezone?: string;\n};\n\nexport default function Inputs({period, onChange, readOnly, locale, timezone}: Props) {\n\tconst [showWarningTarget, setShowWarningTarget] = useState('');\n\tconst warningTimeoutRef = useRef<NodeJS.Timeout | undefined>(undefined);\n\tconst endDateRef = useRef<HTMLInputElement>(null);\n\n\tconst startDate = new Date(period.tsStart);\n\tconst endDate = new Date(period.tsEnd);\n\n\tfunction showWarning(target: 'date-from' | 'date-to') {\n\t\tif (warningTimeoutRef.current) {\n\t\t\tclearTimeout(warningTimeoutRef.current);\n\t\t}\n\t\tsetShowWarningTarget(target);\n\t\twarningTimeoutRef.current = setTimeout(() => setShowWarningTarget(''), 1000);\n\t}\n\n\tfunction handleChangeStartDate(timestamp: number | null | undefined, fromTextField?: boolean) {\n\t\tif (timestamp) {\n\t\t\tconst incorrect = period.tsEnd && timestamp > period.tsEnd;\n\t\t\tconst tsEnd = incorrect ? timestamp + ONE_HOUR : period.tsEnd;\n\n\t\t\tconst newPeriod = {\n\t\t\t\ttsStart: timestamp,\n\t\t\t\ttsEnd\n\t\t\t};\n\t\t\tif (!isEqual(newPeriod, period)) {\n\t\t\t\tonChange(newPeriod);\n\t\t\t}\n\n\t\t\tif (!fromTextField && endDateRef.current) {\n\t\t\t\tendDateRef.current.focus();\n\t\t\t}\n\n\t\t\tif (incorrect) {\n\t\t\t\tshowWarning('date-to');\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction handleChangeEndDate(timestamp: number | null | undefined) {\n\t\tif (timestamp) {\n\t\t\tconst incorrect = period.tsStart && timestamp < period.tsStart;\n\t\t\tconst tsStart = incorrect ? timestamp - ONE_HOUR : period.tsStart;\n\n\t\t\tconst newPeriod = {\n\t\t\t\ttsStart,\n\t\t\t\ttsEnd: timestamp\n\t\t\t};\n\t\t\tif (!isEqual(newPeriod, period)) {\n\t\t\t\tonChange(newPeriod);\n\t\t\t}\n\n\t\t\tif (incorrect) {\n\t\t\t\tshowWarning('date-from');\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (\n\t\t<span className=\"inputs\">\n\t\t\t<span data-testid=\"from-wrapper\">\n\t\t\t\t<DateTimeInput\n\t\t\t\t\ttimestamp={period.tsStart}\n\t\t\t\t\tonChange={handleChangeStartDate}\n\t\t\t\t\twarning={showWarningTarget === 'date-from'}\n\t\t\t\t\tselectsStart\n\t\t\t\t\tstartDate={startDate}\n\t\t\t\t\tendDate={endDate}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tlocale={locale}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t/>\n\t\t\t</span>\n\t\t\t - \n\t\t\t<span data-testid=\"to-wrapper\">\n\t\t\t\t<DateTimeInput\n\t\t\t\t\tref={endDateRef}\n\t\t\t\t\ttimestamp={period.tsEnd}\n\t\t\t\t\tonChange={handleChangeEndDate}\n\t\t\t\t\twarning={showWarningTarget === 'date-to'}\n\t\t\t\t\tselectsEnd\n\t\t\t\t\tstartDate={startDate}\n\t\t\t\t\tendDate={endDate}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tlocale={locale}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</span>\n\t);\n}\n","import {Component} from 'react';\nimport dayjs from 'dayjs';\nimport cx from 'classnames';\n\ntype OwnProps = {\n\tmonth?: number;\n\tyear?: number;\n\tonChange: (month: number, year: number) => void;\n};\n\ntype Props = OwnProps;\n\ntype State = {\n\tselectedMonth: number;\n\tselectedYear: number;\n\tdisplayedYear: number;\n};\n\nexport default class MonthPicker extends Component<Props, State> {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\t\tconst month = props.month !== null && props.month !== undefined ? props.month : dayjs().month() + 1;\n\t\tconst year = props.year !== null && props.year !== undefined ? props.year : dayjs().year();\n\t\tthis.state = {\n\t\t\tselectedMonth: month,\n\t\t\tselectedYear: year,\n\t\t\tdisplayedYear: year\n\t\t};\n\t}\n\n\ttdMonth = (month: number) => {\n\t\tconst {selectedMonth, selectedYear, displayedYear} = this.state;\n\t\treturn (\n\t\t\t<td\n\t\t\t\tdata-testid={`month-${month}-button`}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tthis.props.onChange(month, displayedYear);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tselectedMonth: month,\n\t\t\t\t\t\tselectedYear: displayedYear\n\t\t\t\t\t});\n\t\t\t\t}}\n\t\t\t\tclassName={cx({selected: month === selectedMonth && displayedYear === selectedYear})}\n\t\t\t>\n\t\t\t\t{dayjs(`${selectedYear}/${month.toString().padStart(2, '0')}/01`, 'YYYY/MM/DD').format('MMM')}\n\t\t\t</td>\n\t\t);\n\t};\n\n\trender() {\n\t\tconst {displayedYear} = this.state;\n\t\treturn (\n\t\t\t<div className=\"di monthpicker\">\n\t\t\t\t<div className=\"pager\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"page-nav prev\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tdisplayedYear: displayedYear - 1\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<span className=\"page-nav info\">{displayedYear}</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"page-nav next\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tdisplayedYear: displayedYear + 1\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"months\">\n\t\t\t\t\t<table\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tmargin: 'auto'\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(1)}\n\t\t\t\t\t\t\t\t{this.tdMonth(2)}\n\t\t\t\t\t\t\t\t{this.tdMonth(3)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(4)}\n\t\t\t\t\t\t\t\t{this.tdMonth(5)}\n\t\t\t\t\t\t\t\t{this.tdMonth(6)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(7)}\n\t\t\t\t\t\t\t\t{this.tdMonth(8)}\n\t\t\t\t\t\t\t\t{this.tdMonth(9)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t{this.tdMonth(10)}\n\t\t\t\t\t\t\t\t{this.tdMonth(11)}\n\t\t\t\t\t\t\t\t{this.tdMonth(12)}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","export default \"data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%23fff;%20}%20%3c/style%3e%3c/defs%3e%3cg%3e%3cg%3e%3crect%20class='cls-1'%20x='3.5'%20y='7.5'%20width='2'%20height='2'/%3e%3cpath%20d='M5,8V9H4V8H5M6,7H3v3H6V7Z'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%207%208%207%208%208%209%208%209%207%209%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='10'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='11%207%2010%207%2010%208%2011%208%2011%207%2011%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='12'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='13%207%2012%207%2012%208%2013%208%2013%207%2013%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='9'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%209%208%209%208%2010%209%2010%209%209%209%209'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%2011%208%2011%208%2012%209%2012%209%2011%209%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='6'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='7%2011%206%2011%206%2012%207%2012%207%2011%207%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='4'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='5%2011%204%2011%204%2012%205%2012%205%2011%205%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='10.5'%20y='9.5'%20width='2'%20height='2'/%3e%3cpath%20d='M12,10v1H11V10h1m1-1H10v3h3V9Z'/%3e%3c/g%3e%3cpath%20d='M15.31,2H.69A.69.69,0,0,0,0,2.69V14.31A.69.69,0,0,0,.69,15H15.31a.69.69,0,0,0,.69-.69V2.69A.69.69,0,0,0,15.31,2ZM14,13H2V6H14Z'/%3e%3c/g%3e%3crect%20x='3'%20width='3'%20height='2'/%3e%3crect%20x='10'%20width='3'%20height='2'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpolygon%20points='7.5%2010%204%206%2011%206%207.5%2010'/%3e%3c/svg%3e\"","import dayjs from 'dayjs';\nimport timezone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\nimport {Period} from './types';\n\ndayjs.extend(timezone);\ndayjs.extend(utc);\n\nexport function dayjsTz(timezone: string | undefined, ts?: number | null | undefined) {\n\treturn timezone ? dayjs.tz(ts, timezone) : dayjs(ts);\n}\n\nexport function createToday(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).startOf('day').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).endOf('day').valueOf()\n\t};\n}\n\nexport function createYesterday(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).subtract(1, 'day').startOf('day').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).subtract(1, 'day').endOf('day').valueOf()\n\t};\n}\n\nexport function createCurrentWeek(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).startOf('week').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).endOf('week').valueOf()\n\t};\n}\n\nexport function createCurrentMonth(timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone).startOf('month').valueOf(),\n\t\ttsEnd: dayjsTz(timezone).endOf('month').valueOf()\n\t};\n}\n\nexport function createWholeDay(tsMiddle: number, timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone, tsMiddle).startOf('day').valueOf(),\n\t\ttsEnd: dayjsTz(timezone, tsMiddle).endOf('day').valueOf()\n\t};\n}\n\nexport function createWholeMonth(tsMiddle: number, timezone: string | undefined) {\n\treturn {\n\t\ttsStart: dayjsTz(timezone, tsMiddle).startOf('month').valueOf(),\n\t\ttsEnd: dayjsTz(timezone, tsMiddle).endOf('month').valueOf()\n\t};\n}\n\nexport function createLastXDays(days: number, timezone: string | undefined) {\n\tconst tsStart = dayjsTz(timezone)\n\t\t.subtract(days - 1, 'days')\n\t\t.startOf('day')\n\t\t.valueOf();\n\tconst tsEnd = dayjs().endOf('day').valueOf();\n\n\treturn {tsStart, tsEnd};\n}\n\nconst DAY_TO_MILLIS = 1000 * 60 * 60 * 24;\n\nexport function periodToDays({tsStart, tsEnd}: Period): number {\n\treturn Math.round((tsEnd - tsStart + 1) / DAY_TO_MILLIS);\n}\n","import {useState} from 'react';\nimport {Trans} from '../../../i18n';\nimport dayjs from 'dayjs';\n\nimport {Button, Popup} from '@deviceinsight/ng-ui-basic-components';\n\nimport {Period} from '../types';\nimport DateInput from '../../input/DateInput';\nimport MonthPicker from './MonthPicker';\n\nimport imgIconCalendar from '../../../assets/svg/icon_calendar.svg';\nimport imgTriangleDown from '../../../assets/svg/triangle_down.svg';\nimport {\n\tcreateCurrentMonth,\n\tcreateCurrentWeek,\n\tcreateLastXDays,\n\tcreateToday,\n\tcreateWholeDay,\n\tcreateWholeMonth,\n\tcreateYesterday\n} from '../periods';\n\ntype Props = {\n\tperiodName: string | undefined;\n\ttimezone?: string;\n\tonChange: (period: Period) => void;\n\tonShowCustomPeriod: ((show: boolean) => void) | undefined;\n};\n\nexport default function Menu({onChange, onShowCustomPeriod, periodName, timezone}: Props) {\n\tconst [visible, setVisible] = useState(false);\n\tconst [showDatePicker, setShowDatePicker] = useState(false);\n\tconst [showMonthPicker, setShowMonthPicker] = useState(false);\n\t \n\tconst [datePickerDate, setDatePickerDate] = useState<number | undefined>(Date.now());\n\n\tfunction setPeriod(period: Period) {\n\t\tonChange(period);\n\t\tsetVisible(false);\n\t\tif (onShowCustomPeriod) {\n\t\t\tonShowCustomPeriod(false);\n\t\t}\n\t}\n\n\tfunction setPeriodSpecificDate(date: number | null | undefined) {\n\t\tsetPeriod(createWholeDay(date ?? Date.now(), timezone));\n\t\tsetShowDatePicker(false);\n\t\tsetDatePickerDate(date ?? undefined);\n\t}\n\n\tfunction setPeriodSpecificMonth(month: number, year: number) {\n\t\tsetPeriod(\n\t\t\tcreateWholeMonth(\n\t\t\t\tdayjs()\n\t\t\t\t\t.year(year)\n\t\t\t\t\t.month(month - 1)\n\t\t\t\t\t.valueOf(),\n\t\t\t\ttimezone\n\t\t\t)\n\t\t);\n\t\tsetShowMonthPicker(false);\n\t}\n\n\tfunction toggleDatePicker() {\n\t\tsetShowDatePicker(!showDatePicker);\n\t\tsetShowMonthPicker(false);\n\t}\n\n\tfunction toggleMonthPicker() {\n\t\tsetShowMonthPicker(!showMonthPicker);\n\t\tsetShowDatePicker(false);\n\t}\n\n\tfunction handleCustomPeriodSelect() {\n\t\tsetVisible(false);\n\t\tif (onShowCustomPeriod) {\n\t\t\tonShowCustomPeriod(true);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div>\n\t\t\t<Popup\n\t\t\t\topen={visible}\n\t\t\t\tonOpenChange={setVisible}\n\t\t\t\thandler={\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-testid=\"time-period-menu-button\"\n\t\t\t\t\t\ttitle={{\n\t\t\t\t\t\t\tid: 'trend.calendarMenu.calendar.timePeriod',\n\t\t\t\t\t\t\tdefaultValue: 'Time Period'\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<img src={imgIconCalendar} alt=\"calendar icon\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t{!!periodName && (\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t{periodName}\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<img src={imgTriangleDown} alt=\"triangle down\" style={{width: 16, height: 16}} />\n\t\t\t\t\t\t</>\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<div className=\"di multimenu period-picker-multimenu\">\n\t\t\t\t\t<div className={`drop bottom ${visible ? 'show' : ''}`}>\n\t\t\t\t\t\t<div className={`left-box ${showDatePicker ? 'show' : ''}`}>\n\t\t\t\t\t\t\t<DateInput inline value={datePickerDate} onChange={setPeriodSpecificDate} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className={`left-box ${showMonthPicker ? 'show' : ''}`}>\n\t\t\t\t\t\t\t<MonthPicker onChange={setPeriodSpecificMonth} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"right-box\">\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"today-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createToday(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.today\">Today</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"yesterday-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createYesterday(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.yesterday\">Yesterday</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"item\">\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tdata-testid=\"last-7-days-button\"\n\t\t\t\t\t\t\t\t\tclassName=\"item-text\"\n\t\t\t\t\t\t\t\t\tonClick={() => setPeriod(createLastXDays(7, timezone))}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.lastSevenDays\">Last 7 days</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"item-more icon triangle\">\n\t\t\t\t\t\t\t\t\t<div className=\"item-more-submenu\">\n\t\t\t\t\t\t\t\t\t\t{[2, 3, 5, 10, 14, 30].map((days) => (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"subitem\"\n\t\t\t\t\t\t\t\t\t\t\t\tkey={days}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setPeriod(createLastXDays(days, timezone))}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{days}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"current-week-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createCurrentWeek(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.currentWeek\">Curr. Week</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"item\"\n\t\t\t\t\t\t\t\tdata-testid=\"current-month-button\"\n\t\t\t\t\t\t\t\tonClick={() => setPeriod(createCurrentMonth(timezone))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.currentMonth\">Curr. Month</Trans>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"item\" data-testid=\"day-button\" onClick={toggleDatePicker}>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.day\">Day</Trans>\n\t\t\t\t\t\t\t\t\t<div className=\"item-more icon dots\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"item\" data-testid=\"month-button\" onClick={toggleMonthPicker}>\n\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.month\">Month</Trans>\n\t\t\t\t\t\t\t\t\t<div className=\"item-more icon dots\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{onShowCustomPeriod !== undefined && (\n\t\t\t\t\t\t\t\t<div className=\"item\" data-testid=\"from-to-button\" onClick={handleCustomPeriodSelect}>\n\t\t\t\t\t\t\t\t\t<div className=\"item-text\">\n\t\t\t\t\t\t\t\t\t\t<Trans i18nKey=\"trend.calendarMenu.timePeriod.fromto\">From/to</Trans>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Popup>\n\t\t</div>\n\t);\n}\n","import {useTranslation} from '../../i18n';\n\nimport {Period} from './types';\nimport {\n\tcreateCurrentMonth,\n\tcreateCurrentWeek,\n\tcreateLastXDays,\n\tcreateToday,\n\tcreateWholeDay,\n\tcreateWholeMonth,\n\tcreateYesterday,\n\tperiodToDays\n} from './periods';\n\nfunction compare(period1: Period, period2: Period) {\n\treturn period1.tsStart === period2.tsStart && period1.tsEnd === period2.tsEnd;\n}\n\n/**\n * This hook takes a period and tries to find its translation.\n * @param period\n */\nexport default function usePeriodName(period: Period, timezone: string | undefined) {\n\tconst {t} = useTranslation();\n\n\tif (compare(period, createToday(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.today', {defaultValue: 'Today'});\n\t}\n\n\tif (compare(period, createYesterday(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.yesterday', {defaultValue: 'Yesterday'});\n\t}\n\n\tif (compare(period, createCurrentWeek(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.currentWeek', {defaultValue: 'Curr. Week'});\n\t}\n\n\tif (compare(period, createCurrentMonth(timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.currentMonth', {defaultValue: 'Curr. Month'});\n\t}\n\n\tif (compare(period, createWholeDay((period.tsStart + period.tsEnd) / 2, timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.day', {defaultValue: 'Day'});\n\t}\n\n\tif (compare(period, createWholeMonth((period.tsStart + period.tsEnd) / 2, timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.month', {defaultValue: 'Month'});\n\t}\n\n\tconst days = periodToDays(period);\n\tif (compare(period, createLastXDays(days, timezone))) {\n\t\treturn t('trend.calendarMenu.timePeriod.lastDays', {\n\t\t\tdefaultValue: `Last ${days} days`,\n\t\t\tdays: days\n\t\t});\n\t}\n\n\treturn undefined;\n}\n","import {useState} from 'react';\n\nimport {Period} from './types';\nimport Inputs from './components/Inputs';\nimport Menu from './components/Menu';\nimport usePeriodName from './usePeriodName';\n\nexport type Props = {\n\t/** Period from start- to endpoint */\n\tperiod: Period;\n\n\t/** Function, executed on change */\n\tonChange: (period: Period) => void;\n\n\t/** Predefined period name */\n\tdefaultPeriodName?: string;\n\n\t/** Show only dropdown with calendar part without inputs? */\n\tinputsHiddenByDefault?: boolean;\n\n\t/** Should the menu be hidden? */\n\tmenuHidden?: boolean;\n\n\t/** Should the PeriodPicker be readOnly? */\n\treadOnly?: boolean;\n\n\t/** (optional) locale, if not set, the i18next.language is taken */\n\tlocale?: string;\n\n\t/** (optional) timezone */\n\ttimezone?: string;\n\t'data-testid'?: string;\n};\n\nexport default function PeriodPicker({\n\tperiod,\n\tonChange,\n\tinputsHiddenByDefault,\n\tmenuHidden,\n\treadOnly,\n\tlocale,\n\tdefaultPeriodName,\n\ttimezone,\n\t...props\n}: Props) {\n\tconst [showInputs, setShowInputs] = useState(!inputsHiddenByDefault);\n\tconst periodName = usePeriodName(period, timezone) ?? defaultPeriodName;\n\n\treturn (\n\t\t<div className=\"di period-picker\" data-testid={props['data-testid']}>\n\t\t\t{(!inputsHiddenByDefault || showInputs) && (\n\t\t\t\t<Inputs period={period} onChange={onChange} locale={locale} readOnly={readOnly} timezone={timezone} />\n\t\t\t)}\n\t\t\t{menuHidden || readOnly || (\n\t\t\t\t<Menu\n\t\t\t\t\tperiodName={periodName}\n\t\t\t\t\tonShowCustomPeriod={inputsHiddenByDefault ? setShowInputs : undefined}\n\t\t\t\t\tonChange={onChange}\n\t\t\t\t\ttimezone={timezone}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","const CONFLICTING_IDS_DETECTION_DELAY = 500;\n\nconst calculateIdCountsInElement = (element: SVGSVGElement | Document) => {\n\treturn Array.from(element.querySelectorAll('[id]'))\n\t\t.map((element: Element) => element.getAttribute('id'))\n\t\t.reduce((acc: Record<string, number>, id: string | null) => {\n\t\t\tif (id) acc[id] = acc[id] + 1 || 1;\n\t\t\treturn acc;\n\t\t}, {});\n};\n\nconst findAllDuplicatedIdsInSvgElement = (svgElement: SVGSVGElement) => {\n\tconst idCountsInDocument = calculateIdCountsInElement(document);\n\tconst idCountsInSvg = calculateIdCountsInElement(svgElement);\n\treturn Object.keys(idCountsInSvg).filter((key) => idCountsInSvg[key] < idCountsInDocument[key]);\n};\n\nexport default function findConflicts(svgElement: SVGSVGElement, onConflict: (conflictingIds: string[]) => void) {\n\tconst timeoutId = setTimeout(() => {\n\t\tif (onConflict) {\n\t\t\tonConflict(findAllDuplicatedIdsInSvgElement(svgElement));\n\t\t}\n\t}, CONFLICTING_IDS_DETECTION_DELAY);\n\n\treturn () => clearTimeout(timeoutId);\n}\n","import {SetHyperlink} from '../types';\nimport {uuidV4} from '../../../modules/utils/uuidGen';\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg';\n\nexport default function createHyperlinkModification(\n\telement: HTMLElement,\n\t{hoverColor, internalLink, link}: SetHyperlink,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n) {\n\tconst anchor = wrapIntoAnchor(element);\n\tif (!anchor) return;\n\n\tconst uniqueClassName = `a${uuidV4(8)}`;\n\telement.classList.add('anchor', uniqueClassName);\n\n\tif (hoverColor && globalStyleElement?.sheet) {\n\t\tglobalStyleElement.sheet.insertRule(\n\t\t\t`.di.svg-image .anchor.${uniqueClassName}:hover, .di.svg-image .anchor.${uniqueClassName}:hover * { stroke: ${hoverColor} !important; }`\n\t\t);\n\t}\n\tanchor.setAttributeNS(SVG_NS, 'xlink:href', '#');\n\tanchor.addEventListener('click', () =>\n\t\tinternalLink && onInternalLinkChange ? onInternalLinkChange(link) : window.open(link, '_newtab')\n\t);\n}\n\nfunction wrapIntoAnchor(wrappedElement: HTMLElement) {\n\tconst parentNode = wrappedElement.parentNode;\n\n\tif (!parentNode) {\n\t\treturn null;\n\t}\n\n\tconst siblings = parentNode.childNodes;\n\n\tif (!siblings) {\n\t\treturn null;\n\t}\n\n\tconst index = Array.from(siblings).findIndex((el) => el === wrappedElement);\n\tconst wrapperElement = document.createElementNS(SVG_NS, 'a');\n\twrapperElement.appendChild(wrappedElement);\n\tconst siblingNode = siblings[index] || null;\n\n\tif (siblingNode) {\n\t\tparentNode.insertBefore(wrapperElement, siblingNode);\n\t} else {\n\t\tparentNode.appendChild(wrapperElement);\n\t}\n\n\treturn wrapperElement;\n}\n","// SvgImage uses the @svgdotjs/svg.js library that doesn't work with the <svg:svg>...</svg:svg> elements.\n// The naive solution - removing of the \"svg:\" namespace - solves the problem.\nconst removeSvgNamespace = (xml: string) => xml.replace(/<svg:svg/g, '<svg').replace(/<\\/svg:svg/g, '</svg');\n\nexport const parseFromString = (imageData: string) => {\n\tconst parser = new DOMParser();\n\tconst xml = removeSvgNamespace(atob(imageData.replace('data:image/svg+xml;base64,', '')));\n\treturn parser.parseFromString(xml, 'image/svg+xml');\n};\n\nexport default function (imageData: string, diFieldId: string) {\n\tconst doc = parseFromString(imageData);\n\treturn doc.querySelectorAll(`[id^=\"${diFieldId}\"]`);\n}\n","import {Modification, PositionX, PositionY} from '../types';\n\nconst mergePositionChanges = (modifications: Array<Modification>): Array<Modification> => {\n\tconst positionModifications = modifications.filter(({type}) => type === 'positionX' || type === 'positionY');\n\tconst restModifications = modifications.filter(({type}) => type !== 'positionX' && type !== 'positionY');\n\tconst positionByAxisModifications = positionModifications.reduce(\n\t\t(\n\t\t\tacc: {\n\t\t\t\tx: PositionX | null;\n\t\t\t\ty: PositionY | null;\n\t\t\t},\n\t\t\tmodification\n\t\t) => {\n\t\t\tif (modification.type === 'positionX') {\n\t\t\t\treturn {...acc, x: modification};\n\t\t\t} else if (modification.type === 'positionY') {\n\t\t\t\treturn {...acc, y: modification};\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{\n\t\t\tx: null,\n\t\t\ty: null\n\t\t}\n\t);\n\n\tif (positionByAxisModifications.x && positionByAxisModifications.y) {\n\t\treturn restModifications.concat([\n\t\t\t{\n\t\t\t\ttype: 'positionXY',\n\t\t\t\ttarget: positionByAxisModifications.x.target,\n\t\t\t\tpositionX: positionByAxisModifications.x.position,\n\t\t\t\tpositionY: positionByAxisModifications.y.position\n\t\t\t}\n\t\t]);\n\t} else if (positionByAxisModifications.x) {\n\t\treturn restModifications.concat([positionByAxisModifications.x]);\n\t} else if (positionByAxisModifications.y) {\n\t\treturn restModifications.concat([positionByAxisModifications.y]);\n\t} else {\n\t\treturn restModifications;\n\t}\n};\n\nexport default (modifications: Array<Modification>): Array<Modification> => {\n\tconst modificationsByTarget = modifications.reduce<Record<string, Modification[]>>(\n\t\t(acc, modification) => ({\n\t\t\t...acc,\n\t\t\t[modification.target]: [...(acc[modification.target] || []), modification]\n\t\t}),\n\t\t{}\n\t);\n\treturn Object.keys(modificationsByTarget).reduce(\n\t\t(acc: Array<Modification>, target) => acc.concat(mergePositionChanges(modificationsByTarget[target])),\n\t\t[]\n\t);\n};\n","import {SVG} from '@svgdotjs/svg.js';\n\nimport {PositionX, PositionXY, PositionY} from '../types';\n\nconst limitPercentagePosition = (position: number): number => Math.max(0, Math.min(100, position));\n\nexport default function createPositionModification(\n\telement: HTMLElement,\n\tmodification: PositionX | PositionY | PositionXY,\n\tsvgElement: SVGSVGElement\n) {\n\tconst svg = SVG(svgElement);\n\tconst targetId = element.getAttribute('id') || '';\n\tconst targetEl = svg.findOne(`#${targetId}`) as any;\n\tconst boundariesEl = svg.findOne(`#${targetId}-boundaries`) as any;\n\tconst bbox = boundariesEl ? boundariesEl.bbox() : svg.viewbox();\n\n\tif (modification.type === 'positionX') {\n\t\ttargetEl.x(bbox.x + (limitPercentagePosition(modification.position) * bbox.width) / 100);\n\t} else if (modification.type === 'positionY') {\n\t\ttargetEl.y(bbox.y + (limitPercentagePosition(modification.position) * bbox.height) / 100);\n\t} else {\n\t\ttargetEl.x(bbox.x + (limitPercentagePosition(modification.positionX) * bbox.width) / 100);\n\t\ttargetEl.y(bbox.y + (limitPercentagePosition(modification.positionY) * bbox.height) / 100);\n\t}\n}\n","import {SVG} from '@svgdotjs/svg.js';\n\nimport {Modification} from '../types';\nimport createHyperlinkModification from './createHyperlinkModification';\nimport {parseFromString} from './getMutableNodeList';\nimport transformPositionModifications from './transformPositionModifications';\nimport createPositionModification from './createPositionModification';\n\nexport default function renderSvg(\n\tsvgWrapper: HTMLDivElement,\n\timageData: string,\n\tmodifications: Modification[] | undefined,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n): SVGSVGElement | null {\n\tconst imageDocument = parseFromString(imageData);\n\tconst svgElement = imageDocument.querySelector('svg');\n\n\tif (svgElement) {\n\t\tsvgWrapper.style.height = '100%';\n\t\tsvgWrapper.innerHTML = '';\n\t\tsvgElement.style.height = '100%';\n\t\tsvgElement.style.width = '100%';\n\t\tsvgElement.classList.add('di', 'svg-image');\n\t\tif (!svgElement.getAttribute('viewBox')) {\n\t\t\tsvgElement.setAttribute('viewBox', '');\n\t\t}\n\t\tif (!svgElement.getAttribute('preserveAspectRatio')) {\n\t\t\tsvgElement.setAttribute('preserveAspectRatio', 'xMidYMid');\n\t\t}\n\t\tsvgWrapper.appendChild(svgElement);\n\t\tapplyModifications(svgElement, modifications, globalStyleElement, onInternalLinkChange);\n\t\treturn svgElement;\n\t}\n\treturn null;\n}\n\nfunction applyModifications(\n\tsvgElement: SVGSVGElement,\n\tmodifications: Modification[] | undefined,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n) {\n\tif (!modifications || !modifications.length) return;\n\n\tfor (const modification of sortModifications(transformPositionModifications(modifications))) {\n\t\tconst element = svgElement.querySelector<HTMLElement>(`[id=${modification.target}]`);\n\n\t\tif (element) {\n\t\t\tapplyModification(element, modification, svgElement, globalStyleElement, onInternalLinkChange);\n\t\t}\n\t}\n}\n\nfunction applyModification(\n\telement: HTMLElement,\n\tmodification: Modification,\n\tsvgElement: SVGSVGElement,\n\tglobalStyleElement: HTMLStyleElement | null,\n\tonInternalLinkChange: ((link: string) => void) | undefined\n) {\n\tswitch (modification.type) {\n\t\tcase 'visibility':\n\t\t\telement.setAttribute('visibility', modification.visible ? 'visible' : 'hidden');\n\t\t\tbreak;\n\n\t\tcase 'text': {\n\t\t\tconst tspan = element.querySelector('tspan');\n\n\t\t\tif (tspan) {\n\t\t\t\ttspan.textContent = modification.text;\n\t\t\t} else {\n\t\t\t\telement.textContent = modification.text;\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'color': {\n\t\t\tconst {color} = modification;\n\n\t\t\tconst changeColor = (el: Element) => {\n\t\t\t\tel.setAttribute('fill', color);\n\t\t\t\t(el as SVGElement).style.fill = color;\n\t\t\t};\n\n\t\t\tchangeColor(element);\n\t\t\telement.querySelectorAll('g, path').forEach(changeColor);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'hyperlink':\n\t\t\tcreateHyperlinkModification(element, modification, globalStyleElement, onInternalLinkChange);\n\t\t\tbreak;\n\n\t\tcase 'eventListener':\n\t\t\telement.addEventListener(modification.eventType, modification.listener, modification.options);\n\t\t\tbreak;\n\n\t\tcase 'classNames':\n\t\t\telement.classList.add(...modification.classNames);\n\n\t\t\tbreak;\n\n\t\tcase 'positionX':\n\t\tcase 'positionY':\n\t\tcase 'positionXY':\n\t\t\tcreatePositionModification(element, modification, svgElement);\n\t\t\tbreak;\n\n\t\tcase 'rotation': {\n\t\t\t// @ts-expect-error\n\t\t\tSVG(element).rotate(modification.degrees);\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tthrow new Error('Unknown modification');\n\t}\n}\n\n// rotation moved to the end of the array\nfunction sortModifications(modifications: Modification[]) {\n\treturn modifications.sort(({type: type1}, {type: type2}) => (type1 !== type2 && type2 === 'rotation' ? -1 : 1));\n}\n","import {useEffect, useRef} from 'react';\nimport {useHistory} from 'react-router-dom';\n\nimport {Modification} from './types';\nimport findConflicts from './utils/findConflicts';\nimport renderSvg from './utils/renderSvg';\n\nexport type Props = {\n\t/** base64 encoded content of the SVG file */\n\timageData: string | null | undefined;\n\n\t/** list of modifications that should be applied to the svg elements */\n\tmodifications?: Modification[];\n\n\t/** called with list of conflicting IDs which means IDs existing in the DOM and duplicated by the elements from the SVG */\n\tonConflict?: (conflictingIds: string[]) => void;\n};\n\nfunction useGlobalStyleElement() {\n\tconst styleElementRef = useRef<HTMLStyleElement | null>(null);\n\n\tuseEffect(() => {\n\t\tconst styleElement = document.createElement('style');\n\t\t// WebKit hack\n\t\tstyleElement.appendChild(document.createTextNode(''));\n\n\t\tif (document && document.head) {\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\t\tstyleElementRef.current = styleElement;\n\n\t\treturn () => {\n\t\t\tif (document && document.head && styleElement) {\n\t\t\t\tdocument.head.removeChild(styleElement);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t \n\treturn styleElementRef.current;\n}\n\nexport default function SvgImage({imageData, modifications, onConflict}: Props) {\n\tconst svgWrapperRef = useRef<HTMLDivElement>(null);\n\tconst styleElement = useGlobalStyleElement();\n\tconst {push} = useHistory();\n\n\tuseEffect(() => {\n\t\tconst {current: wrapper} = svgWrapperRef;\n\n\t\tif (wrapper && imageData) {\n\t\t\tconst svgElement = renderSvg(wrapper, imageData, modifications, styleElement, push);\n\t\t\tif (svgElement && onConflict) {\n\t\t\t\treturn findConflicts(svgElement, onConflict);\n\t\t\t}\n\t\t}\n\t}, [imageData, modifications, onConflict, push, styleElement]);\n\n\treturn <div ref={svgWrapperRef} />;\n}\n","import {parseFromString} from './getMutableNodeList';\n\nexport default (imageData: string) => {\n\ttry {\n\t\tconst imageDoc = parseFromString(imageData);\n\t\treturn imageDoc.querySelector('svg');\n\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t} catch (e: unknown) {\n\t\treturn null;\n\t}\n};\n","import getSvgElement from './getSvgElement';\n\nexport default (imageData: string): boolean => {\n\tconst svgElement = getSvgElement(imageData);\n\treturn !!svgElement && !!svgElement.style;\n};\n","import {Component} from 'react';\nimport Highcharts from 'highcharts';\nimport HighchartsReact from 'highcharts-react-official';\nimport {isEqual} from 'lodash';\n\nfunction createTooltip(header: string, name: string, value: number | string) {\n\treturn `<div>${header}</div><div>${name}: <strong>${value}</strong></div>`;\n}\n\nconst initialOptions: Record<string, any> = {\n\tglobal: {\n\t\tuseUTC: false\n\t},\n\tchart: {\n\t\tstyle: {\n\t\t\tfontFamily: 'arial'\n\t\t},\n\t\tplotBackgroundColor: null,\n\t\tplotBorderWidth: 0,\n\t\tplotShadow: false\n\t},\n\tcredits: {\n\t\tenabled: false\n\t},\n\tlegend: {\n\t\talign: 'right',\n\t\tverticalAlign: 'center',\n\t\tlayout: 'vertical'\n\t},\n\ttitle: {\n\t\tuseHTML: true\n\t},\n\tplotOptions: {\n\t\tpie: {\n\t\t\tdataLabels: {\n\t\t\t\tenabled: false\n\t\t\t},\n\t\t\tshowInLegend: true,\n\t\t\tstartAngle: -90,\n\t\t\tendAngle: 270\n\t\t}\n\t},\n\ttooltip: {\n\t\tuseHTML: true,\n\n\t\tformatter() {\n\t\t\treturn createTooltip('', this.point.name, this.point.y);\n\t\t}\n\t},\n\txAxis: {\n\t\ttype: 'category'\n\t},\n\tyAxis: {\n\t\tmin: 0,\n\t\ttitle: {\n\t\t\ttext: ''\n\t\t}\n\t},\n\toptions: {\n\t\tlgo: 123\n\t}\n};\n\ntype Item = {\n\tlabel: string;\n\tvalue: number;\n};\n\nexport type Props = {\n\t/** 'pie' | 'column'*/\n\ttype: 'pie' | 'column';\n\n\t/** title displayed above the chart*/\n\ttitle?: string;\n\n\t/** tooltip title displayed when the chart item is hovered */\n\ttooltipTitle?: string;\n\n\t/** array of pairs {label, value} displayed in chart */\n\titems: Array<Item>;\n\n\t/** Optional function allowing to set custom value formatter */\n\tvalueFormatter?: (value: number) => string;\n\n\t/** Optional click handler */\n\tonClick?: (index: number) => void;\n\n\t/** @ignore */\n\tclassName?: string;\n\n\t/** Optional function allowing to modify highcharts configuration */\n\tupdateOptions?: (options: Record<string, any>) => Record<string, any>;\n};\n\nconst getClickConfiguration = (onClick: ((index: number) => void) | null | undefined) => {\n\treturn onClick\n\t\t? {\n\t\t\t\tseries: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tpoint: {\n\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\tclick: function () {\n\t\t\t\t\t\t\t\tonClick(this.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} as Record<string, any>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t: {};\n};\n\n/**\n * Displays the provided data in form of the column chart or pie chart.\n */\nexport default class Chart extends Component<Props, Record<string, any>> {\n\tstate: Record<string, any> = {};\n\tchart: any = null;\n\tro: ResizeObserver | null | undefined = null;\n\n\tcomponentDidMount() {\n\t\tconst {type, title, items, tooltipTitle, valueFormatter, onClick} = this.props;\n\t\tthis.setState({\n\t\t\t...initialOptions,\n\t\t\tplotOptions: {...initialOptions.plotOptions, ...getClickConfiguration(onClick)},\n\t\t\ttooltip: {\n\t\t\t\t...initialOptions.tooltip,\n\n\t\t\t\tformatter() {\n\t\t\t\t\tconst format = valueFormatter || ((value) => value);\n\n\t\t\t\t\treturn createTooltip(tooltipTitle || '', this.point.name, format(this.point.y));\n\t\t\t\t}\n\t\t\t},\n\t\t\tlegend: {...initialOptions.legend, enabled: type === 'pie'},\n\t\t\tyAxis: {\n\t\t\t\t...initialOptions.yAxis,\n\t\t\t\tenabled: type === 'column',\n\t\t\t\ttitle: {\n\t\t\t\t\ttext: title || ''\n\t\t\t\t}\n\t\t\t},\n\t\t\tseries: [\n\t\t\t\t{\n\t\t\t\t\ttype,\n\t\t\t\t\tinnerSize: '50%',\n\t\t\t\t\tdata: items.map(({label, value}) => [label, value])\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t\t// Workaround of a bug: title must be set in the next cycle of the events loop to be positioned correctly.\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\ttitle: {...initialOptions.title, text: type === 'column' ? '' : title || ''}\n\t\t\t});\n\t\t}, 0);\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tconst {type, title, items, tooltipTitle, valueFormatter, onClick} = this.props;\n\n\t\tif (title !== prevProps.title) {\n\t\t\tthis.setState({\n\t\t\t\ttitle: {...this.state.title, text: type === 'column' ? '' : title || ''},\n\t\t\t\tyAxis: {\n\t\t\t\t\t...this.state.yAxis,\n\t\t\t\t\ttitle: {\n\t\t\t\t\t\ttext: title || ''\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (type !== prevProps.type) {\n\t\t\tthis.setState({\n\t\t\t\tlegend: {...this.state.legend, enabled: type === 'pie'},\n\t\t\t\ttitle: {\n\t\t\t\t\ttext: type === 'column' ? '' : title || ''\n\t\t\t\t},\n\t\t\t\tyAxis: {\n\t\t\t\t\t...this.state.yAxis,\n\t\t\t\t\tenabled: type === 'column',\n\t\t\t\t\ttitle: {\n\t\t\t\t\t\ttext: type === 'column' ? title || '' : ''\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tseries: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype,\n\t\t\t\t\t\tinnerSize: '50%',\n\t\t\t\t\t\tdata: items.map(({label, value}) => [label, value])\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t}\n\n\t\tif (!isEqual(items, prevProps.items)) {\n\t\t\tthis.setState({\n\t\t\t\tseries: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype,\n\t\t\t\t\t\tinnerSize: '50%',\n\t\t\t\t\t\tdata: items.map(({label, value}) => [label, value])\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t}\n\n\t\tif (\n\t\t\ttooltipTitle !== prevProps.tooltipTitle ||\n\t\t\tvalueFormatter !== prevProps.valueFormatter ||\n\t\t\tonClick !== prevProps.onClick\n\t\t) {\n\t\t\tthis.setState({\n\t\t\t\ttooltip: {\n\t\t\t\t\t...initialOptions.tooltip,\n\n\t\t\t\t\tformatter() {\n\t\t\t\t\t\tconst format = valueFormatter || ((value) => value);\n\n\t\t\t\t\t\treturn createTooltip(tooltipTitle || '', this.point.name, format(this.point.y));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tplotOptions: {...initialOptions.plotOptions, ...getClickConfiguration(onClick)}\n\t\t\t});\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.ro && this.chart?.renderTo) {\n\t\t\tthis.ro.unobserve(this.chart.renderTo);\n\t\t}\n\t\tthis.chart = null;\n\t\tthis.ro = null;\n\t}\n\n\thandleChart = (chart: any) => {\n\t\tthis.chart = chart;\n\t\tthis.ro = new ResizeObserver(() => {\n\t\t\tthis.chart?.reflow();\n\t\t});\n\t\tthis.ro.observe(this.chart.renderTo);\n\t};\n\n\trender() {\n\t\tconst options = this.props.updateOptions ? this.props.updateOptions(this.state) : this.state;\n\t\treturn (\n\t\t\t<HighchartsReact\n\t\t\t\thighcharts={Highcharts}\n\t\t\t\toptions={options}\n\t\t\t\tcontainerProps={{\n\t\t\t\t\tclassName: this.props.className\n\t\t\t\t}}\n\t\t\t\tcallback={this.handleChart}\n\t\t\t/>\n\t\t);\n\t}\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nlet raf = callback => +setTimeout(callback, 16);\nlet caf = num => clearTimeout(num);\nif (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {\n raf = callback => window.requestAnimationFrame(callback);\n caf = handle => window.cancelAnimationFrame(handle);\n}\nlet rafUUID = 0;\nconst rafIds = new Map();\nfunction cleanup(id) {\n rafIds.delete(id);\n}\nconst wrapperRaf = (callback, times = 1) => {\n rafUUID += 1;\n const id = rafUUID;\n function callRef(leftTimes) {\n if (leftTimes === 0) {\n // Clean up\n cleanup(id);\n\n // Trigger\n callback();\n } else {\n // Next raf\n const realId = raf(() => {\n callRef(leftTimes - 1);\n });\n\n // Bind real raf id\n rafIds.set(id, realId);\n }\n }\n callRef(times);\n return id;\n};\nwrapperRaf.cancel = id => {\n const realId = rafIds.get(id);\n cleanup(id);\n return caf(realId);\n};\nif (process.env.NODE_ENV !== 'production') {\n wrapperRaf.ids = () => rafIds;\n}\nvar _default = exports.default = wrapperRaf;","import {useRef, useEffect, ComponentType, FC, ReactElement, ReactNode} from 'react';\nimport type {SliderProps} from '@rc-component/slider';\nimport raf from '@rc-component/util/lib/raf';\nimport Slider from '@rc-component/slider';\nimport type {TooltipRef} from '@rc-component/tooltip';\nimport Tooltip from '@rc-component/tooltip';\n\ninterface HandleTooltipProps {\n\tvalue: number;\n\tchildren: ReactElement;\n\tvisible: boolean;\n\ttipFormatter?: (value: number) => ReactNode;\n}\n\nconst HandleTooltip: FC<HandleTooltipProps> = (props) => {\n\tconst {value, children, visible, tipFormatter = (val) => `${val}`, ...restProps} = props;\n\n\tconst tooltipRef = useRef<TooltipRef | null>(null);\n\tconst rafRef = useRef<number | null>(null);\n\n\tfunction cancelKeepAlign() {\n\t\tif (rafRef.current) {\n\t\t\traf.cancel(rafRef.current);\n\t\t}\n\t}\n\n\tfunction keepAlign() {\n\t\trafRef.current = raf(() => {\n\t\t\ttooltipRef.current?.forceAlign();\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (visible) {\n\t\t\tkeepAlign();\n\t\t} else {\n\t\t\tcancelKeepAlign();\n\t\t}\n\n\t\treturn cancelKeepAlign;\n\t}, [value, visible]);\n\n\treturn (\n\t\t<Tooltip\n\t\t\tplacement=\"top\"\n\t\t\toverlay={tipFormatter(value)}\n\t\t\tref={tooltipRef}\n\t\t\talign={{offset: [0, -10]}}\n\t\t\tvisible={visible}\n\t\t\t{...restProps}\n\t\t>\n\t\t\t{children}\n\t\t</Tooltip>\n\t);\n};\n\nexport const handleRender: SliderProps['handleRender'] = (node, props) => (\n\t<HandleTooltip value={props.value} visible={props.dragging}>\n\t\t{node}\n\t</HandleTooltip>\n);\n\ninterface TooltipSliderProps extends SliderProps {\n\ttipFormatter?: (value: number) => ReactNode;\n\ttipProps?: ComponentType<typeof Tooltip>;\n}\n\nconst TooltipSlider: FC<TooltipSliderProps> = ({tipFormatter, tipProps, ...props}) => {\n\tconst tipHandleRender: SliderProps['handleRender'] = (node, handleProps) => (\n\t\t<HandleTooltip\n\t\t\tvalue={handleProps.value}\n\t\t\tvisible={handleProps.dragging}\n\t\t\ttipFormatter={tipFormatter}\n\t\t\t{...tipProps}\n\t\t>\n\t\t\t{node}\n\t\t</HandleTooltip>\n\t);\n\n\treturn <Slider {...props} handleRender={tipHandleRender} />;\n};\n\nexport default TooltipSlider;\n","import {useCallback, useEffect, useState} from 'react';\n\nexport default function useLimitStyling(limit: number | undefined, min: number, max: number) {\n\tconst [slider, setSlider] = useState<HTMLDivElement | null>(null);\n\n\tuseEffect(() => {\n\t\tif (slider) {\n\t\t\tconst containerEl = slider.querySelector('.rc-slider-rail');\n\t\t\tif (!containerEl) throw new Error('.rc-slider-rail element missing');\n\t\t\tconst disabledAreaEl = containerEl?.querySelector(`.disabled-area-element`) as HTMLDivElement;\n\t\t\tconst sliderWidth = containerEl.getBoundingClientRect().width;\n\n\t\t\tif (disabledAreaEl) {\n\t\t\t\tif (limit == null) {\n\t\t\t\t\tdisabledAreaEl.remove();\n\t\t\t\t} else {\n\t\t\t\t\tconst width = Math.round(((max - limit) / (max - min)) * sliderWidth);\n\t\t\t\t\tdisabledAreaEl.style.width = `${width}px`;\n\t\t\t\t}\n\t\t\t} else if (limit != null) {\n\t\t\t\tconst width = Math.round(((max - limit) / (max - min)) * sliderWidth);\n\t\t\t\tconst disabledAreaEl = document.createElement('div');\n\t\t\t\tdisabledAreaEl.classList.add('disabled-area-element');\n\t\t\t\tdisabledAreaEl.style.width = `${width}px`;\n\t\t\t\tcontainerEl.appendChild(disabledAreaEl);\n\t\t\t}\n\t\t}\n\t}, [limit, slider, min, max]);\n\n\tconst updateLimitAreaSize = useCallback(() => {\n\t\tif (slider && limit != null) {\n\t\t\tconst containerEl = slider.querySelector('.rc-slider-rail');\n\t\t\tif (!containerEl) throw new Error('.rc-slider-rail element missing');\n\t\t\tconst disabledAreaEl = containerEl?.querySelector(`.disabled-area-element`) as HTMLDivElement;\n\t\t\tconst sliderWidth = containerEl.getBoundingClientRect().width;\n\t\t\tif (disabledAreaEl) {\n\t\t\t\tconst width = Math.round(((max - limit) / (max - min)) * sliderWidth);\n\t\t\t\tdisabledAreaEl.style.width = `${width}px`;\n\t\t\t}\n\t\t}\n\t}, [limit, max, min, slider]);\n\n\tuseEffect(() => {\n\t\tif (slider) {\n\t\t\tconst resizeObserver = new ResizeObserver(() => updateLimitAreaSize());\n\n\t\t\tresizeObserver.observe(slider);\n\t\t}\n\t}, [slider, updateLimitAreaSize]);\n\n\treturn setSlider;\n}\n","import RcSlider from '@rc-component/slider';\nimport RcSliderWithTooltip from './RcSliderWithTooltip';\n\nimport useLimitStyling from './useLimitStyling';\n\nexport type Props = {\n\t/** minimum value the slider renders */\n\tmin: number;\n\n\t/** maximum value the slider renders */\n\tmax: number;\n\n\t/** step in which increments/decrements have to be made */\n\tstep?: number;\n\n\t/** current value of the slider */\n\tvalue: number;\n\n\t/** show or hide tooltip (default: true) */\n\ttooltip?: boolean;\n\n\t/** object containing key-value pairs to label the slider */\n\tlabels?: Record<string, number | string>;\n\n\t/** formats the value in label or tooltip */\n\tformat?: (value: number) => string;\n\n\t/** gets called whenever the slider handle is being dragged or clicked */\n\tonChange?: (value: number) => void;\n\n\t/** gets called whenever the user stops dragging the slider handle */\n\tonChangeComplete?: (value: number) => void;\n\n\t/** maximum value the slider can hold */\n\tlimit?: number;\n};\n\n/**\n * Enables picking the desired value from a specified range.\n * Can have a tooltip and labels\n */\nconst Slider = ({min, max, step, value, tooltip = true, labels, format, onChange, onChangeComplete, limit}: Props) => {\n\tconst setSliderRef = useLimitStyling(limit, min, max);\n\n\tconst handleChange = (value: number | number[]) => {\n\t\tif (!onChange) return;\n\t\tconst numericValue = typeof value === 'number' ? value : value[0];\n\t\tconst allowedValue = limit != null ? Math.min(numericValue, limit) : numericValue;\n\t\tonChange(allowedValue);\n\t};\n\n\tconst handleChangeComplete = () => {\n\t\tif (!onChangeComplete) {\n\t\t\treturn;\n\t\t}\n\t\tonChangeComplete(value);\n\t};\n\n\tconst basicProps = {\n\t\tmin,\n\t\tmax,\n\t\tstep,\n\t\tvalue,\n\t\tonChange: handleChange,\n\t\tonChangeComplete: handleChangeComplete,\n\t\tmarks: labels\n\t};\n\n\treturn (\n\t\t<div className=\"di slider\" ref={setSliderRef}>\n\t\t\t{tooltip ? (\n\t\t\t\t<RcSliderWithTooltip {...basicProps} className=\"di slider with-tooltip\" tipFormatter={format} />\n\t\t\t) : (\n\t\t\t\t<RcSlider {...basicProps} className=\"di slider\" />\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default Slider;\n"],"x_google_ignoreList":[17,66],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAI,uBAA+D,CAAC;AAEpE,IAAa,wBAAwB;AAErC,IAAI,0BAAwC,CAAC;AAE7C,IAAI,+BAA6C,EAChD,WAAW,MACZ;;;;;AAMA,IAAa,8BAA8B,YAAgC;CAC1E,0BAA0B;AAC3B;AAEA,IAAa,mCAAmC,YAAgC;CAC/E,+BAA+B;AAChC;AAEA,IAAM,kBAAkB,WAAmB,YAA6B;CACvE,IAAI,WACH,IAAI,qBAAqB,YACxB,qBAAqB,aAAa,CAAC,GAAG,qBAAqB,YAAY,OAAO;MAE9E,qBAAqB,aAAa,CAAC,OAAO;AAG7C;AAEA,IAAa,qBAAqB,SAAuB,SAAwB,cAA6B;CAC7G,MAAM,UAAU,wBAAA,MAAM,QAAQ,SAAS;EAAC,GAAG;EAAyB,GAAG;CAAO,CAAC;CAC/E,IAAI,WAAW,eAAe,WAAW,OAAO;AACjD;AAEA,IAAa,kBAA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