@crystaldesign/diva-navigator 26.6.0-beta.9 → 26.6.0-rc.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/build/esm/index.js +651 -136
- package/build/types/navigator/src/DropdownContainer/index.d.ts +12 -0
- package/build/types/navigator/src/DropdownContainer/index.d.ts.map +1 -0
- package/build/types/navigator/src/Header/Notifications/Dropdown.d.ts +13 -0
- package/build/types/navigator/src/Header/Notifications/Dropdown.d.ts.map +1 -0
- package/build/types/navigator/src/Header/Notifications/PopupContent.d.ts +8 -0
- package/build/types/navigator/src/Header/Notifications/PopupContent.d.ts.map +1 -0
- package/build/types/navigator/src/Header/Notifications/api.d.ts +15 -0
- package/build/types/navigator/src/Header/Notifications/api.d.ts.map +1 -0
- package/build/types/navigator/src/Header/Notifications/index.d.ts +8 -0
- package/build/types/navigator/src/Header/Notifications/index.d.ts.map +1 -0
- package/build/types/navigator/src/Header/Notifications/stateUtils.d.ts +6 -0
- package/build/types/navigator/src/Header/Notifications/stateUtils.d.ts.map +1 -0
- package/build/types/navigator/src/Header/Notifications/types.d.ts +19 -0
- package/build/types/navigator/src/Header/Notifications/types.d.ts.map +1 -0
- package/build/types/navigator/src/Header/Notifications/useNotifications.d.ts +16 -0
- package/build/types/navigator/src/Header/Notifications/useNotifications.d.ts.map +1 -0
- package/build/types/navigator/src/Header/index.d.ts.map +1 -1
- package/build/types/navigator/src/Profil/index.d.ts.map +1 -1
- package/build/types/navigator/src/tests/unit/Header/Notifications/api.test.d.ts +2 -0
- package/build/types/navigator/src/tests/unit/Header/Notifications/api.test.d.ts.map +1 -0
- package/build/types/navigator/src/tests/unit/Header/Notifications/index.test.d.ts +2 -0
- package/build/types/navigator/src/tests/unit/Header/Notifications/index.test.d.ts.map +1 -0
- package/build/types/navigator/src/tests/unit/Header/Notifications/stateUtils.test.d.ts +2 -0
- package/build/types/navigator/src/tests/unit/Header/Notifications/stateUtils.test.d.ts.map +1 -0
- package/package.json +2 -2
package/build/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useRef, useEffect, useState, Fragment, useReducer, useCallback,
|
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { useTranslation, useDivaCore, getLogger } from '@crystaldesign/diva-core';
|
|
5
|
+
import { useTranslation, useDivaCore, DivaUtils, getLogger } from '@crystaldesign/diva-core';
|
|
6
6
|
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
7
7
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
@@ -10,9 +10,18 @@ import Fuse from 'fuse.js';
|
|
|
10
10
|
import Switch from 'react-switch';
|
|
11
11
|
import Dropdown from 'react-dropdown';
|
|
12
12
|
import { md5 } from '@crystaldesign/diva-utils';
|
|
13
|
+
import Badge from '@mui/material/Badge';
|
|
14
|
+
import NotificationsNoneIcon from '@mui/icons-material/NotificationsNone';
|
|
15
|
+
import { Alert, CircularProgress, Button as Button$1, Stack, Paper, Typography, Divider, TextField } from '@mui/material';
|
|
16
|
+
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
13
17
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
14
18
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
15
|
-
import
|
|
19
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
20
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
21
|
+
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
22
|
+
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
23
|
+
import _inherits from '@babel/runtime/helpers/inherits';
|
|
24
|
+
import _wrapNativeSuper from '@babel/runtime/helpers/wrapNativeSuper';
|
|
16
25
|
import SearchIcon from '@mui/icons-material/Search';
|
|
17
26
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
18
27
|
import { Html5Qrcode } from 'html5-qrcode';
|
|
@@ -65,8 +74,8 @@ var headerWrapperRight = "header-wrapper-right-zLaAR";
|
|
|
65
74
|
var hide = "hide-1DmsJ";
|
|
66
75
|
var breadcrumbsWrapper = "breadcrumbs-wrapper-nqYkU";
|
|
67
76
|
var customArea = "custom-area-FLAOC";
|
|
68
|
-
var css_248z$
|
|
69
|
-
styleInject(css_248z$
|
|
77
|
+
var css_248z$r = ".header-bLyVg {\n background-color: white;\n color: #333333;\n height: -moz-fit-content;\n height: fit-content;\n width: 100%;\n position: relative;\n box-shadow: 0px 1px 4px 0px rgba(51, 51, 51, 1);\n font-family: var(--diva-typography-font-family);\n transition: height ease-in-out 1s;\n z-index: 2;\n display: flex;\n flex-direction: column;\n}\n\n.header-wrapper-BPUbF {\n width: 100%;\n height: 60px;\n position: relative;\n display: flex;\n justify-content: flex-start;\n z-index: 1;\n}\n\n.header-wrapper-left-qxYUn {\n display: flex;\n z-index: 1;\n}\n\n.header-wrapper-right-zLaAR {\n display: flex;\n flex: 1 1 250px;\n max-width: -moz-max-content;\n max-width: max-content;\n justify-content: flex-end;\n height: 100%;\n align-items: center;\n overflow: visible;\n right: 0;\n background-color: #fff;\n z-index: 10;\n margin-left: auto;\n flex-basis: fit-content;\n}\n\n.darkmode .header-wrapper-right-zLaAR {\n background-color: transparent;\n background-color: initial;\n}\n\n.hide-1DmsJ {\n height: 0;\n transition: height ease-in-out 1s;\n}\n\n.breadcrumbs-wrapper-nqYkU {\n width: 100%;\n height: 30px;\n position: relative;\n border-top: 1px solid #f2f2f2;\n}\n\n.selected-z3Uht {\n transform: scale(1.1);\n color: var(--diva-theme-palette-primary-main);\n}\n.custom-area-FLAOC {\n margin: 8px;\n height: 46px;\n overflow: auto;\n}\n";
|
|
78
|
+
styleInject(css_248z$r);
|
|
70
79
|
|
|
71
80
|
var scroller = "scroller-QE6K3";
|
|
72
81
|
var buttonsWrapper$1 = "buttons-wrapper-dzIfw";
|
|
@@ -74,14 +83,14 @@ var scrollButton = "scroll-button-xk93p";
|
|
|
74
83
|
var hidden$1 = "hidden-3Ovst";
|
|
75
84
|
var left = "left-9-Upj";
|
|
76
85
|
var right = "right-D4x14";
|
|
77
|
-
var css_248z$
|
|
78
|
-
styleInject(css_248z$
|
|
86
|
+
var css_248z$q = ".scroller-QE6K3 {\n overflow: auto;\n display: flex;\n align-items: center;\n position: relative;\n flex-shrink: 100;\n}\n\n.buttons-wrapper-dzIfw {\n display: flex;\n height: 100%;\n position: relative;\n overflow: auto;\n\n /* Hide scrollbar for IE, Edge and Firefox */\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n/* Hide scrollbar for Chrome, Safari and Opera */\n.buttons-wrapper-dzIfw::-webkit-scrollbar {\n display: none;\n}\n\n.scroll-button-xk93p {\n width: 30px;\n height: 40px;\n z-index: 6;\n background-size: 100%;\n background-position: right;\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2225%22 height%3D%2224%22 viewBox%3D%220 0 25 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M10.5 7L15.5 12L10.5 17%22 stroke%3D%22%234F4F4F%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"),\n linear-gradient(270deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 72%, rgba(255, 255, 255, 0) 100%);\n background-repeat: no-repeat;\n cursor: pointer;\n opacity: 1;\n transition: ease 0.2s;\n}\n\n.scroll-button-xk93p.hidden-3Ovst {\n opacity: 0;\n z-index: 0;\n}\n\n.scroll-button-xk93p.left-9-Upj {\n position: absolute;\n left: 0;\n transform: rotate(180deg);\n}\n.scroll-button-xk93p.right-D4x14 {\n position: absolute;\n right: 0;\n}\n";
|
|
87
|
+
styleInject(css_248z$q);
|
|
79
88
|
|
|
80
89
|
var button$2 = "button-UoHey";
|
|
81
90
|
var selected$4 = "selected-VKkY8";
|
|
82
91
|
var link$2 = "link-mn-o6";
|
|
83
|
-
var css_248z$
|
|
84
|
-
styleInject(css_248z$
|
|
92
|
+
var css_248z$p = ".button-UoHey {\n position: relative;\n cursor: pointer;\n padding: 20px 16px;\n text-transform: uppercase;\n font-weight: 700;\n font-size: 14px;\n line-height: 20px;\n transition: color 0.3s ease, border 0.3s ease;\n letter-spacing: 0.1rem;\n text-wrap: nowrap;\n white-space: nowrap;\n}\n\n.button-UoHey:hover,\n.selected-VKkY8 {\n border: none;\n color: var(--diva-theme-palette-primary-main);\n}\n\n.link-mn-o6 {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 1;\n}\n\n.button-UoHey::after {\n content: '';\n position: absolute;\n width: 0px;\n height: 2px;\n left: 50%;\n bottom: 0;\n background-color: var(--diva-theme-palette-primary-main);\n transition: all ease-in-out 0.2s;\n}\n.button-UoHey:hover::after,\n.selected-VKkY8::after {\n width: 100%;\n left: 0;\n}\n";
|
|
93
|
+
styleInject(css_248z$p);
|
|
85
94
|
|
|
86
95
|
var Button = function Button(_ref) {
|
|
87
96
|
var b = _ref.b,
|
|
@@ -228,8 +237,8 @@ var breadcrumb = "breadcrumb-03kGg";
|
|
|
228
237
|
var splitter = "splitter-blALw";
|
|
229
238
|
var selected$3 = "selected-M8GAh";
|
|
230
239
|
var greetingsTextClass = "greetings-text-class-74-so";
|
|
231
|
-
var css_248z$
|
|
232
|
-
styleInject(css_248z$
|
|
240
|
+
var css_248z$o = ".buttons-wrapper-ypwVh {\n display: flex;\n align-items: center;\n height: 100%;\n gap: 6px;\n margin-left: 24px;\n color: #4f4f4f;\n}\n.breadcrumb-03kGg {\n cursor: pointer;\n font-size: small;\n}\n\n.splitter-blALw:first-of-type {\n display: none;\n}\n\n.splitter-blALw {\n display: inline-block;\n width: 20px;\n height: 20px;\n background: center / 80% no-repeat url(\"data:image/svg+xml,%3Csvg width%3D%2212%22 height%3D%2212%22 viewBox%3D%220 0 12 12%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M5 3.5L7.5 6L5 8.5%22 stroke%3D%22%237B7B7B%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.breadcrumb-03kGg:hover {\n transform: scale(1.1);\n color: var(--diva-theme-palette-primary-main);\n text-decoration: underline;\n transition: all 200ms;\n}\n\n.breadcrumb-03kGg.selected-M8GAh {\n color: var(--diva-theme-palette-primary-main);\n text-decoration: underline;\n}\n\n.greetings-text-class-74-so {\n position: absolute;\n right: 16px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n letter-spacing: 1px;\n font-size: 16px;\n}\n";
|
|
241
|
+
styleInject(css_248z$o);
|
|
233
242
|
|
|
234
243
|
function Breadcrumbs () {
|
|
235
244
|
var _useDivaCore = useDivaCore(),
|
|
@@ -266,20 +275,47 @@ function Breadcrumbs () {
|
|
|
266
275
|
});
|
|
267
276
|
}
|
|
268
277
|
|
|
269
|
-
var dropdown$1 = "dropdown-4pRVs";
|
|
270
278
|
var selector = "selector-zu-gI";
|
|
271
279
|
var section = "section--hy0j";
|
|
272
280
|
var selected$2 = "selected-KQjvM";
|
|
273
281
|
var item$1 = "item-6aqaG";
|
|
274
282
|
var expanderClosed = "expander-closed-Wnhtx";
|
|
275
283
|
var expanderOpen = "expander-open-py2FE";
|
|
276
|
-
var open = "open--KKW8";
|
|
284
|
+
var open$1 = "open--KKW8";
|
|
277
285
|
var languageClosed = "language-closed-2KjG0";
|
|
278
|
-
var css_248z$
|
|
279
|
-
styleInject(css_248z$
|
|
286
|
+
var css_248z$n = ".selector-zu-gI {\n display: flex;\n flex-direction: column;\n transition: max-height ease-in-out 0.3s;\n line-height: 30px;\n overflow: hidden;\n}\n\n.selector-zu-gI .MuiFormControl-root {\n margin-left: 25px;\n margin-top: 0;\n width: 223px;\n}\n\n.selector-zu-gI .MuiInputBase-root {\n font-size: small;\n margin-top: 0;\n}\n\n.section--hy0j {\n padding: 14px 22px;\n border-bottom: solid white 1px;\n}\n\n.selected-KQjvM {\n font-weight: 300;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 30px;\n flex-shrink: 0;\n}\n.selected-KQjvM::before {\n width: 12px !important;\n}\n.selected-KQjvM::before {\n content: '';\n background: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 19.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3Csvg version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 viewBox%3D%220 0 426.667 426.667%22 style%3D%22enable-background%3Anew 0 0 426.667 426.667%3B%22 xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cpath d%3D%22M421.876%2C56.307c-6.548-6.78-17.352-6.968-24.132-0.42c-0.142%2C0.137-0.282%2C0.277-0.42%2C0.42L119.257%2C334.375%09%09%09l-90.334-90.334c-6.78-6.548-17.584-6.36-24.132%2C0.42c-6.388%2C6.614-6.388%2C17.099%2C0%2C23.713l102.4%2C102.4%09%09%09c6.665%2C6.663%2C17.468%2C6.663%2C24.132%2C0L421.456%2C80.44C428.236%2C73.891%2C428.424%2C63.087%2C421.876%2C56.307z%22%2F%3E%09%3C%2Fg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat center;\n display: block;\n height: 12px;\n margin: 8px 6px 0 6px;\n float: left;\n}\n\n.item-6aqaG::before {\n content: '';\n display: block;\n width: 26px;\n height: 12px;\n float: left;\n}\n\n.expander-closed-Wnhtx::after {\n background: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 19.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3Csvg version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 viewBox%3D%220 0 490.688 490.688%22 style%3D%22enable-background%3Anew 0 0 490.688 490.688%3B%22 xml%3Aspace%3D%22preserve%22%3E%3Cpath style%3D%22fill%3A%23FFC107%3B%22 d%3D%22M472.328%2C120.529L245.213%2C347.665L18.098%2C120.529c-4.237-4.093-10.99-3.975-15.083%2C0.262%09c-3.992%2C4.134-3.992%2C10.687%2C0%2C14.82l234.667%2C234.667c4.165%2C4.164%2C10.917%2C4.164%2C15.083%2C0l234.667-234.667%09c4.237-4.093%2C4.354-10.845%2C0.262-15.083c-4.093-4.237-10.845-4.354-15.083-0.262c-0.089%2C0.086-0.176%2C0.173-0.262%2C0.262%09L472.328%2C120.529z%22%2F%3E%3Cpath d%3D%22M245.213%2C373.415c-2.831%2C0.005-5.548-1.115-7.552-3.115L2.994%2C135.633c-4.093-4.237-3.975-10.99%2C0.262-15.083%09c4.134-3.992%2C10.687-3.992%2C14.82%2C0l227.136%2C227.115l227.115-227.136c4.093-4.237%2C10.845-4.354%2C15.083-0.262%09c4.237%2C4.093%2C4.354%2C10.845%2C0.262%2C15.083c-0.086%2C0.089-0.173%2C0.176-0.262%2C0.262L252.744%2C370.279%09C250.748%2C372.281%2C248.039%2C373.408%2C245.213%2C373.415z%22%2F%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat center;\n content: '';\n display: block;\n width: 10px;\n height: 10px;\n float: right;\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n}\n.expander-open-py2FE::after {\n background: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 19.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3Csvg version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 viewBox%3D%220 0 490.523 490.523%22 style%3D%22enable-background%3Anew 0 0 490.523 490.523%3B%22 xml%3Aspace%3D%22preserve%22%3E%3Cpath style%3D%22fill%3A%23FFC107%3B%22 d%3D%22M487.411%2C355.047L252.744%2C120.38c-4.165-4.164-10.917-4.164-15.083%2C0L2.994%2C355.047%09c-4.093%2C4.237-3.976%2C10.99%2C0.262%2C15.083c4.134%2C3.993%2C10.687%2C3.993%2C14.821%2C0l227.115-227.115l227.115%2C227.136%09c4.237%2C4.093%2C10.99%2C3.976%2C15.083-0.261c3.993-4.134%2C3.993-10.688%2C0-14.821L487.411%2C355.047z%22%2F%3E%3Cpath d%3D%22M479.859%2C373.266c-2.831%2C0.005-5.548-1.115-7.552-3.115L245.192%2C143.015L18.077%2C370.151%09c-4.237%2C4.093-10.99%2C3.976-15.083-0.262c-3.993-4.134-3.993-10.687%2C0-14.821l234.667-234.667c4.165-4.164%2C10.917-4.164%2C15.083%2C0%09l234.667%2C234.667c4.159%2C4.172%2C4.148%2C10.926-0.024%2C15.085C485.388%2C372.146%2C482.681%2C373.265%2C479.859%2C373.266z%22%2F%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat center;\n content: '';\n display: block;\n width: 10px;\n height: 10px;\n float: right;\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n}\n\n@keyframes hide-scroll-2yXs9 {\n from,\n to {\n overflow: hidden;\n }\n}\n\n.list--32wO {\n flex: 1;\n overflow: hidden;\n scrollbar-width: thin;\n}\n\n.list--32wO::-webkit-scrollbar {\n width: 5px;\n}\n.list--32wO::-webkit-scrollbar-track {\n background: #dfdfdf;\n border-radius: 3px;\n}\n.list--32wO::-webkit-scrollbar-thumb {\n background: #b1b1b1;\n border-radius: 3px;\n}\n\n.open--KKW8 .list--32wO {\n overflow: auto;\n}\n\n.language-closed-2KjG0 {\n transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n max-height: 0;\n}\n\n.searchDiv-PFCFg:hover + .hide-ad3Ar {\n display: block;\n}\n\n.hide-ad3Ar {\n display: none;\n}\n";
|
|
287
|
+
styleInject(css_248z$n);
|
|
280
288
|
|
|
281
|
-
|
|
282
|
-
|
|
289
|
+
var dropdown$1 = "dropdown-NjdqX";
|
|
290
|
+
var open = "open-NBiGR";
|
|
291
|
+
var css_248z$m = ".dropdown-NjdqX {\n background-color: #f2f2f2;\n color: #333333;\n width: 400px;\n position: absolute;\n box-shadow: 0px 2px 6px 0px rgba(51, 51, 51, 0.4);\n right: 2px;\n font-size: small;\n font-family: var(--diva-typography-font-family);\n transition: max-height 0.25s ease-in-out;\n max-height: 0px;\n z-index: 20;\n overflow: hidden;\n scrollbar-width: none;\n}\n\n.dropdown-NjdqX::-webkit-scrollbar {\n display: none;\n}\n\n.open-NBiGR {\n overflow: auto;\n}\n";
|
|
292
|
+
styleInject(css_248z$m);
|
|
293
|
+
|
|
294
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
295
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
296
|
+
function DropdownContainer(_ref) {
|
|
297
|
+
var open$1 = _ref.open,
|
|
298
|
+
maxHeight = _ref.maxHeight,
|
|
299
|
+
top = _ref.top,
|
|
300
|
+
right = _ref.right,
|
|
301
|
+
className = _ref.className,
|
|
302
|
+
style = _ref.style,
|
|
303
|
+
children = _ref.children;
|
|
304
|
+
return /*#__PURE__*/jsx("div", {
|
|
305
|
+
className: classNames(dropdown$1, open$1 && open, className),
|
|
306
|
+
style: _objectSpread$7(_objectSpread$7(_objectSpread$7({}, top !== undefined && {
|
|
307
|
+
top: top
|
|
308
|
+
}), right !== undefined && {
|
|
309
|
+
right: right
|
|
310
|
+
}), {}, {
|
|
311
|
+
maxHeight: open$1 ? maxHeight : 0
|
|
312
|
+
}, style),
|
|
313
|
+
children: children
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
318
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
283
319
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
284
320
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
|
|
285
321
|
function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -402,7 +438,7 @@ function sortTree(nodes, selectedPath, effectiveScores) {
|
|
|
402
438
|
return 0;
|
|
403
439
|
});
|
|
404
440
|
return sorted.map(function (node) {
|
|
405
|
-
return node.children ? _objectSpread$
|
|
441
|
+
return node.children ? _objectSpread$6(_objectSpread$6({}, node), {}, {
|
|
406
442
|
children: sortTree(node.children, selectedPath, effectiveScores)
|
|
407
443
|
}) : node;
|
|
408
444
|
});
|
|
@@ -428,8 +464,8 @@ function collectTypes(nodes) {
|
|
|
428
464
|
return Array.from(types);
|
|
429
465
|
}
|
|
430
466
|
|
|
431
|
-
function ownKeys$
|
|
432
|
-
function _objectSpread$
|
|
467
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
468
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
433
469
|
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
434
470
|
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
|
|
435
471
|
function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -456,7 +492,7 @@ function treeReducer(state, action) {
|
|
|
456
492
|
}
|
|
457
493
|
}
|
|
458
494
|
}
|
|
459
|
-
return _objectSpread$
|
|
495
|
+
return _objectSpread$5(_objectSpread$5({}, state), {}, {
|
|
460
496
|
tree: action.tree,
|
|
461
497
|
totalAccessible: action.totalAccessible,
|
|
462
498
|
selectedId: action.selectedId,
|
|
@@ -480,12 +516,12 @@ function treeReducer(state, action) {
|
|
|
480
516
|
} finally {
|
|
481
517
|
_iterator2.f();
|
|
482
518
|
}
|
|
483
|
-
return _objectSpread$
|
|
519
|
+
return _objectSpread$5(_objectSpread$5({}, state), {}, {
|
|
484
520
|
expandedIds: next
|
|
485
521
|
});
|
|
486
522
|
}
|
|
487
523
|
case 'SELECT':
|
|
488
|
-
return _objectSpread$
|
|
524
|
+
return _objectSpread$5(_objectSpread$5({}, state), {}, {
|
|
489
525
|
selectedId: action.nodeId
|
|
490
526
|
});
|
|
491
527
|
default:
|
|
@@ -565,8 +601,8 @@ function useOrgTree(onSelect) {
|
|
|
565
601
|
};
|
|
566
602
|
}
|
|
567
603
|
|
|
568
|
-
function ownKeys$
|
|
569
|
-
function _objectSpread$
|
|
604
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
605
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
570
606
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
571
607
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
|
|
572
608
|
function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -605,7 +641,7 @@ function annotateSubtree(nodes, matchedIds, matchIndicesMap) {
|
|
|
605
641
|
return nodes.map(function (node) {
|
|
606
642
|
var _matchedIds$has;
|
|
607
643
|
var isMatched = (_matchedIds$has = matchedIds === null || matchedIds === void 0 ? void 0 : matchedIds.has(node._id)) !== null && _matchedIds$has !== void 0 ? _matchedIds$has : false;
|
|
608
|
-
return _objectSpread$
|
|
644
|
+
return _objectSpread$4(_objectSpread$4({}, node), {}, {
|
|
609
645
|
matched: isMatched,
|
|
610
646
|
matchIndices: isMatched ? matchIndicesMap === null || matchIndicesMap === void 0 ? void 0 : matchIndicesMap.get(node._id) : undefined,
|
|
611
647
|
children: node.children ? annotateSubtree(node.children, matchedIds, matchIndicesMap) : undefined
|
|
@@ -628,7 +664,7 @@ function filterTree(nodes, typeFilters, matchedIds, matchIndicesMap) {
|
|
|
628
664
|
var typeOk = typeFilters.size === 0 || typeFilters.has(node.orgType);
|
|
629
665
|
var directMatch = hasTextSearch ? matchedIds.has(node._id) && typeOk : typeFilters.has(node.orgType);
|
|
630
666
|
if (directMatch) {
|
|
631
|
-
result.push(_objectSpread$
|
|
667
|
+
result.push(_objectSpread$4(_objectSpread$4({}, node), {}, {
|
|
632
668
|
matched: true,
|
|
633
669
|
matchIndices: hasTextSearch ? matchIndicesMap.get(node._id) : undefined,
|
|
634
670
|
children: node.children ? annotateSubtree(node.children, hasTextSearch ? matchedIds : undefined, hasTextSearch ? matchIndicesMap : undefined) : undefined
|
|
@@ -636,7 +672,7 @@ function filterTree(nodes, typeFilters, matchedIds, matchIndicesMap) {
|
|
|
636
672
|
} else {
|
|
637
673
|
var filteredChildren = node.children ? filterTree(node.children, typeFilters, matchedIds, matchIndicesMap) : undefined;
|
|
638
674
|
if (filteredChildren && filteredChildren.length > 0) {
|
|
639
|
-
result.push(_objectSpread$
|
|
675
|
+
result.push(_objectSpread$4(_objectSpread$4({}, node), {}, {
|
|
640
676
|
matched: false,
|
|
641
677
|
children: filteredChildren
|
|
642
678
|
}));
|
|
@@ -663,7 +699,7 @@ function filterTreeByTypesOnly(nodes, typeFilters) {
|
|
|
663
699
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
664
700
|
var node = _step3.value;
|
|
665
701
|
if (typeFilters.has(node.orgType)) {
|
|
666
|
-
result.push(_objectSpread$
|
|
702
|
+
result.push(_objectSpread$4(_objectSpread$4({}, node), {}, {
|
|
667
703
|
matched: true,
|
|
668
704
|
children: node.children ? annotateSubtree(node.children) : undefined
|
|
669
705
|
}));
|
|
@@ -1073,10 +1109,10 @@ var nodeName = "node-name-YngKB";
|
|
|
1073
1109
|
var nodeNameFocused = "node-name-focused-B4Pi1";
|
|
1074
1110
|
var nodeNameSelected = "node-name-selected-KrVZD";
|
|
1075
1111
|
var matchChar = "match-char-cWyWK";
|
|
1076
|
-
var loading = "loading-zurRu";
|
|
1112
|
+
var loading$1 = "loading-zurRu";
|
|
1077
1113
|
var singleOrg = "single-org-q4R2s";
|
|
1078
|
-
var css_248z$
|
|
1079
|
-
styleInject(css_248z$
|
|
1114
|
+
var css_248z$l = ".container-FVPtn {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.toolbar-ANpuZ {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n margin-bottom: 8px;\n flex-wrap: wrap;\n}\n\n.search-bar-gpRL2 {\n border: 0px solid transparent !important;\n outline: 0px !important;\n}\n\n.search-bar-gpRL2 {\n background-color: #fff;\n border-radius: 16px;\n width: 100%;\n min-width: 120px;\n padding: 6px 34px 6px 14px;\n box-sizing: border-box;\n font-size: 14px;\n font-family: var(--diva-typography-font-family);\n}\n\n.search-field-8zGFa {\n position: relative;\n flex: 1 1 auto;\n min-width: 120px;\n}\n\n.search-clear-btn-ggM0O {\n position: absolute;\n top: 50%;\n right: 8px;\n transform: translateY(-50%);\n width: 18px;\n height: 18px;\n border: 0;\n border-radius: 50%;\n background: #ececec;\n color: #666;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n line-height: 1;\n padding: 0;\n}\n\n.search-clear-btn-ggM0O:hover {\n background: #dddddd;\n color: #333;\n}\n\n.search-bar-gpRL2::-moz-placeholder {\n color: #b6b6b7;\n opacity: 1;\n}\n\n.search-bar-gpRL2::placeholder {\n color: #b6b6b7;\n opacity: 1;\n}\n\n.type-filter-bar-qx91Q {\n display: flex;\n flex-direction: row;\n gap: 4px;\n flex-wrap: wrap;\n}\n\n.type-filter-btn-hjYcz {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n background-color: #fff;\n border: 1px solid #e0e0e0;\n border-radius: 12px;\n padding: 4px 10px;\n font-size: 12px;\n font-family: var(--diva-typography-font-family);\n cursor: pointer;\n color: #888;\n transition: all 0.15s ease;\n}\n\n.type-filter-btn-hjYcz:hover {\n border-color: #bbb;\n color: #555;\n}\n\n.type-filter-btn-active-ho-V5 {\n border-color: #999;\n color: #333;\n font-weight: 600;\n background-color: #f5f5f5;\n}\n\n.type-filter-bullet-pBoC0 {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.tree-list-P-vOa {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.tree-list-focusable-Al7xA:focus {\n outline: none;\n}\n\n/* Firefox scrollbar */\n.tree-list-P-vOa {\n scrollbar-width: thin;\n scrollbar-color: #7b7b7b #dfdfdf;\n}\n\n/* Chrome, Edge, Safari */\n.tree-list-P-vOa::-webkit-scrollbar {\n width: 6px;\n}\n\n.tree-list-P-vOa::-webkit-scrollbar-track {\n background: #dfdfdf;\n border-radius: 3px;\n}\n\n.tree-list-P-vOa::-webkit-scrollbar-thumb {\n background-color: #7b7b7b;\n border-radius: 3px;\n}\n\n.node-row-KzaKA {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.node-item-rGHuo {\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: 26px;\n}\n\n.node-arrow-vMZ2- {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n cursor: pointer;\n background: center / 50% no-repeat url(\"data:image/svg+xml,%3Csvg width%3D%227%22 height%3D%2211%22 viewBox%3D%220 0 7 11%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4.24303 5.41303L0.517911 1.73629C0.220592 1.44283 0.220592 0.967042 0.517911 0.673584C0.81523 0.380127 1.29728 0.380127 1.5946 0.673584L5.85806 4.88168C6.15538 5.17513 6.15538 5.65092 5.85806 5.94438L1.5946 10.1525C1.29728 10.4459 0.81523 10.4459 0.517911 10.1525C0.220592 9.85902 0.220592 9.38323 0.517911 9.08977L4.24303 5.41303Z%22 fill%3D%22%23B6B6B7%22%2F%3E%3C%2Fsvg%3E\");\n transition: transform 0.2s ease;\n}\n\n.node-arrow-open-KCbav {\n transform: rotate(90deg);\n}\n\n.node-arrow-placeholder-3cEV6 {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.type-bullet-47jTS {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n margin-left: 2px;\n}\n\n.node-name-YngKB {\n font-size: 14px;\n line-height: 20px;\n padding-left: 6px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: calc(100% - 22px);\n transition: font-weight 0.15s ease;\n}\n\n.node-name-YngKB:hover,\n.node-name-focused-B4Pi1 {\n text-decoration: underline;\n}\n\n.node-name-selected-KrVZD {\n font-weight: 700;\n}\n\n.match-char-cWyWK {\n background-color: rgba(255, 235, 59, 0.45);\n border-radius: 1px;\n}\n\n.loading-zurRu {\n font-size: 14px;\n color: #888;\n padding: 8px 0;\n}\n\n.single-org-q4R2s {\n font-size: 14px;\n font-weight: 600;\n}\n";
|
|
1115
|
+
styleInject(css_248z$l);
|
|
1080
1116
|
|
|
1081
1117
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
1082
1118
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
@@ -1191,7 +1227,7 @@ function OrgTreeSelect(_ref) {
|
|
|
1191
1227
|
totalAccessible = _useOrgTree.totalAccessible,
|
|
1192
1228
|
expandedIds = _useOrgTree.expandedIds,
|
|
1193
1229
|
selectedId = _useOrgTree.selectedId,
|
|
1194
|
-
loading
|
|
1230
|
+
loading = _useOrgTree.loading,
|
|
1195
1231
|
availableTypes = _useOrgTree.availableTypes,
|
|
1196
1232
|
toggleExpand = _useOrgTree.toggleExpand,
|
|
1197
1233
|
selectOrg = _useOrgTree.selectOrg,
|
|
@@ -1261,9 +1297,9 @@ function OrgTreeSelect(_ref) {
|
|
|
1261
1297
|
handleKeyDown = _useKeyboardNavigatio.handleKeyDown,
|
|
1262
1298
|
searchInputRef = _useKeyboardNavigatio.searchInputRef,
|
|
1263
1299
|
treeListRef = _useKeyboardNavigatio.treeListRef;
|
|
1264
|
-
if (loading
|
|
1300
|
+
if (loading) {
|
|
1265
1301
|
var _content = /*#__PURE__*/jsx("div", {
|
|
1266
|
-
className: loading,
|
|
1302
|
+
className: loading$1,
|
|
1267
1303
|
children: t('orgTree.loading')
|
|
1268
1304
|
});
|
|
1269
1305
|
return sectionClassName ? /*#__PURE__*/jsx("div", {
|
|
@@ -1356,7 +1392,7 @@ function OrgTreeSelect(_ref) {
|
|
|
1356
1392
|
onSelect: selectOrg
|
|
1357
1393
|
}, node._id);
|
|
1358
1394
|
}), isSearchActive && displayTree.length === 0 && /*#__PURE__*/jsx("div", {
|
|
1359
|
-
className: loading,
|
|
1395
|
+
className: loading$1,
|
|
1360
1396
|
children: t('orgTree.noResults')
|
|
1361
1397
|
})]
|
|
1362
1398
|
})]
|
|
@@ -1367,18 +1403,18 @@ function OrgTreeSelect(_ref) {
|
|
|
1367
1403
|
}) : content;
|
|
1368
1404
|
}
|
|
1369
1405
|
|
|
1370
|
-
var wrapper$
|
|
1406
|
+
var wrapper$b = "wrapper-zkdZ1";
|
|
1371
1407
|
var warningText = "warning-text-bwPCz";
|
|
1372
1408
|
var modeContainer = "mode-container-iyMu1";
|
|
1373
|
-
var css_248z$
|
|
1374
|
-
styleInject(css_248z$
|
|
1409
|
+
var css_248z$k = ".wrapper-zkdZ1 {\n margin-bottom: 12px;\n}\n\n.warning-text-bwPCz {\n color: #f87000;\n\n font-size: 12px;\n width: 100%;\n text-align: right;\n}\n\n.mode-container-iyMu1 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n}\n";
|
|
1410
|
+
styleInject(css_248z$k);
|
|
1375
1411
|
|
|
1376
1412
|
var toggleSwitch = "toggle-switch-dpRMP";
|
|
1377
1413
|
var switchSelection = "switch-selection-gzuIi";
|
|
1378
1414
|
var switchLabel = "switch-label-7ARiU";
|
|
1379
1415
|
var switchRadio = "switch-radio-NmaTt";
|
|
1380
|
-
var css_248z$
|
|
1381
|
-
styleInject(css_248z$
|
|
1416
|
+
var css_248z$j = ".toggle-switch-dpRMP {\n position: relative;\n height: 26px;\n width: 137px;\n border: #aaa 1px solid;\n border-radius: 3px;\n box-sizing: content-box;\n box-sizing: initial;\n}\n\n.switch-selection-gzuIi {\n display: block;\n position: absolute;\n z-index: 1;\n top: 0px;\n left: 0px;\n width: 45px;\n height: 26px;\n background-color: var(--diva-theme-palette-primary-main);\n border-radius: 3px;\n transition: left 0.25s ease-out;\n}\n\n.switch-label-7ARiU {\n position: relative;\n z-index: 2;\n float: left;\n width: 45px;\n line-height: 26px;\n font-size: 11px;\n color: rgba(0, 0, 0, 0.6);\n text-align: center;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n transition: color 0.25s ease-out;\n}\n\n.switch-radio-NmaTt {\n display: none;\n}\n\n.switch-radio-NmaTt:checked ~ .switch-label-7ARiU {\n transition: 0.15s ease-out;\n color: #fff;\n}\n";
|
|
1417
|
+
styleInject(css_248z$j);
|
|
1382
1418
|
|
|
1383
1419
|
var MultiToggleSwitch = function MultiToggleSwitch(_ref) {
|
|
1384
1420
|
var values = _ref.values,
|
|
@@ -1420,7 +1456,7 @@ var LoginMode = function LoginMode() {
|
|
|
1420
1456
|
var _useTranslation = useTranslation(),
|
|
1421
1457
|
t = _useTranslation.t;
|
|
1422
1458
|
return /*#__PURE__*/jsxs("div", {
|
|
1423
|
-
className: wrapper$
|
|
1459
|
+
className: wrapper$b,
|
|
1424
1460
|
children: [/*#__PURE__*/jsxs("div", {
|
|
1425
1461
|
className: modeContainer,
|
|
1426
1462
|
children: [/*#__PURE__*/jsxs("div", {
|
|
@@ -1436,13 +1472,13 @@ var LoginMode = function LoginMode() {
|
|
|
1436
1472
|
});
|
|
1437
1473
|
};
|
|
1438
1474
|
|
|
1439
|
-
var wrapper$
|
|
1475
|
+
var wrapper$a = "wrapper-y5jTr";
|
|
1440
1476
|
var logoutWrapper = "logout-wrapper-jI9Sq";
|
|
1441
1477
|
var logoutButton = "logout-button-m87tE";
|
|
1442
1478
|
var logoutIcon = "logout-icon-t01Yi";
|
|
1443
1479
|
var footerVersion = "footer-version-0OgH9";
|
|
1444
|
-
var css_248z$
|
|
1445
|
-
styleInject(css_248z$
|
|
1480
|
+
var css_248z$i = ".wrapper-y5jTr {\n display: flex;\n justify-content: space-between;\n color: #000;\n}\n\n.logout-wrapper-jI9Sq {\n display: flex;\n font-size: normal;\n align-items: center;\n gap: 12px;\n cursor: pointer;\n}\n\n.logout-button-m87tE {\n font-weight: 300;\n width: -moz-fit-content;\n width: fit-content;\n transition: color 0.4s ease-out;\n}\n\n.logout-icon-t01Yi {\n width: 18px !important;\n}\n\n.logout-icon-t01Yi {\n transition: color 0.4s ease-out;\n background-size: 100%;\n display: block;\n height: 18px;\n}\n\n.logout-wrapper-jI9Sq:hover .logout-icon-t01Yi,\n.logout-wrapper-jI9Sq:hover .logout-button-m87tE {\n color: var(--diva-theme-palette-primary-main);\n font-weight: 700;\n}\n\n.footer-version-0OgH9 {\n font-size: small;\n color: grey;\n}\n";
|
|
1481
|
+
styleInject(css_248z$i);
|
|
1446
1482
|
|
|
1447
1483
|
var Logout = function Logout(_ref) {
|
|
1448
1484
|
var setOpen = _ref.setOpen;
|
|
@@ -1457,7 +1493,7 @@ var Logout = function Logout(_ref) {
|
|
|
1457
1493
|
navigator.clipboard.writeText(jwt !== null && jwt !== void 0 ? jwt : '');
|
|
1458
1494
|
};
|
|
1459
1495
|
return /*#__PURE__*/jsxs("div", {
|
|
1460
|
-
className: wrapper$
|
|
1496
|
+
className: wrapper$a,
|
|
1461
1497
|
children: [/*#__PURE__*/jsxs("div", {
|
|
1462
1498
|
className: logoutWrapper,
|
|
1463
1499
|
onClick: function onClick() {
|
|
@@ -1498,8 +1534,8 @@ var Logout = function Logout(_ref) {
|
|
|
1498
1534
|
};
|
|
1499
1535
|
|
|
1500
1536
|
var footerLinks = "footer-links-BZYFg";
|
|
1501
|
-
var css_248z$
|
|
1502
|
-
styleInject(css_248z$
|
|
1537
|
+
var css_248z$h = ".footer-links-BZYFg {\n display: flex;\n width: 100%;\n justify-content: space-around;\n font-family: var(--diva-typography-font-family);\n padding-top: 12px;\n}\n.footer-links-BZYFg a {\n cursor: pointer;\n margin-top: auto;\n font-size: 12px;\n margin-bottom: auto;\n transition: color 0.3s ease;\n}\n\n.footer-links-BZYFg a:hover {\n color: var(--diva-theme-palette-primary-main);\n}\n.footer-links-BZYFg:first-of-type {\n padding-top: 0;\n}\n";
|
|
1538
|
+
styleInject(css_248z$h);
|
|
1503
1539
|
|
|
1504
1540
|
var AGBs = function AGBs(props) {
|
|
1505
1541
|
var _useDivaCore = useDivaCore(),
|
|
@@ -1558,10 +1594,10 @@ var AGBs = function AGBs(props) {
|
|
|
1558
1594
|
});
|
|
1559
1595
|
};
|
|
1560
1596
|
|
|
1561
|
-
var wrapper$
|
|
1597
|
+
var wrapper$9 = "wrapper-Y1Jcp";
|
|
1562
1598
|
var text$1 = "text-M0L7c";
|
|
1563
|
-
var css_248z$
|
|
1564
|
-
styleInject(css_248z$
|
|
1599
|
+
var css_248z$g = ".wrapper-Y1Jcp {\n display: flex;\n width: 100%;\n gap: 12px;\n align-items: center;\n}\n.text-M0L7c {\n}\n";
|
|
1600
|
+
styleInject(css_248z$g);
|
|
1565
1601
|
|
|
1566
1602
|
var HidePrices = function HidePrices(props) {
|
|
1567
1603
|
var _theme$palette;
|
|
@@ -1582,7 +1618,7 @@ var HidePrices = function HidePrices(props) {
|
|
|
1582
1618
|
t = _useTranslation.t;
|
|
1583
1619
|
var myVarVal = (theme === null || theme === void 0 || (_theme$palette = theme.palette) === null || _theme$palette === void 0 || (_theme$palette = _theme$palette.primary) === null || _theme$palette === void 0 ? void 0 : _theme$palette.main) || '#a84232';
|
|
1584
1620
|
return /*#__PURE__*/jsxs("div", {
|
|
1585
|
-
className: wrapper$
|
|
1621
|
+
className: wrapper$9,
|
|
1586
1622
|
children: [/*#__PURE__*/jsx(Switch, {
|
|
1587
1623
|
onChange: toggleHidePrices,
|
|
1588
1624
|
checked: !hidePrices,
|
|
@@ -1631,7 +1667,7 @@ var HidePrices = function HidePrices(props) {
|
|
|
1631
1667
|
});
|
|
1632
1668
|
};
|
|
1633
1669
|
|
|
1634
|
-
var wrapper$
|
|
1670
|
+
var wrapper$8 = "wrapper-tqv-Y";
|
|
1635
1671
|
var usernameWrapper = "username-wrapper-4OtrW";
|
|
1636
1672
|
var username = "username-cM3J3";
|
|
1637
1673
|
var email = "email-AIUDL";
|
|
@@ -1643,8 +1679,8 @@ var menu$1 = "menu-w8zcL";
|
|
|
1643
1679
|
var arrowWrapper = "arrow-wrapper-rHbX-";
|
|
1644
1680
|
var arrow$1 = "arrow-i5G-Z";
|
|
1645
1681
|
var openClass$2 = "open-class-U2edh";
|
|
1646
|
-
var css_248z$
|
|
1647
|
-
styleInject(css_248z$
|
|
1682
|
+
var css_248z$f = ".wrapper-tqv-Y {\n display: flex;\n width: 100%;\n}\n\n.username-wrapper-4OtrW {\n display: flex;\n flex-direction: column;\n gap: 5px;\n overflow: hidden;\n text-wrap: nowrap;\n white-space: nowrap;\n}\n.username-cM3J3 {\n font-weight: 700;\n font-size: 15px;\n}\n\n.email-AIUDL {\n font-size: 13px;\n}\n\n.language-wrapper-Cl-bc {\n width: 100px;\n display: flex;\n justify-content: center;\n padding: 16px 0px;\n border-left: 1px solid #fff;\n height: 36px;\n}\n\n.dropdown-ryNwY {\n margin-top: 10px;\n font-size: 15px;\n z-index: 100;\n}\n.clickable-MhS-F {\n cursor: pointer;\n}\n\n.dropdown-ryNwY .is-selected {\n transition: text-shadow ease-in-out 0.4s;\n}\n\n.dropdown-ryNwY:hover .is-selected {\n text-shadow: 0px 0px 12px rgba(0, 0, 0, 0.55);\n}\n\n.control-wrapper-u1DL4 {\n display: flex;\n gap: 6px;\n justify-content: center;\n align-items: center;\n}\n\n.menu-w8zcL {\n margin-top: 10px;\n background-color: #f2f2f2;\n border-radius: 26px;\n width: 36px;\n box-shadow: 0px 4px 4px 0px rgba(0,0,0,0.25098);\n overflow: hidden;\n transform: translateY(-44px);\n padding: 7px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n}\n\n.menu-w8zcL > div {\n width: 36px;\n height: 36px;\n text-align: center;\n line-height: 36px;\n cursor: pointer;\n transition: color 0.3s ease, background-color 0.3s ease;\n border-radius: 50%;\n}\n\n.menu-w8zcL > div:hover {\n color: #fff;\n background-color: var(--diva-theme-palette-primary-main);\n}\n\n.menu-w8zcL .is-selected {\n color: #fff;\n background-color: var(--diva-theme-palette-primary-main);\n}\n\n.arrow-wrapper-rHbX- {\n width: 20px;\n height: 20px;\n}\n\n.arrow-i5G-Z {\n width: 20px;\n height: 20px;\n background: center / 50% no-repeat url(\"data:image/svg+xml,%3Csvg width%3D%227%22 height%3D%2211%22 viewBox%3D%220 0 7 11%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4.24303 5.41303L0.517911 1.73629C0.220592 1.44283 0.220592 0.967042 0.517911 0.673584C0.81523 0.380127 1.29728 0.380127 1.5946 0.673584L5.85806 4.88168C6.15538 5.17513 6.15538 5.65092 5.85806 5.94438L1.5946 10.1525C1.29728 10.4459 0.81523 10.4459 0.517911 10.1525C0.220592 9.85902 0.220592 9.38323 0.517911 9.08977L4.24303 5.41303Z%22 fill%3D%22%23B6B6B7%22%2F%3E%3C%2Fsvg%3E\");\n transition: transform 0.3s ease;\n}\n\n.arrow-i5G-Z:hover {\n cursor: pointer;\n}\n\n.open-class-U2edh {\n transform: rotate(90deg);\n}\n";
|
|
1683
|
+
styleInject(css_248z$f);
|
|
1648
1684
|
|
|
1649
1685
|
var UserAndLanguage = function UserAndLanguage(_ref) {
|
|
1650
1686
|
var _i18n$language, _user$name, _user$familyName;
|
|
@@ -1658,7 +1694,7 @@ var UserAndLanguage = function UserAndLanguage(_ref) {
|
|
|
1658
1694
|
i18n = _useTranslation.i18n;
|
|
1659
1695
|
var currentLang = (_i18n$language = i18n.language) === null || _i18n$language === void 0 ? void 0 : _i18n$language.toUpperCase();
|
|
1660
1696
|
return /*#__PURE__*/jsxs("div", {
|
|
1661
|
-
className: wrapper$
|
|
1697
|
+
className: wrapper$8,
|
|
1662
1698
|
children: [/*#__PURE__*/jsx("div", {
|
|
1663
1699
|
className: section,
|
|
1664
1700
|
style: {
|
|
@@ -1704,12 +1740,12 @@ var UserAndLanguage = function UserAndLanguage(_ref) {
|
|
|
1704
1740
|
});
|
|
1705
1741
|
};
|
|
1706
1742
|
|
|
1707
|
-
var wrapper$
|
|
1743
|
+
var wrapper$7 = "wrapper-1EF4k";
|
|
1708
1744
|
var button$1 = "button-n4ZpL";
|
|
1709
1745
|
var selected$1 = "selected-mk9EU";
|
|
1710
1746
|
var link$1 = "link-bFrih";
|
|
1711
|
-
var css_248z$
|
|
1712
|
-
styleInject(css_248z$
|
|
1747
|
+
var css_248z$e = ".wrapper-1EF4k {\n display: flex;\n flex-direction: column;\n max-height: 200px;\n overflow: auto;\n}\n\n.button-n4ZpL {\n font-size: large;\n font-weight: bolder;\n}\n\n.button-n4ZpL {\n position: relative;\n cursor: pointer;\n margin: 0px 8px;\n padding: 8px;\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 0.1rem;\n border-left: 2px solid #fff;\n transition: border 0.4s ease, color 0.4s ease;\n}\n\n.button-n4ZpL:hover,\n.selected-mk9EU {\n border-left: 2px solid var(--diva-theme-palette-primary-main);\n color: var(--diva-theme-palette-primary-main);\n}\n\n.link-bFrih {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 1;\n}\n";
|
|
1748
|
+
styleInject(css_248z$e);
|
|
1713
1749
|
|
|
1714
1750
|
var NavigationButtons = function NavigationButtons(_ref) {
|
|
1715
1751
|
var buttons = _ref.buttons;
|
|
@@ -1721,7 +1757,7 @@ var NavigationButtons = function NavigationButtons(_ref) {
|
|
|
1721
1757
|
resolveComponent = _useDivaCore$actions.resolveComponent,
|
|
1722
1758
|
currentComponent = _useDivaCore.state.currentComponent;
|
|
1723
1759
|
return /*#__PURE__*/jsx("div", {
|
|
1724
|
-
className: wrapper$
|
|
1760
|
+
className: wrapper$7,
|
|
1725
1761
|
children: buttons.map(function (b, i) {
|
|
1726
1762
|
var _b$action;
|
|
1727
1763
|
return /*#__PURE__*/jsxs("div", {
|
|
@@ -1743,8 +1779,8 @@ var NavigationButtons = function NavigationButtons(_ref) {
|
|
|
1743
1779
|
|
|
1744
1780
|
var organizationName = "organization-name-uMRaO";
|
|
1745
1781
|
var organizationDescription = "organization-description-TKR5G";
|
|
1746
|
-
var css_248z$
|
|
1747
|
-
styleInject(css_248z$
|
|
1782
|
+
var css_248z$d = ".organization-name-uMRaO {\n font-weight: 700;\n font-size: 15px;\n color: var(--diva-theme-palette-primary-main);\n}\n.organization-description-TKR5G {\n font-size: 12px;\n margin-top: 6px;\n}\n";
|
|
1783
|
+
styleInject(css_248z$d);
|
|
1748
1784
|
|
|
1749
1785
|
var Organization = function Organization(_ref) {
|
|
1750
1786
|
_objectDestructuringEmpty(_ref);
|
|
@@ -1764,10 +1800,10 @@ var Organization = function Organization(_ref) {
|
|
|
1764
1800
|
});
|
|
1765
1801
|
};
|
|
1766
1802
|
|
|
1767
|
-
var wrapper$
|
|
1803
|
+
var wrapper$6 = "wrapper-SMA8P";
|
|
1768
1804
|
var icon = "icon-6Qojh";
|
|
1769
|
-
var css_248z$
|
|
1770
|
-
styleInject(css_248z$
|
|
1805
|
+
var css_248z$c = ".wrapper-SMA8P {\n display: flex;\n justify-content: center;\n font-family: var(--diva-typography-font-family);\n cursor: pointer;\n}\n\n.icon-6Qojh {\n width: 14px;\n height: 14px;\n opacity: 0.5;\n}\n\n.wrapper-SMA8P:hover .icon-6Qojh {\n opacity: 1;\n}\n.wrapper-SMA8P:hover a {\n color: var(--diva-theme-palette-primary-main);\n}\n";
|
|
1806
|
+
styleInject(css_248z$c);
|
|
1771
1807
|
|
|
1772
1808
|
var newWindowArrowIcon = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20width%3D%22800px%22%20height%3D%22800px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%2012V6C5%205.44772%205.44772%205%206%205H18C18.5523%205%2019%205.44772%2019%206V18C19%2018.5523%2018.5523%2019%2018%2019H12M8.11111%2012H12M12%2012V15.8889M12%2012L5%2019%22%20stroke%3D%22%23464455%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
1773
1809
|
|
|
@@ -1778,7 +1814,7 @@ var Link = function Link(_ref) {
|
|
|
1778
1814
|
var _useTranslation = useTranslation(),
|
|
1779
1815
|
t = _useTranslation.t;
|
|
1780
1816
|
return /*#__PURE__*/jsx("div", {
|
|
1781
|
-
className: classNames(wrapper$
|
|
1817
|
+
className: classNames(wrapper$6),
|
|
1782
1818
|
children: /*#__PURE__*/jsxs("a", {
|
|
1783
1819
|
onClick: function onClick() {
|
|
1784
1820
|
return openComponent({
|
|
@@ -1821,60 +1857,57 @@ function Profil (_ref) {
|
|
|
1821
1857
|
});
|
|
1822
1858
|
var headerHeight = 60;
|
|
1823
1859
|
var maxHeight = height - headerHeight - 12;
|
|
1824
|
-
return /*#__PURE__*/
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
})
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
className: section,
|
|
1863
|
-
children: [userHasPermission('onlinemode') && /*#__PURE__*/jsx(LoginMode, {}), /*#__PURE__*/jsx(Logout, {
|
|
1864
|
-
setOpen: setOpen
|
|
1860
|
+
return /*#__PURE__*/jsx(DropdownContainer, {
|
|
1861
|
+
open: open,
|
|
1862
|
+
maxHeight: maxHeight,
|
|
1863
|
+
top: headerHeight + 2,
|
|
1864
|
+
children: open && /*#__PURE__*/jsxs("div", {
|
|
1865
|
+
onClick: function onClick(e) {
|
|
1866
|
+
return e.stopPropagation();
|
|
1867
|
+
},
|
|
1868
|
+
children: [organization && /*#__PURE__*/jsx("div", {
|
|
1869
|
+
className: section,
|
|
1870
|
+
children: /*#__PURE__*/jsx(Organization, {})
|
|
1871
|
+
}), /*#__PURE__*/jsx(UserAndLanguage, {
|
|
1872
|
+
section: section
|
|
1873
|
+
}), (user === null || user === void 0 ? void 0 : user._id) && organization && /*#__PURE__*/jsx(OrgTreeSelect, {
|
|
1874
|
+
onSelect: setOrganization,
|
|
1875
|
+
maxHeight: "240px",
|
|
1876
|
+
sectionClassName: section
|
|
1877
|
+
}), !!buttonsInMenu.length && /*#__PURE__*/jsx("div", {
|
|
1878
|
+
className: section,
|
|
1879
|
+
children: /*#__PURE__*/jsx(NavigationButtons, {
|
|
1880
|
+
buttons: buttonsInMenu
|
|
1881
|
+
})
|
|
1882
|
+
}), allowHidePrices && /*#__PURE__*/jsx("div", {
|
|
1883
|
+
className: section,
|
|
1884
|
+
children: /*#__PURE__*/jsx(HidePrices, {})
|
|
1885
|
+
}), (supportUrl || imprintUrl || privacyUrl || tosUrl || conditionsUrl) && /*#__PURE__*/jsx("div", {
|
|
1886
|
+
className: section,
|
|
1887
|
+
children: /*#__PURE__*/jsx(AGBs, {})
|
|
1888
|
+
}), feedbackUrl && /*#__PURE__*/jsx("div", {
|
|
1889
|
+
className: section,
|
|
1890
|
+
children: /*#__PURE__*/jsx(Link, {
|
|
1891
|
+
url: feedbackUrl
|
|
1892
|
+
})
|
|
1893
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
1894
|
+
className: section,
|
|
1895
|
+
children: [userHasPermission('onlinemode') && /*#__PURE__*/jsx(LoginMode, {}), /*#__PURE__*/jsx(Logout, {
|
|
1896
|
+
setOpen: setOpen
|
|
1897
|
+
})]
|
|
1865
1898
|
})]
|
|
1866
|
-
})
|
|
1899
|
+
})
|
|
1867
1900
|
});
|
|
1868
1901
|
}
|
|
1869
1902
|
|
|
1870
1903
|
var divaLogo = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20viewBox%3D%220%200%201000%20293.65%22%3E%3Cpath%20d%3D%22M250.89%2C147.3c-3.18-74-30.4-143.18-141.73-143.18L0%2C4.26A307.86%2C307.86%2C0%2C0%2C1%2C26.12%2C60.7h74.2c52.86%2C0%2C76%2C25.68%2C78.61%2C85.29%2C2.66%2C61.81-18.29%2C87.92-71.15%2C87.92H79.2l-46.71.52a287.29%2C287.29%2C0%2C0%2C1-20%2C53.88h109c111.32%2C0%2C132.67-67%2C129.48-141M306.84%2C289h71.23V0a300.07%2C300.07%2C0%2C0%2C1-71.23%2C25.92Zm318.8.62L726.59.85a300%2C300%2C0%2C0%2C1-83.65%2C32.24L577.11%2C224%2C511.29%2C33.09A300%2C300%2C0%2C0%2C1%2C427.64.85l101%2C288.76Zm374.36%2C4L899.05%2C4.91H802L775.14%2C81.74%2C701.05%2C293.65A300.32%2C300.32%2C0%2C0%2C1%2C785%2C261.35l6.79-21%2C19.14-57.54L850.52%2C62l40.07%2C120.85%2C18.7%2C57.54%2C7%2C21A300.2%2C300.2%2C0%2C0%2C1%2C1000%2C293.65%22%20fill%3D%22%23b3b3b3%22%2F%3E%3C%2Fsvg%3E";
|
|
1871
1904
|
|
|
1872
|
-
var wrapper$
|
|
1905
|
+
var wrapper$5 = "wrapper-Qn4wN";
|
|
1873
1906
|
var logoWrapper = "logo-wrapper-hBDgt";
|
|
1874
1907
|
var logo = "logo-Vs2Ia";
|
|
1875
1908
|
var selectableLogo = "selectable-logo-1DHhf";
|
|
1876
|
-
var css_248z$
|
|
1877
|
-
styleInject(css_248z$
|
|
1909
|
+
var css_248z$b = ".wrapper-Qn4wN {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-basis: fit-content;\n}\n\n.logo-wrapper-hBDgt {\n margin: 6px 22px;\n}\n\n.logo-wrapper-hBDgt:first-of-type {\n width: 156px;\n display: flex;\n align-self: center;\n}\n\n.logo-Vs2Ia {\n max-width: 156px;\n max-height: 44px;\n}\n\n.selectable-logo-1DHhf {\n cursor: pointer;\n}\n";
|
|
1910
|
+
styleInject(css_248z$b);
|
|
1878
1911
|
|
|
1879
1912
|
var Logos = function Logos(props) {
|
|
1880
1913
|
var _useDivaCore = useDivaCore(),
|
|
@@ -1907,7 +1940,7 @@ var Logos = function Logos(props) {
|
|
|
1907
1940
|
}, [logoUrl, customLogo, organization === null || organization === void 0 ? void 0 : organization.logoUrl]);
|
|
1908
1941
|
return /*#__PURE__*/jsx("div", {
|
|
1909
1942
|
id: "logos",
|
|
1910
|
-
className: wrapper$
|
|
1943
|
+
className: wrapper$5,
|
|
1911
1944
|
children: logos.map(function (l, i) {
|
|
1912
1945
|
return /*#__PURE__*/jsx("div", {
|
|
1913
1946
|
className: logoWrapper,
|
|
@@ -1922,8 +1955,8 @@ var Logos = function Logos(props) {
|
|
|
1922
1955
|
};
|
|
1923
1956
|
|
|
1924
1957
|
var languageSelector = "language-selector-Le2oh";
|
|
1925
|
-
var css_248z$
|
|
1926
|
-
styleInject(css_248z$
|
|
1958
|
+
var css_248z$a = ".language-selector-Le2oh {\n width: 50px;\n height: 30px;\n margin: auto;\n margin-right: 22px;\n border: none;\n border-bottom: 1px solid;\n}\n\n.language-selector-Le2oh.focus-visible-8WTUk {\n outline: none;\n}\n\n.language-selector-Le2oh:focus-visible {\n outline: none;\n}\n";
|
|
1959
|
+
styleInject(css_248z$a);
|
|
1927
1960
|
|
|
1928
1961
|
var LanguageSelector = function LanguageSelector(props) {
|
|
1929
1962
|
var _useDivaCore = useDivaCore(),
|
|
@@ -1951,12 +1984,12 @@ var LanguageSelector = function LanguageSelector(props) {
|
|
|
1951
1984
|
|
|
1952
1985
|
var accountLogo = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Capa_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20viewBox%3D%220%200%2055%2055%22%20style%3D%22enable-background%3Anew%200%200%2055%2055%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20d%3D%22M55%2C27.5C55%2C12.337%2C42.663%2C0%2C27.5%2C0S0%2C12.337%2C0%2C27.5c0%2C8.009%2C3.444%2C15.228%2C8.926%2C20.258l-0.026%2C0.023l0.892%2C0.752%20c0.058%2C0.049%2C0.121%2C0.089%2C0.179%2C0.137c0.474%2C0.393%2C0.965%2C0.766%2C1.465%2C1.127c0.162%2C0.117%2C0.324%2C0.234%2C0.489%2C0.348%20c0.534%2C0.368%2C1.082%2C0.717%2C1.642%2C1.048c0.122%2C0.072%2C0.245%2C0.142%2C0.368%2C0.212c0.613%2C0.349%2C1.239%2C0.678%2C1.88%2C0.98%20c0.047%2C0.022%2C0.095%2C0.042%2C0.142%2C0.064c2.089%2C0.971%2C4.319%2C1.684%2C6.651%2C2.105c0.061%2C0.011%2C0.122%2C0.022%2C0.184%2C0.033%20c0.724%2C0.125%2C1.456%2C0.225%2C2.197%2C0.292c0.09%2C0.008%2C0.18%2C0.013%2C0.271%2C0.021C25.998%2C54.961%2C26.744%2C55%2C27.5%2C55%20c0.749%2C0%2C1.488-0.039%2C2.222-0.098c0.093-0.008%2C0.186-0.013%2C0.279-0.021c0.735-0.067%2C1.461-0.164%2C2.178-0.287%20c0.062-0.011%2C0.125-0.022%2C0.187-0.034c2.297-0.412%2C4.495-1.109%2C6.557-2.055c0.076-0.035%2C0.153-0.068%2C0.229-0.104%20c0.617-0.29%2C1.22-0.603%2C1.811-0.936c0.147-0.083%2C0.293-0.167%2C0.439-0.253c0.538-0.317%2C1.067-0.648%2C1.581-1%20c0.185-0.126%2C0.366-0.259%2C0.549-0.391c0.439-0.316%2C0.87-0.642%2C1.289-0.983c0.093-0.075%2C0.193-0.14%2C0.284-0.217l0.915-0.764%20l-0.027-0.023C51.523%2C42.802%2C55%2C35.55%2C55%2C27.5z%20M2%2C27.5C2%2C13.439%2C13.439%2C2%2C27.5%2C2S53%2C13.439%2C53%2C27.5%20c0%2C7.577-3.325%2C14.389-8.589%2C19.063c-0.294-0.203-0.59-0.385-0.893-0.537l-8.467-4.233c-0.76-0.38-1.232-1.144-1.232-1.993v-2.957%20c0.196-0.242%2C0.403-0.516%2C0.617-0.817c1.096-1.548%2C1.975-3.27%2C2.616-5.123c1.267-0.602%2C2.085-1.864%2C2.085-3.289v-3.545%20c0-0.867-0.318-1.708-0.887-2.369v-4.667c0.052-0.52%2C0.236-3.448-1.883-5.864C34.524%2C9.065%2C31.541%2C8%2C27.5%2C8%20s-7.024%2C1.065-8.867%2C3.168c-2.119%2C2.416-1.935%2C5.346-1.883%2C5.864v4.667c-0.568%2C0.661-0.887%2C1.502-0.887%2C2.369v3.545%20c0%2C1.101%2C0.494%2C2.128%2C1.34%2C2.821c0.81%2C3.173%2C2.477%2C5.575%2C3.093%2C6.389v2.894c0%2C0.816-0.445%2C1.566-1.162%2C1.958l-7.907%2C4.313%20c-0.252%2C0.137-0.502%2C0.297-0.752%2C0.476C5.276%2C41.792%2C2%2C35.022%2C2%2C27.5z%22%2F%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
1953
1986
|
|
|
1954
|
-
var wrapper$
|
|
1987
|
+
var wrapper$4 = "wrapper-dTEtU";
|
|
1955
1988
|
var profil = "profil-9K4HQ";
|
|
1956
1989
|
var loginMode = "login-mode-rV-Rt";
|
|
1957
1990
|
var openClass$1 = "open-class-piIJQ";
|
|
1958
|
-
var css_248z$
|
|
1959
|
-
styleInject(css_248z$
|
|
1991
|
+
var css_248z$9 = ".wrapper-dTEtU {\n border-left: #f2f2f2 solid 1px;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode .wrapper-dTEtU {\n border-left: black solid 1px;\n}\n\n.profil-9K4HQ {\n margin: 6px 22px;\n height: 46px;\n cursor: pointer;\n border-radius: 50%;\n transition: box-shadow ease-in-out 0.4s;\n}\n\n.login-mode-rV-Rt {\n position: absolute;\n bottom: 4px;\n right: 15px;\n color: white;\n background-color: var(--diva-theme-palette-primary-main);\n font-size: 12px;\n padding: 2px;\n border-radius: 3px;\n cursor: pointer;\n}\n\n.profil-9K4HQ:hover,\n.open-class-piIJQ {\n box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.55);\n}\n";
|
|
1992
|
+
styleInject(css_248z$9);
|
|
1960
1993
|
|
|
1961
1994
|
var ProfileImg = function ProfileImg(_ref) {
|
|
1962
1995
|
var onClickProfile = _ref.onClickProfile,
|
|
@@ -1981,7 +2014,7 @@ var ProfileImg = function ProfileImg(_ref) {
|
|
|
1981
2014
|
}, [user, theme]);
|
|
1982
2015
|
return /*#__PURE__*/jsxs("div", {
|
|
1983
2016
|
id: 'Profile',
|
|
1984
|
-
className: wrapper$
|
|
2017
|
+
className: wrapper$4,
|
|
1985
2018
|
children: [showLogin && /*#__PURE__*/jsx("img", {
|
|
1986
2019
|
className: classNames(profil, open ? openClass$1 : undefined),
|
|
1987
2020
|
src: user ? profileUrl : accountLogo,
|
|
@@ -2001,8 +2034,8 @@ var ProfileImg = function ProfileImg(_ref) {
|
|
|
2001
2034
|
};
|
|
2002
2035
|
|
|
2003
2036
|
var textClass$1 = "text-class-mZIuq";
|
|
2004
|
-
var css_248z$
|
|
2005
|
-
styleInject(css_248z$
|
|
2037
|
+
var css_248z$8 = ".text-class-mZIuq {\n font-size: 16px;\n line-height: 19px;\n transition: color 0.3s ease, border 0.3s ease;\n letter-spacing: 0.1rem;\n text-wrap: nowrap;\n white-space: nowrap;\n padding: 20px 16px;\n border-right: #f2f2f2 solid 1px;\n flex-basis: fit-content;\n}\n";
|
|
2038
|
+
styleInject(css_248z$8);
|
|
2006
2039
|
|
|
2007
2040
|
var WelcomeText = function WelcomeText(_ref) {
|
|
2008
2041
|
var text = _ref.text;
|
|
@@ -2015,11 +2048,11 @@ var WelcomeText = function WelcomeText(_ref) {
|
|
|
2015
2048
|
});
|
|
2016
2049
|
};
|
|
2017
2050
|
|
|
2018
|
-
var wrapper$
|
|
2051
|
+
var wrapper$3 = "wrapper-Nnx1C";
|
|
2019
2052
|
var textClass = "text-class-ODGFT";
|
|
2020
2053
|
var name = "name-5pMK6";
|
|
2021
|
-
var css_248z$
|
|
2022
|
-
styleInject(css_248z$
|
|
2054
|
+
var css_248z$7 = ".wrapper-Nnx1C {\n display: flex;\n flex-direction: column;\n padding: 8px 16px;\n border-left: #f2f2f2 solid 1px;\n width: 220px;\n box-sizing: border-box;\n cursor: pointer;\n justify-content: center;\n height: calc(100% - 16px);\n}\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode .wrapper-Nnx1C {\n border-left: black solid 1px;\n}\n\n.text-class-ODGFT,\n.name-5pMK6 {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n transition:\n color 0.3s ease,\n border 0.3s ease;\n letter-spacing: 1px;\n}\n.text-class-ODGFT {\n font-size: 14px;\n}\n\n.name-5pMK6 {\n font-size: 13px;\n}\n\n.wrapper-Nnx1C:hover .text-class-ODGFT,\n.wrapper-Nnx1C:hover .name-5pMK6 {\n color: var(--diva-theme-palette-primary-main);\n}\n";
|
|
2055
|
+
styleInject(css_248z$7);
|
|
2023
2056
|
|
|
2024
2057
|
var OrganizationName = function OrganizationName(_ref) {
|
|
2025
2058
|
var _user$name, _user$familyName;
|
|
@@ -2032,7 +2065,7 @@ var OrganizationName = function OrganizationName(_ref) {
|
|
|
2032
2065
|
user = _useDivaCore$state.user;
|
|
2033
2066
|
if (!organization) return /*#__PURE__*/jsx(Fragment$1, {});
|
|
2034
2067
|
return /*#__PURE__*/jsxs("div", {
|
|
2035
|
-
className: wrapper$
|
|
2068
|
+
className: wrapper$3,
|
|
2036
2069
|
onClick: onClickProfile,
|
|
2037
2070
|
children: [!!showOrgName && /*#__PURE__*/jsx("div", {
|
|
2038
2071
|
className: textClass,
|
|
@@ -2045,6 +2078,469 @@ var OrganizationName = function OrganizationName(_ref) {
|
|
|
2045
2078
|
});
|
|
2046
2079
|
};
|
|
2047
2080
|
|
|
2081
|
+
var wrapper$2 = "wrapper-nEeiH";
|
|
2082
|
+
var bellButton = "bell-button-4FCzu";
|
|
2083
|
+
var dropdownHeader = "dropdown-header--L5ev";
|
|
2084
|
+
var refreshButton = "refresh-button-iYphX";
|
|
2085
|
+
var list$1 = "list-oAERO";
|
|
2086
|
+
var listItem = "list-item-5776s";
|
|
2087
|
+
var listItemUnread = "list-item-unread-4vv9t";
|
|
2088
|
+
var listItemRead = "list-item-read-pcnu8";
|
|
2089
|
+
var unreadDot = "unread-dot-9o8ro";
|
|
2090
|
+
var itemHeader = "item-header-la3nu";
|
|
2091
|
+
var itemSubject = "item-subject-1QAAc";
|
|
2092
|
+
var itemDate = "item-date-1p9lQ";
|
|
2093
|
+
var empty = "empty-AMurs";
|
|
2094
|
+
var loading = "loading-nJYWk";
|
|
2095
|
+
var alert = "alert-dGmPN";
|
|
2096
|
+
var popupDate = "popup-date--2qrU";
|
|
2097
|
+
var popupDivider = "popup-divider-oKq0i";
|
|
2098
|
+
var popupContent = "popup-content-Ixtbi";
|
|
2099
|
+
var css_248z$6 = ".wrapper-nEeiH {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n border-left: #f2f2f2 solid 1px;\n padding: 0 14px;\n}\n\n.bell-button-4FCzu {\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 4px;\n color: #333333;\n font-size: 22px;\n line-height: 1;\n}\n\n.bell-button-4FCzu:hover {\n color: #1677ff;\n color: var(--diva-theme-palette-primary-main, #1677ff);\n}\n\n.dropdown-header--L5ev {\n padding: 12px 16px;\n border-bottom: 1px solid #ffffff;\n font-weight: 600;\n color: #333333;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.refresh-button-iYphX {\n background: none;\n border: none;\n padding: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666666;\n border-radius: 4px;\n transition:\n background-color 0.2s,\n color 0.2s;\n}\n\n.refresh-button-iYphX:hover {\n background-color: #e8e8e8;\n color: #1677ff;\n color: var(--diva-theme-palette-primary-main, #1677ff);\n}\n\n.refresh-button-iYphX:active {\n background-color: #d8d8d8;\n}\n\n.list-oAERO {\n overflow-y: auto;\n flex: 1;\n}\n\n.list-item-5776s {\n display: block;\n width: 100%;\n text-align: left;\n border: none;\n border-bottom: 1px solid #ffffff;\n padding: 12px 16px 12px 32px;\n cursor: pointer;\n font-family: inherit;\n font-size: inherit;\n position: relative;\n transition: background-color 0.2s ease;\n}\n\n.list-item-unread-4vv9t {\n background-color: #ffffff;\n}\n\n.list-item-read-pcnu8 {\n background-color: #f7f7f7;\n}\n\n.list-item-5776s:hover {\n background-color: #e8e8e8;\n}\n\n.unread-dot-9o8ro {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n height: 8px;\n background-color: #1677ff;\n background-color: var(--diva-theme-palette-primary-main, #1677ff);\n border-radius: 50%;\n}\n\n.item-header-la3nu {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n width: 100%;\n}\n\n.item-subject-1QAAc {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.list-item-unread-4vv9t .item-subject-1QAAc {\n font-weight: 600;\n color: #111111;\n}\n\n.list-item-read-pcnu8 .item-subject-1QAAc {\n font-weight: 400;\n color: #555555;\n}\n\n.item-date-1p9lQ {\n flex-shrink: 0;\n font-size: 11px;\n}\n\n.list-item-unread-4vv9t .item-date-1p9lQ {\n color: #666666;\n}\n\n.list-item-read-pcnu8 .item-date-1p9lQ {\n color: #999999;\n}\n\n.empty-AMurs {\n padding: 24px 16px;\n text-align: center;\n color: #666666;\n}\n\n.loading-nJYWk {\n display: flex;\n justify-content: center;\n padding: 24px 16px;\n}\n\n.loading-nJYWk .MuiCircularProgress-root {\n color: #1677ff;\n color: var(--diva-theme-palette-primary-main, #1677ff);\n}\n\n.alert-dGmPN {\n margin: 8px 12px;\n}\n\n.popup-date--2qrU {\n font-size: 11px;\n color: #888888;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 0 4px;\n}\n\n.popup-divider-oKq0i {\n height: 1px;\n background-color: #eef0f2;\n margin: 12px 0 16px 0;\n border: none;\n}\n\n.popup-content-Ixtbi {\n font-size: 14px;\n line-height: 1.6;\n color: #2c2c2c;\n white-space: pre-wrap;\n word-break: break-word;\n padding: 0 4px 4px 4px;\n max-height: 320px;\n overflow-y: auto;\n scrollbar-width: thin;\n}\n\n.popup-content-Ixtbi::-webkit-scrollbar {\n width: 5px;\n}\n\n.popup-content-Ixtbi::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 3px;\n}\n\n.popup-content-Ixtbi::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 3px;\n}\n\n.popup-content-Ixtbi::-webkit-scrollbar-thumb:hover {\n background: #a8a8a8;\n}\n\n.darkmode .dropdown-header--L5ev,\n.darkmode .list-item-5776s,\n.darkmode .item-subject-1QAAc,\n.darkmode .item-date-1p9lQ,\n.darkmode .empty-AMurs {\n color: #333333;\n}\n\n.darkmode .list-item-unread-4vv9t .item-subject-1QAAc {\n color: #111111;\n}\n\n.darkmode .list-item-read-pcnu8 .item-subject-1QAAc {\n color: #555555;\n}\n\n.darkmode .list-item-unread-4vv9t .item-date-1p9lQ {\n color: #666666;\n}\n\n.darkmode .list-item-read-pcnu8 .item-date-1p9lQ {\n color: #999999;\n}\n";
|
|
2100
|
+
styleInject(css_248z$6);
|
|
2101
|
+
|
|
2102
|
+
function NotificationsBell(_ref) {
|
|
2103
|
+
var totalUnread = _ref.totalUnread,
|
|
2104
|
+
onClick = _ref.onClick;
|
|
2105
|
+
var _useTranslation = useTranslation(),
|
|
2106
|
+
t = _useTranslation.t;
|
|
2107
|
+
return /*#__PURE__*/jsx("div", {
|
|
2108
|
+
className: wrapper$2,
|
|
2109
|
+
children: /*#__PURE__*/jsx("button", {
|
|
2110
|
+
type: "button",
|
|
2111
|
+
className: bellButton,
|
|
2112
|
+
onClick: onClick,
|
|
2113
|
+
"aria-label": t('navigator.notifications.title'),
|
|
2114
|
+
title: totalUnread > 0 ? t('navigator.notifications.unreadCount', {
|
|
2115
|
+
count: totalUnread
|
|
2116
|
+
}) : t('navigator.notifications.title'),
|
|
2117
|
+
children: /*#__PURE__*/jsx(Badge, {
|
|
2118
|
+
badgeContent: totalUnread,
|
|
2119
|
+
color: "error",
|
|
2120
|
+
invisible: totalUnread === 0,
|
|
2121
|
+
max: 99,
|
|
2122
|
+
children: /*#__PURE__*/jsx(NotificationsNoneIcon, {})
|
|
2123
|
+
})
|
|
2124
|
+
})
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
var DROPDOWN_MAX_HEIGHT = 420;
|
|
2129
|
+
// Right offset = OrganizationName width (220) + ProfileImg wrapper width (~91) so the
|
|
2130
|
+
// dropdown's right edge lines up with the bell button's right edge.
|
|
2131
|
+
var DROPDOWN_RIGHT_OFFSET = 311;
|
|
2132
|
+
function NotificationsDropdown(_ref) {
|
|
2133
|
+
var open = _ref.open,
|
|
2134
|
+
items = _ref.items,
|
|
2135
|
+
isLoading = _ref.loading,
|
|
2136
|
+
errorMessage = _ref.errorMessage,
|
|
2137
|
+
onSelect = _ref.onSelect,
|
|
2138
|
+
onRefresh = _ref.onRefresh;
|
|
2139
|
+
var _useTranslation = useTranslation(),
|
|
2140
|
+
t = _useTranslation.t;
|
|
2141
|
+
return /*#__PURE__*/jsx(DropdownContainer, {
|
|
2142
|
+
open: open,
|
|
2143
|
+
maxHeight: DROPDOWN_MAX_HEIGHT,
|
|
2144
|
+
top: 62,
|
|
2145
|
+
right: DROPDOWN_RIGHT_OFFSET,
|
|
2146
|
+
children: open && /*#__PURE__*/jsxs("div", {
|
|
2147
|
+
onClick: function onClick(e) {
|
|
2148
|
+
return e.stopPropagation();
|
|
2149
|
+
},
|
|
2150
|
+
style: {
|
|
2151
|
+
display: 'flex',
|
|
2152
|
+
flexDirection: 'column',
|
|
2153
|
+
height: '100%'
|
|
2154
|
+
},
|
|
2155
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
2156
|
+
className: dropdownHeader,
|
|
2157
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
2158
|
+
children: t('navigator.notifications.title')
|
|
2159
|
+
}), /*#__PURE__*/jsx("button", {
|
|
2160
|
+
type: "button",
|
|
2161
|
+
className: refreshButton,
|
|
2162
|
+
onClick: onRefresh,
|
|
2163
|
+
title: t('navigator.notifications.refresh'),
|
|
2164
|
+
"aria-label": t('navigator.notifications.refresh'),
|
|
2165
|
+
disabled: isLoading,
|
|
2166
|
+
children: /*#__PURE__*/jsx(RefreshIcon, {
|
|
2167
|
+
style: {
|
|
2168
|
+
fontSize: '18px'
|
|
2169
|
+
}
|
|
2170
|
+
})
|
|
2171
|
+
})]
|
|
2172
|
+
}), errorMessage && /*#__PURE__*/jsx(Alert, {
|
|
2173
|
+
severity: "error",
|
|
2174
|
+
className: alert,
|
|
2175
|
+
children: errorMessage
|
|
2176
|
+
}), isLoading ? /*#__PURE__*/jsx("div", {
|
|
2177
|
+
className: loading,
|
|
2178
|
+
children: /*#__PURE__*/jsx(CircularProgress, {
|
|
2179
|
+
size: 24
|
|
2180
|
+
})
|
|
2181
|
+
}) : items.length === 0 ? /*#__PURE__*/jsx("div", {
|
|
2182
|
+
className: empty,
|
|
2183
|
+
children: t('navigator.notifications.empty')
|
|
2184
|
+
}) : /*#__PURE__*/jsx("div", {
|
|
2185
|
+
className: list$1,
|
|
2186
|
+
children: items.map(function (item) {
|
|
2187
|
+
return /*#__PURE__*/jsxs("button", {
|
|
2188
|
+
type: "button",
|
|
2189
|
+
className: classNames(listItem, item.hasRead ? listItemRead : listItemUnread),
|
|
2190
|
+
onClick: function onClick() {
|
|
2191
|
+
return onSelect(item._id);
|
|
2192
|
+
},
|
|
2193
|
+
children: [!item.hasRead && /*#__PURE__*/jsx("span", {
|
|
2194
|
+
className: unreadDot
|
|
2195
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
2196
|
+
className: itemHeader,
|
|
2197
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
2198
|
+
className: itemSubject,
|
|
2199
|
+
children: item.subject
|
|
2200
|
+
}), /*#__PURE__*/jsx("span", {
|
|
2201
|
+
className: itemDate,
|
|
2202
|
+
children: DivaUtils.formatDate(item.sentAt, false)
|
|
2203
|
+
})]
|
|
2204
|
+
})]
|
|
2205
|
+
}, item._id);
|
|
2206
|
+
})
|
|
2207
|
+
})]
|
|
2208
|
+
})
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
2213
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
2214
|
+
var NotificationsApiError = /*#__PURE__*/function (_Error) {
|
|
2215
|
+
function NotificationsApiError(status) {
|
|
2216
|
+
var _this;
|
|
2217
|
+
_classCallCheck(this, NotificationsApiError);
|
|
2218
|
+
_this = _callSuper(this, NotificationsApiError, ["Notifications API request failed with status ".concat(status)]);
|
|
2219
|
+
_this.status = status;
|
|
2220
|
+
_this.name = 'NotificationsApiError';
|
|
2221
|
+
return _this;
|
|
2222
|
+
}
|
|
2223
|
+
_inherits(NotificationsApiError, _Error);
|
|
2224
|
+
return _createClass(NotificationsApiError);
|
|
2225
|
+
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
2226
|
+
function requestJson(_x) {
|
|
2227
|
+
return _requestJson.apply(this, arguments);
|
|
2228
|
+
}
|
|
2229
|
+
function _requestJson() {
|
|
2230
|
+
_requestJson = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
|
|
2231
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2232
|
+
while (1) switch (_context.prev = _context.next) {
|
|
2233
|
+
case 0:
|
|
2234
|
+
if (response.ok) {
|
|
2235
|
+
_context.next = 2;
|
|
2236
|
+
break;
|
|
2237
|
+
}
|
|
2238
|
+
throw new NotificationsApiError(response.status);
|
|
2239
|
+
case 2:
|
|
2240
|
+
return _context.abrupt("return", response.json());
|
|
2241
|
+
case 3:
|
|
2242
|
+
case "end":
|
|
2243
|
+
return _context.stop();
|
|
2244
|
+
}
|
|
2245
|
+
}, _callee);
|
|
2246
|
+
}));
|
|
2247
|
+
return _requestJson.apply(this, arguments);
|
|
2248
|
+
}
|
|
2249
|
+
function fetchNotifications(_x2, _x3, _x4) {
|
|
2250
|
+
return _fetchNotifications.apply(this, arguments);
|
|
2251
|
+
}
|
|
2252
|
+
function _fetchNotifications() {
|
|
2253
|
+
_fetchNotifications = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(userId, _ref, _ref2) {
|
|
2254
|
+
var limit, offset, messageService, jwt, url, response;
|
|
2255
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
2256
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
2257
|
+
case 0:
|
|
2258
|
+
limit = _ref.limit, offset = _ref.offset;
|
|
2259
|
+
messageService = _ref2.messageService, jwt = _ref2.jwt;
|
|
2260
|
+
url = "".concat(messageService, "/users/").concat(encodeURIComponent(userId), "/communications?limit=").concat(limit, "&offset=").concat(offset);
|
|
2261
|
+
_context2.next = 5;
|
|
2262
|
+
return fetch(url, {
|
|
2263
|
+
method: 'GET',
|
|
2264
|
+
headers: {
|
|
2265
|
+
'Content-Type': 'application/json',
|
|
2266
|
+
Authorization: "Bearer ".concat(jwt)
|
|
2267
|
+
}
|
|
2268
|
+
});
|
|
2269
|
+
case 5:
|
|
2270
|
+
response = _context2.sent;
|
|
2271
|
+
return _context2.abrupt("return", requestJson(response));
|
|
2272
|
+
case 7:
|
|
2273
|
+
case "end":
|
|
2274
|
+
return _context2.stop();
|
|
2275
|
+
}
|
|
2276
|
+
}, _callee2);
|
|
2277
|
+
}));
|
|
2278
|
+
return _fetchNotifications.apply(this, arguments);
|
|
2279
|
+
}
|
|
2280
|
+
function fetchNotification(_x5, _x6, _x7) {
|
|
2281
|
+
return _fetchNotification.apply(this, arguments);
|
|
2282
|
+
}
|
|
2283
|
+
function _fetchNotification() {
|
|
2284
|
+
_fetchNotification = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(userId, communicationId, _ref3) {
|
|
2285
|
+
var messageService, jwt, url, response;
|
|
2286
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
2287
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
2288
|
+
case 0:
|
|
2289
|
+
messageService = _ref3.messageService, jwt = _ref3.jwt;
|
|
2290
|
+
url = "".concat(messageService, "/users/").concat(encodeURIComponent(userId), "/communications/").concat(encodeURIComponent(communicationId));
|
|
2291
|
+
_context3.next = 4;
|
|
2292
|
+
return fetch(url, {
|
|
2293
|
+
method: 'GET',
|
|
2294
|
+
headers: {
|
|
2295
|
+
'Content-Type': 'application/json',
|
|
2296
|
+
Authorization: "Bearer ".concat(jwt)
|
|
2297
|
+
}
|
|
2298
|
+
});
|
|
2299
|
+
case 4:
|
|
2300
|
+
response = _context3.sent;
|
|
2301
|
+
return _context3.abrupt("return", requestJson(response));
|
|
2302
|
+
case 6:
|
|
2303
|
+
case "end":
|
|
2304
|
+
return _context3.stop();
|
|
2305
|
+
}
|
|
2306
|
+
}, _callee3);
|
|
2307
|
+
}));
|
|
2308
|
+
return _fetchNotification.apply(this, arguments);
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
function NotificationPopupContent(_ref) {
|
|
2312
|
+
var notification = _ref.notification;
|
|
2313
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
2314
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
2315
|
+
className: popupDate,
|
|
2316
|
+
children: /*#__PURE__*/jsx("span", {
|
|
2317
|
+
children: DivaUtils.formatDate(notification.sentAt, false)
|
|
2318
|
+
})
|
|
2319
|
+
}), /*#__PURE__*/jsx("hr", {
|
|
2320
|
+
className: popupDivider
|
|
2321
|
+
}), /*#__PURE__*/jsx("div", {
|
|
2322
|
+
className: popupContent,
|
|
2323
|
+
children: notification.content
|
|
2324
|
+
})]
|
|
2325
|
+
});
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2329
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2330
|
+
function applyMarkReadUpdate(items, communicationId) {
|
|
2331
|
+
var target = items.find(function (item) {
|
|
2332
|
+
return item._id === communicationId;
|
|
2333
|
+
});
|
|
2334
|
+
if (!target || target.hasRead) {
|
|
2335
|
+
return {
|
|
2336
|
+
items: items,
|
|
2337
|
+
decrement: false
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2340
|
+
return {
|
|
2341
|
+
items: items.map(function (item) {
|
|
2342
|
+
return item._id === communicationId ? _objectSpread$3(_objectSpread$3({}, item), {}, {
|
|
2343
|
+
hasRead: true
|
|
2344
|
+
}) : item;
|
|
2345
|
+
}),
|
|
2346
|
+
decrement: true
|
|
2347
|
+
};
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
function useNotifications() {
|
|
2351
|
+
var _useTranslation = useTranslation(),
|
|
2352
|
+
t = _useTranslation.t;
|
|
2353
|
+
var _useDivaCore = useDivaCore(),
|
|
2354
|
+
_useDivaCore$state = _useDivaCore.state,
|
|
2355
|
+
user = _useDivaCore$state.user,
|
|
2356
|
+
jwt = _useDivaCore$state.jwt,
|
|
2357
|
+
apiConfig = _useDivaCore$state.apiConfig,
|
|
2358
|
+
organization = _useDivaCore$state.organization,
|
|
2359
|
+
openModal = _useDivaCore.actions.openModal;
|
|
2360
|
+
var _useState = useState(0),
|
|
2361
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2362
|
+
totalUnread = _useState2[0],
|
|
2363
|
+
setTotalUnread = _useState2[1];
|
|
2364
|
+
var _useState3 = useState(false),
|
|
2365
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2366
|
+
open = _useState4[0],
|
|
2367
|
+
setOpen = _useState4[1];
|
|
2368
|
+
var _useState5 = useState([]),
|
|
2369
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2370
|
+
items = _useState6[0],
|
|
2371
|
+
setItems = _useState6[1];
|
|
2372
|
+
var _useState7 = useState(false),
|
|
2373
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
2374
|
+
loading = _useState8[0],
|
|
2375
|
+
setLoading = _useState8[1];
|
|
2376
|
+
var _useState9 = useState(undefined),
|
|
2377
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
2378
|
+
errorMessage = _useState10[0],
|
|
2379
|
+
setErrorMessage = _useState10[1];
|
|
2380
|
+
var userId = user === null || user === void 0 ? void 0 : user._id;
|
|
2381
|
+
var organizationId = organization === null || organization === void 0 ? void 0 : organization._id;
|
|
2382
|
+
var messageService = apiConfig.messageService;
|
|
2383
|
+
var enabled = !!userId && !!jwt;
|
|
2384
|
+
var apiContext = useMemo(function () {
|
|
2385
|
+
return userId && jwt ? {
|
|
2386
|
+
messageService: messageService,
|
|
2387
|
+
jwt: jwt
|
|
2388
|
+
} : null;
|
|
2389
|
+
}, [userId, jwt, messageService]);
|
|
2390
|
+
var loadCounts = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
2391
|
+
var response;
|
|
2392
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2393
|
+
while (1) switch (_context.prev = _context.next) {
|
|
2394
|
+
case 0:
|
|
2395
|
+
if (!(!apiContext || !userId)) {
|
|
2396
|
+
_context.next = 2;
|
|
2397
|
+
break;
|
|
2398
|
+
}
|
|
2399
|
+
return _context.abrupt("return");
|
|
2400
|
+
case 2:
|
|
2401
|
+
_context.prev = 2;
|
|
2402
|
+
_context.next = 5;
|
|
2403
|
+
return fetchNotifications(userId, {
|
|
2404
|
+
limit: 0,
|
|
2405
|
+
offset: 0
|
|
2406
|
+
}, apiContext);
|
|
2407
|
+
case 5:
|
|
2408
|
+
response = _context.sent;
|
|
2409
|
+
setTotalUnread(response.totalUnread);
|
|
2410
|
+
_context.next = 12;
|
|
2411
|
+
break;
|
|
2412
|
+
case 9:
|
|
2413
|
+
_context.prev = 9;
|
|
2414
|
+
_context.t0 = _context["catch"](2);
|
|
2415
|
+
setErrorMessage(t('navigator.notifications.error.list'));
|
|
2416
|
+
case 12:
|
|
2417
|
+
case "end":
|
|
2418
|
+
return _context.stop();
|
|
2419
|
+
}
|
|
2420
|
+
}, _callee, null, [[2, 9]]);
|
|
2421
|
+
})), [apiContext, t, userId, organizationId]);
|
|
2422
|
+
var loadPage = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
2423
|
+
var response;
|
|
2424
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
2425
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
2426
|
+
case 0:
|
|
2427
|
+
if (!(!apiContext || !userId)) {
|
|
2428
|
+
_context2.next = 2;
|
|
2429
|
+
break;
|
|
2430
|
+
}
|
|
2431
|
+
return _context2.abrupt("return");
|
|
2432
|
+
case 2:
|
|
2433
|
+
setLoading(true);
|
|
2434
|
+
setErrorMessage(undefined);
|
|
2435
|
+
_context2.prev = 4;
|
|
2436
|
+
_context2.next = 7;
|
|
2437
|
+
return fetchNotifications(userId, {
|
|
2438
|
+
limit: 20,
|
|
2439
|
+
offset: 0
|
|
2440
|
+
}, apiContext);
|
|
2441
|
+
case 7:
|
|
2442
|
+
response = _context2.sent;
|
|
2443
|
+
setItems(response.data);
|
|
2444
|
+
setTotalUnread(response.totalUnread);
|
|
2445
|
+
_context2.next = 15;
|
|
2446
|
+
break;
|
|
2447
|
+
case 12:
|
|
2448
|
+
_context2.prev = 12;
|
|
2449
|
+
_context2.t0 = _context2["catch"](4);
|
|
2450
|
+
setErrorMessage(t('navigator.notifications.error.list'));
|
|
2451
|
+
case 15:
|
|
2452
|
+
_context2.prev = 15;
|
|
2453
|
+
setLoading(false);
|
|
2454
|
+
return _context2.finish(15);
|
|
2455
|
+
case 18:
|
|
2456
|
+
case "end":
|
|
2457
|
+
return _context2.stop();
|
|
2458
|
+
}
|
|
2459
|
+
}, _callee2, null, [[4, 12, 15, 18]]);
|
|
2460
|
+
})), [apiContext, t, userId, organizationId]);
|
|
2461
|
+
useEffect(function () {
|
|
2462
|
+
void loadCounts();
|
|
2463
|
+
}, [loadCounts]);
|
|
2464
|
+
var onBellClick = function onBellClick(event) {
|
|
2465
|
+
event.stopPropagation();
|
|
2466
|
+
if (!userId) {
|
|
2467
|
+
return;
|
|
2468
|
+
}
|
|
2469
|
+
if (!open) {
|
|
2470
|
+
setOpen(true);
|
|
2471
|
+
void loadPage();
|
|
2472
|
+
return;
|
|
2473
|
+
}
|
|
2474
|
+
setOpen(false);
|
|
2475
|
+
};
|
|
2476
|
+
var _onSelect = useCallback(/*#__PURE__*/function () {
|
|
2477
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(communicationId) {
|
|
2478
|
+
var notificationData, updated;
|
|
2479
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
2480
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
2481
|
+
case 0:
|
|
2482
|
+
if (!(!apiContext || !userId)) {
|
|
2483
|
+
_context3.next = 2;
|
|
2484
|
+
break;
|
|
2485
|
+
}
|
|
2486
|
+
return _context3.abrupt("return");
|
|
2487
|
+
case 2:
|
|
2488
|
+
_context3.prev = 2;
|
|
2489
|
+
_context3.next = 5;
|
|
2490
|
+
return fetchNotification(userId, communicationId, apiContext);
|
|
2491
|
+
case 5:
|
|
2492
|
+
notificationData = _context3.sent;
|
|
2493
|
+
setOpen(false);
|
|
2494
|
+
updated = applyMarkReadUpdate(items, communicationId);
|
|
2495
|
+
setItems(updated.items);
|
|
2496
|
+
if (updated.decrement) {
|
|
2497
|
+
setTotalUnread(function (c) {
|
|
2498
|
+
return Math.max(0, c - 1);
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
openModal({
|
|
2502
|
+
rejectByIcon: true,
|
|
2503
|
+
title: notificationData.subject,
|
|
2504
|
+
width: 520,
|
|
2505
|
+
maxWidth: '95%',
|
|
2506
|
+
content: /*#__PURE__*/jsx(NotificationPopupContent, {
|
|
2507
|
+
notification: notificationData
|
|
2508
|
+
})
|
|
2509
|
+
});
|
|
2510
|
+
_context3.next = 16;
|
|
2511
|
+
break;
|
|
2512
|
+
case 13:
|
|
2513
|
+
_context3.prev = 13;
|
|
2514
|
+
_context3.t0 = _context3["catch"](2);
|
|
2515
|
+
setErrorMessage(t('navigator.notifications.error.open'));
|
|
2516
|
+
case 16:
|
|
2517
|
+
case "end":
|
|
2518
|
+
return _context3.stop();
|
|
2519
|
+
}
|
|
2520
|
+
}, _callee3, null, [[2, 13]]);
|
|
2521
|
+
}));
|
|
2522
|
+
return function (_x) {
|
|
2523
|
+
return _ref3.apply(this, arguments);
|
|
2524
|
+
};
|
|
2525
|
+
}(), [apiContext, items, openModal, t, userId, setOpen]);
|
|
2526
|
+
return {
|
|
2527
|
+
enabled: enabled,
|
|
2528
|
+
totalUnread: totalUnread,
|
|
2529
|
+
open: open,
|
|
2530
|
+
items: items,
|
|
2531
|
+
loading: loading,
|
|
2532
|
+
errorMessage: errorMessage,
|
|
2533
|
+
onBellClick: onBellClick,
|
|
2534
|
+
onSelect: function onSelect(id) {
|
|
2535
|
+
return void _onSelect(id);
|
|
2536
|
+
},
|
|
2537
|
+
setOpen: setOpen,
|
|
2538
|
+
onRefresh: function onRefresh() {
|
|
2539
|
+
return void loadPage();
|
|
2540
|
+
}
|
|
2541
|
+
};
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2048
2544
|
var button = "button-gd-lv";
|
|
2049
2545
|
var label = "label-tExJZ";
|
|
2050
2546
|
var scannerIcon = "scanner-icon-ve-jf";
|
|
@@ -2913,8 +3409,9 @@ var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2913
3409
|
availableLanguages = _useDivaCore$state.availableLanguages;
|
|
2914
3410
|
var _useState = useState(false),
|
|
2915
3411
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2916
|
-
|
|
2917
|
-
|
|
3412
|
+
openProfile = _useState2[0],
|
|
3413
|
+
setOpenProfile = _useState2[1];
|
|
3414
|
+
var notifications = useNotifications();
|
|
2918
3415
|
|
|
2919
3416
|
//in the case the core is faster initalized than the first render we have to set this state async to guarantee the animation
|
|
2920
3417
|
var _useState3 = useState(true),
|
|
@@ -2928,23 +3425,31 @@ var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2928
3425
|
}, []);
|
|
2929
3426
|
useEffect(function () {
|
|
2930
3427
|
var checkIfClickedOutside = function checkIfClickedOutside(e) {
|
|
2931
|
-
if (
|
|
2932
|
-
|
|
3428
|
+
if (openProfile) {
|
|
3429
|
+
setOpenProfile(false);
|
|
3430
|
+
}
|
|
3431
|
+
if (notifications.open) {
|
|
3432
|
+
notifications.setOpen(false);
|
|
2933
3433
|
}
|
|
2934
3434
|
};
|
|
2935
3435
|
document.addEventListener('click', checkIfClickedOutside);
|
|
2936
3436
|
return function () {
|
|
2937
3437
|
document.removeEventListener('click', checkIfClickedOutside);
|
|
2938
3438
|
};
|
|
2939
|
-
}, [open]);
|
|
3439
|
+
}, [openProfile, notifications.open, notifications.setOpen]);
|
|
2940
3440
|
var onClickProfile = function onClickProfile(e) {
|
|
2941
3441
|
if (user) {
|
|
2942
|
-
|
|
3442
|
+
setOpenProfile(!openProfile);
|
|
3443
|
+
notifications.setOpen(false);
|
|
2943
3444
|
} else {
|
|
2944
3445
|
showLoginWindow();
|
|
2945
3446
|
}
|
|
2946
3447
|
e.stopPropagation();
|
|
2947
3448
|
};
|
|
3449
|
+
var onBellClick = function onBellClick(e) {
|
|
3450
|
+
setOpenProfile(false);
|
|
3451
|
+
notifications.onBellClick(e);
|
|
3452
|
+
};
|
|
2948
3453
|
|
|
2949
3454
|
//still show buttons on tablet in landscape mode
|
|
2950
3455
|
var showButtons = !isMobile || isTablet && !isPortrait;
|
|
@@ -2971,13 +3476,16 @@ var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2971
3476
|
children: [!!qrCodeScanner && /*#__PURE__*/jsx(QrCodeScanner, {}), !!customHeaderElement && /*#__PURE__*/jsx("div", {
|
|
2972
3477
|
className: customArea,
|
|
2973
3478
|
children: customHeaderElement()
|
|
3479
|
+
}), notifications.enabled && /*#__PURE__*/jsx(NotificationsBell, {
|
|
3480
|
+
totalUnread: notifications.totalUnread,
|
|
3481
|
+
onClick: onBellClick
|
|
2974
3482
|
}), showButtons && (showOrgName || showUserName) && /*#__PURE__*/jsx(OrganizationName, {
|
|
2975
3483
|
showOrgName: showOrgName,
|
|
2976
3484
|
showUserName: showUserName,
|
|
2977
3485
|
onClickProfile: onClickProfile
|
|
2978
3486
|
}), /*#__PURE__*/jsx(ProfileImg, {
|
|
2979
3487
|
onClickProfile: onClickProfile,
|
|
2980
|
-
open:
|
|
3488
|
+
open: openProfile
|
|
2981
3489
|
}), !showLogin && availableLanguages.length > 1 && /*#__PURE__*/jsx(LanguageSelector, {})]
|
|
2982
3490
|
})]
|
|
2983
3491
|
}), (breadcrumbs === null || breadcrumbs === void 0 || (_breadcrumbs$breadcru = breadcrumbs.breadcrumbs.path) === null || _breadcrumbs$breadcru === void 0 ? void 0 : _breadcrumbs$breadcru.length) && /*#__PURE__*/jsx("div", {
|
|
@@ -2985,8 +3493,15 @@ var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2985
3493
|
children: /*#__PURE__*/jsx(Breadcrumbs, {})
|
|
2986
3494
|
})]
|
|
2987
3495
|
}), user && showLogin && /*#__PURE__*/jsx(Profil, {
|
|
2988
|
-
open:
|
|
2989
|
-
setOpen:
|
|
3496
|
+
open: openProfile,
|
|
3497
|
+
setOpen: setOpenProfile
|
|
3498
|
+
}), notifications.enabled && /*#__PURE__*/jsx(NotificationsDropdown, {
|
|
3499
|
+
open: notifications.open,
|
|
3500
|
+
items: notifications.items,
|
|
3501
|
+
loading: notifications.loading,
|
|
3502
|
+
errorMessage: notifications.errorMessage,
|
|
3503
|
+
onSelect: notifications.onSelect,
|
|
3504
|
+
onRefresh: notifications.onRefresh
|
|
2990
3505
|
})]
|
|
2991
3506
|
});
|
|
2992
3507
|
});
|
|
@@ -3032,15 +3547,15 @@ function Language (_ref) {
|
|
|
3032
3547
|
onChange = _ref.onChange;
|
|
3033
3548
|
var _useState = useState(false),
|
|
3034
3549
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3035
|
-
open
|
|
3550
|
+
open = _useState2[0],
|
|
3036
3551
|
setOpen = _useState2[1];
|
|
3037
3552
|
var _useTranslation = useTranslation(),
|
|
3038
3553
|
t = _useTranslation.t;
|
|
3039
3554
|
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3040
3555
|
children: [/*#__PURE__*/jsx("div", {
|
|
3041
|
-
className: classNames(open
|
|
3556
|
+
className: classNames(open ? expanderOpen : expanderClosed),
|
|
3042
3557
|
onClick: function onClick() {
|
|
3043
|
-
return setOpen(!open
|
|
3558
|
+
return setOpen(!open);
|
|
3044
3559
|
},
|
|
3045
3560
|
children: /*#__PURE__*/jsxs("div", {
|
|
3046
3561
|
style: {
|
|
@@ -3057,7 +3572,7 @@ function Language (_ref) {
|
|
|
3057
3572
|
})]
|
|
3058
3573
|
})
|
|
3059
3574
|
}), /*#__PURE__*/jsx("div", {
|
|
3060
|
-
className: classNames(selector, open
|
|
3575
|
+
className: classNames(selector, open ? open$1 : languageClosed),
|
|
3061
3576
|
children: data.map(function (l) {
|
|
3062
3577
|
return /*#__PURE__*/jsx("div", {
|
|
3063
3578
|
className: classNames(item$1, l == selectedLang ? selected$2 : undefined),
|