@bigbinary/neeto-molecules 1.15.37 → 1.15.38

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.
@@ -0,0 +1,199 @@
1
+ 'use strict';
2
+
3
+ var _extends = require('./extends-1b35a664.js');
4
+ var defineProperty = require('./defineProperty-886ed289.js');
5
+ var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
6
+ var React = require('react');
7
+ var classnames = require('classnames');
8
+ var general = require('@bigbinary/neeto-commons-frontend/utils/general');
9
+ var neetoIcons = require('@bigbinary/neeto-icons');
10
+ var neetoui = require('@bigbinary/neetoui');
11
+ var ramda = require('ramda');
12
+ var neetoCist = require('@bigbinary/neeto-cist');
13
+ var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
14
+ var useRegisterNavigationCheckpoint = require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
15
+ var reactRouterDom = require('react-router-dom');
16
+ var injectCss = require('./inject-css-80a5faa3.js');
17
+
18
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
+
20
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
22
+
23
+ var _excluded$1 = ["checkpointKey", "to", "children"];
24
+ var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
25
+ var checkpointKey = _ref.checkpointKey,
26
+ to = _ref.to,
27
+ children = _ref.children,
28
+ others = objectWithoutProperties._objectWithoutProperties(_ref, _excluded$1);
29
+ var _useNavigationCheckpo = useRegisterNavigationCheckpoint.useNavigationCheckpoints(checkpointKey),
30
+ checkpoint = _useNavigationCheckpo[checkpointKey];
31
+ return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends._extends({
32
+ to: checkpoint || to
33
+ }, others, {
34
+ key: to
35
+ }), children);
36
+ };
37
+
38
+ var SUB_LINK_TYPES = {
39
+ SYSTEM_VIEW: "system_view",
40
+ SEGMENTS: "segments"
41
+ };
42
+
43
+ var isSubRouteActive = function isSubRouteActive(subRoute, location) {
44
+ var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
45
+ var targetUrl = new URL(subRoute, window.location.origin);
46
+ var targetSearchParams = targetUrl.searchParams;
47
+ var targetSearchKeys = Array.from(targetSearchParams.keys());
48
+ return ramda.all(function (key) {
49
+ return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
50
+ }, targetSearchKeys) && ramda.equals(currentBrowserUrl.pathname, targetUrl.pathname);
51
+ };
52
+ var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
53
+ var _globalProps$user, _globalProps$user2;
54
+ var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
55
+ return "sidebarState-".concat(user);
56
+ };
57
+ var filterByPermissions = ramda.curry(function (_ref) {
58
+ var permissions = _ref.permissions;
59
+ if (permissions && neetoCist.isNotEmpty(permissions)) {
60
+ return ramda.is(Array, permissions) ? permissions.some(ramda.includes(ramda.__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
61
+ }
62
+ return true;
63
+ });
64
+
65
+ var SubLink = function SubLink(_ref) {
66
+ var to = _ref.to,
67
+ label = _ref.label,
68
+ _ref$type = _ref.type,
69
+ type = _ref$type === void 0 ? SUB_LINK_TYPES.SYSTEM_VIEW : _ref$type,
70
+ count = _ref.count,
71
+ isSectionHeader = _ref.isSectionHeader,
72
+ isCountsLoading = _ref.isCountsLoading,
73
+ dataCy = _ref["data-cy"],
74
+ _ref$entity = _ref.entity,
75
+ entity = _ref$entity === void 0 ? "" : _ref$entity,
76
+ _ref$columns = _ref.columns,
77
+ columns = _ref$columns === void 0 ? [] : _ref$columns;
78
+ if (type === SUB_LINK_TYPES.SEGMENTS) {
79
+ return /*#__PURE__*/React__default["default"].createElement(neetoFiltersFrontend.Segments, {
80
+ columns: columns,
81
+ entity: entity,
82
+ isIndependent: false
83
+ });
84
+ }
85
+ var dataCyPrefix = dataCy || neetoCist.hyphenate(label);
86
+ var renderCount = function renderCount(count) {
87
+ return count > 999 ? "999+" : count;
88
+ };
89
+ return /*#__PURE__*/React__default["default"].createElement(CheckPointNavLinks, {
90
+ to: to,
91
+ activeClassName: "active",
92
+ className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
93
+ "data-cy": "".concat(dataCyPrefix, "-sub-link"),
94
+ isActive: function isActive() {
95
+ return !isSectionHeader && isSubRouteActive(to, location);
96
+ }
97
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
98
+ className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
99
+ component: "span",
100
+ "data-cy": "".concat(dataCyPrefix, "-sub-link-label"),
101
+ style: "body2"
102
+ }, label), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
103
+ className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
104
+ component: "span",
105
+ "data-cy": "".concat(dataCyPrefix, "-sub-link-count"),
106
+ style: "body2"
107
+ }, isCountsLoading ? /*#__PURE__*/React__default["default"].createElement("div", {
108
+ className: "neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse"
109
+ }) : renderCount(count)));
110
+ };
111
+
112
+ function ownKeys$1(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; }
113
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
114
+ var Items = function Items(_ref) {
115
+ var items = _ref.items,
116
+ _ref$isSettingsItems = _ref.isSettingsItems,
117
+ isSettingsItems = _ref$isSettingsItems === void 0 ? false : _ref$isSettingsItems,
118
+ isCountsLoading = _ref.isCountsLoading;
119
+ return /*#__PURE__*/React__default["default"].createElement("div", {
120
+ className: "neeto-molecules-sidebar__sublink-wrapper",
121
+ "data-cy": "sidebar-sub-link-wrapper"
122
+ }, items.filter(filterByPermissions).map(function (subItem, subIndex) {
123
+ var _subItem$to;
124
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
125
+ key: subIndex
126
+ }, /*#__PURE__*/React__default["default"].createElement(SubLink, _extends._extends({}, _objectSpread$1(_objectSpread$1({}, subItem), {}, {
127
+ isCountsLoading: isCountsLoading
128
+ }), {
129
+ isSectionHeader: neetoCist.isPresent(subItem.item),
130
+ to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path
131
+ })), isSettingsItems && neetoCist.isPresent(subItem.items) && /*#__PURE__*/React__default["default"].createElement(Items, {
132
+ isSettingsItems: isSettingsItems,
133
+ items: subItem.items
134
+ }));
135
+ }));
136
+ };
137
+
138
+ var _excluded = ["label", "items", "isConfigureNavLink"];
139
+ function ownKeys(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; }
140
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
141
+ var SelectedLink = function SelectedLink(_ref) {
142
+ var _ref$navLink = _ref.navLink,
143
+ navLink = _ref$navLink === void 0 ? {
144
+ label: "",
145
+ items: [],
146
+ isConfigureNavLink: false
147
+ } : _ref$navLink,
148
+ handleGoBack = _ref.handleGoBack,
149
+ isConfigureSidebar = _ref.isConfigureSidebar;
150
+ var label = navLink.label,
151
+ items = navLink.items,
152
+ isConfigureNavLink = navLink.isConfigureNavLink,
153
+ otherProps = objectWithoutProperties._objectWithoutProperties(navLink, _excluded);
154
+ return /*#__PURE__*/React__default["default"].createElement("div", {
155
+ className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
156
+ "data-cy": "configure-nav-container"
157
+ }, /*#__PURE__*/React__default["default"].createElement("div", _extends._extends({
158
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link",
159
+ onClick: handleGoBack
160
+ }, _objectSpread({}, ramda.omit(["icon"], otherProps))), isConfigureNavLink && /*#__PURE__*/React__default["default"].createElement("span", {
161
+ className: "neeto-molecules-sidebar__link-icon",
162
+ "data-cy": "".concat(general.hyphenize(label), "-go-back-button"),
163
+ "data-testid": "".concat(label, "-go-back-button")
164
+ }, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Left, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
165
+ component: "span",
166
+ style: "body2",
167
+ weight: "normal",
168
+ className: classnames__default["default"]("neeto-molecules-sidebar__link-label", defineProperty._defineProperty({
169
+ "neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
170
+ }, "pl-6", isConfigureSidebar))
171
+ }, label)), items && /*#__PURE__*/React__default["default"].createElement(Items, {
172
+ items: items,
173
+ isSettingsItems: true
174
+ }));
175
+ };
176
+
177
+ var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page-header{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200))}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;border-top:1px solid rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0!important;padding-bottom:8px!important;padding-top:8px!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;margin-bottom:4px;padding:4px 4px 4px 30px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active:before{background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded);content:\"\";height:100%;left:-1px;position:absolute;top:0;width:3px}";
178
+ injectCss.n(css,{});
179
+
180
+ var Chevron = function Chevron(_ref) {
181
+ var style = _ref.style;
182
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
183
+ style: style,
184
+ height: "16",
185
+ viewBox: "0 0 16 16",
186
+ width: "16"
187
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
188
+ d: "M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z",
189
+ fill: "currentColor"
190
+ }));
191
+ };
192
+
193
+ exports.CheckPointNavLinks = CheckPointNavLinks;
194
+ exports.Chevron = Chevron;
195
+ exports.Items = Items;
196
+ exports.SelectedLink = SelectedLink;
197
+ exports.filterByPermissions = filterByPermissions;
198
+ exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
199
+ //# sourceMappingURL=Chevron-3258aee1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chevron-3258aee1.js","sources":["../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/constants.js","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <Items {...{ isSettingsItems }} items={subItem.items} />\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","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KAAK,EAAA,iBAAA,CAAA;AAAkB,GAAA,eAEvC7C,yBAAA,CAAAC,aAAA,CAAC0F,eAAI,EAAA,IAAE,CACH,CACP,eACD3F,yBAAA,CAAAC,aAAA,CAAC+D,kBAAU,EAAA;AACTC,IAAAA,SAAS,EAAC,MAAM;AAChBC,IAAAA,KAAK,EAAC,OAAO;AACb0B,IAAAA,MAAM,EAAC,QAAQ;AACf9B,IAAAA,SAAS,EAAE+B,8BAAU,CAAC,qCAAqC,EAAAC,8BAAA,CAAA;AACzD,MAAA,gDAAgD,EAC9CV,kBAAAA;KACD,EAAA,MAAM,EAAGE,kBAAkB,CAC7B,CAAA;GAEAzC,EAAAA,KACS,CACT,CAAC,EACLuB,KAAK,iBAAIpE,yBAAA,CAAAC,aAAA,CAACkE,KAAK,EAAA;AAAOC,IAAAA,KAAK,EAALA,KAAK;IAAIE,eAAe,EAAA,IAAA;AAAA,GAAE,CAC9C,CAAC,CAAA;AAEV;;;;;AClDA,IAAMyB,OAAO,GAAG,SAAVA,OAAOA,CAAAzG,IAAA,EAAA;AAAA,EAAA,IAAM4E,KAAK,GAAA5E,IAAA,CAAL4E,KAAK,CAAA;EAAA,oBACtBlE,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAWiE,IAAAA,KAAK,EAALA,KAAK;AAAI8B,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAA;GACxDlG,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEkG,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA;;;;;;;;;"}
@@ -1,41 +1,103 @@
1
1
  'use strict';
2
2
 
3
+ var slicedToArray = require('./slicedToArray-f320d9e7.js');
3
4
  var React = require('react');
4
- var sidebar = require('./sidebar-195d99bd.js');
5
+ var classnames = require('classnames');
6
+ var neetoui = require('@bigbinary/neetoui');
7
+ var ramda = require('ramda');
8
+ var reactI18next = require('react-i18next');
9
+ var reactRouterDom = require('react-router-dom');
10
+ var Chevron = require('./Chevron-3258aee1.js');
5
11
  require('./extends-1b35a664.js');
6
12
  require('./defineProperty-886ed289.js');
7
13
  require('./objectWithoutProperties-2fed2d7d.js');
8
- require('classnames');
9
14
  require('@bigbinary/neeto-commons-frontend/utils/general');
10
15
  require('@bigbinary/neeto-icons');
11
- require('@bigbinary/neetoui');
12
- require('ramda');
13
16
  require('@bigbinary/neeto-cist');
14
17
  require('@bigbinary/neeto-filters-frontend');
15
18
  require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
16
- require('react-router-dom');
17
19
  require('./inject-css-80a5faa3.js');
18
20
 
19
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
22
 
21
23
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
22
25
 
23
26
  var ConfigurePageSidebar = function ConfigurePageSidebar(_ref) {
24
27
  var label = _ref.label,
25
- items = _ref.navLinks;
28
+ items = _ref.navLinks,
29
+ configurePageRoute = _ref.configurePageRoute;
30
+ var history = reactRouterDom.useHistory();
31
+ var productName = globalProps.appName.substr(5).toLowerCase();
32
+ var _useState = React.useState(false),
33
+ _useState2 = slicedToArray._slicedToArray(_useState, 2),
34
+ isSidebarPaneOpen = _useState2[0],
35
+ setIsSidebarPaneOpen = _useState2[1];
36
+ var _useState3 = React.useState(false),
37
+ _useState4 = slicedToArray._slicedToArray(_useState3, 2),
38
+ isSidebarCollapsed = _useState4[0],
39
+ setIsSidebarCollapsed = _useState4[1];
40
+ var _useTranslation = reactI18next.useTranslation(),
41
+ t = _useTranslation.t;
42
+ var isLargerScreen = function isLargerScreen() {
43
+ return window.innerWidth > 768;
44
+ };
45
+ var isSidebarClosed = isLargerScreen() ? isSidebarCollapsed : ramda.not(isSidebarPaneOpen);
46
+ React.useEffect(function () {
47
+ var handleResize = function handleResize() {
48
+ if (isLargerScreen()) return;
49
+ setIsSidebarPaneOpen(false);
50
+ setIsSidebarCollapsed(true);
51
+ };
52
+ window.addEventListener("resize", handleResize);
53
+ return function () {
54
+ return window.removeEventListener("resize", handleResize);
55
+ };
56
+ }, []);
57
+ var handleConfigureLinkClick = function handleConfigureLinkClick() {
58
+ history.push(configurePageRoute);
59
+ };
26
60
  return /*#__PURE__*/React__default["default"].createElement("div", {
27
- className: "neeto-molecules-sidebar__wrapper neeto-molecules-sidebar__wrapper__configure-page",
28
- "data-testid": "configure-page-sidebar-container"
61
+ "data-testid": "configure-page-sidebar-container",
62
+ className: classnames__default["default"]("neeto-molecules-sidebar__wrapper neeto-molecules-sidebar__wrapper__configure-page", {
63
+ "neeto-molecules-sidebar__wrapper--collapsed": isLargerScreen() ? isSidebarCollapsed : ramda.not(isSidebarPaneOpen)
64
+ })
29
65
  }, /*#__PURE__*/React__default["default"].createElement("div", {
66
+ className: "neeto-molecules-sidebar__backdrop",
67
+ onClick: function onClick() {
68
+ setIsSidebarPaneOpen(false);
69
+ }
70
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
30
71
  className: "neeto-molecules-sidebar neeto-molecules-sidebar__configure-page neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden neeto-molecules-sidebar--focus-mode",
31
72
  "data-testid": "configure-page-sidebar"
32
- }, /*#__PURE__*/React__default["default"].createElement(sidebar.SelectedLink, {
73
+ }, /*#__PURE__*/React__default["default"].createElement(Chevron.SelectedLink, {
33
74
  isConfigureSidebar: true,
75
+ handleGoBack: handleConfigureLinkClick,
34
76
  navLink: {
35
77
  label: label,
36
78
  items: items
37
79
  }
38
- })));
80
+ })), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
81
+ className: "neeto-molecules-sidebar__toggler",
82
+ "data-cy": "configure-page-neeto-molecules-sidebar-toggler",
83
+ "data-testid": "configure-page-sidebar-toggleButton",
84
+ style: isLargerScreen() ? "text" : "secondary",
85
+ icon: function icon() {
86
+ return /*#__PURE__*/React__default["default"].createElement(Chevron.Chevron, {
87
+ style: {
88
+ color: "rgb(var(--neeto-".concat(productName, "-primary))")
89
+ }
90
+ });
91
+ },
92
+ tooltipProps: {
93
+ content: isSidebarClosed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
94
+ position: "bottom"
95
+ },
96
+ onClick: function onClick() {
97
+ setIsSidebarCollapsed(!isSidebarCollapsed);
98
+ setIsSidebarPaneOpen(ramda.not);
99
+ }
100
+ }));
39
101
  };
40
102
 
41
103
  module.exports = ConfigurePageSidebar;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurePageSidebar.js","sources":["../../src/components/ConfigurePageSidebar.jsx"],"sourcesContent":["import React from \"react\";\n\nimport PropTypes from \"prop-types\";\n\nimport SelectedLink from \"components/Sidebar/Components/Links/SelectedLink\";\nimport \"components/Sidebar/sidebar.scss\";\n\nconst ConfigurePageSidebar = ({ label, navLinks: items }) => (\n <div\n className=\"neeto-molecules-sidebar__wrapper neeto-molecules-sidebar__wrapper__configure-page\"\n data-testid=\"configure-page-sidebar-container\"\n >\n <div\n className=\"neeto-molecules-sidebar neeto-molecules-sidebar__configure-page neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden neeto-molecules-sidebar--focus-mode\"\n data-testid=\"configure-page-sidebar\"\n >\n <SelectedLink isConfigureSidebar navLink={{ label, items }} />\n </div>\n </div>\n);\n\nConfigurePageSidebar.propTypes = {\n /**\n * To specify the label to be shown on top of the sidebar.\n */\n label: PropTypes.string,\n /**\n * To specify the configure nav links to be shown in the sidebar.\n */\n navLinks: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n to: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.shape({ label: PropTypes.string, to: PropTypes.string })\n ),\n })\n ),\n};\n\nexport default ConfigurePageSidebar;\n"],"names":["ConfigurePageSidebar","_ref","label","items","navLinks","React","createElement","className","SelectedLink","isConfigureSidebar","navLink"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAYC,KAAK,GAAAF,IAAA,CAAfG,QAAQ,CAAA;EAAA,oBAC7CC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,mFAAmF;IAC7F,aAAY,EAAA,kCAAA;GAEZF,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,gNAAgN;IAC1N,aAAY,EAAA,wBAAA;AAAwB,GAAA,eAEpCF,yBAAA,CAAAC,aAAA,CAACE,oBAAY,EAAA;IAACC,kBAAkB,EAAA,IAAA;AAACC,IAAAA,OAAO,EAAE;AAAER,MAAAA,KAAK,EAALA,KAAK;AAAEC,MAAAA,KAAK,EAALA,KAAAA;AAAM,KAAA;GAAI,CAC1D,CACF,CAAC,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"ConfigurePageSidebar.js","sources":["../../src/components/ConfigurePageSidebar.jsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport SelectedLink from \"components/Sidebar/Components/Links/SelectedLink\";\nimport \"components/Sidebar/sidebar.scss\";\n\nimport Chevron from \"./Sidebar/Components/Chevron\";\n\nconst ConfigurePageSidebar = ({\n label,\n navLinks: items,\n configurePageRoute,\n}) => {\n const history = useHistory();\n const productName = globalProps.appName.substr(5).toLowerCase();\n const [isSidebarPaneOpen, setIsSidebarPaneOpen] = useState(false);\n const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false);\n\n const { t } = useTranslation();\n\n const isLargerScreen = () => window.innerWidth > 768;\n const isSidebarClosed = isLargerScreen()\n ? isSidebarCollapsed\n : not(isSidebarPaneOpen);\n\n useEffect(() => {\n const handleResize = () => {\n if (isLargerScreen()) return;\n setIsSidebarPaneOpen(false);\n setIsSidebarCollapsed(true);\n };\n window.addEventListener(\"resize\", handleResize);\n\n return () => window.removeEventListener(\"resize\", handleResize);\n }, []);\n\n const handleConfigureLinkClick = () => {\n history.push(configurePageRoute);\n };\n\n return (\n <div\n data-testid=\"configure-page-sidebar-container\"\n className={classnames(\n \"neeto-molecules-sidebar__wrapper neeto-molecules-sidebar__wrapper__configure-page\",\n {\n \"neeto-molecules-sidebar__wrapper--collapsed\": isLargerScreen()\n ? isSidebarCollapsed\n : not(isSidebarPaneOpen),\n }\n )}\n >\n <div\n className=\"neeto-molecules-sidebar__backdrop\"\n onClick={() => {\n setIsSidebarPaneOpen(false);\n }}\n />\n <div\n className=\"neeto-molecules-sidebar neeto-molecules-sidebar__configure-page neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden neeto-molecules-sidebar--focus-mode\"\n data-testid=\"configure-page-sidebar\"\n >\n <SelectedLink\n isConfigureSidebar\n handleGoBack={handleConfigureLinkClick}\n navLink={{ label, items }}\n />\n </div>\n <Button\n className=\"neeto-molecules-sidebar__toggler\"\n data-cy=\"configure-page-neeto-molecules-sidebar-toggler\"\n data-testid=\"configure-page-sidebar-toggleButton\"\n style={isLargerScreen() ? \"text\" : \"secondary\"}\n icon={() => (\n <Chevron\n style={{ color: `rgb(var(--neeto-${productName}-primary))` }}\n />\n )}\n tooltipProps={{\n content: isSidebarClosed\n ? t(\"neetoMolecules.sidebar.showMenu\")\n : t(\"neetoMolecules.sidebar.hideMenu\"),\n position: \"bottom\",\n }}\n onClick={() => {\n setIsSidebarCollapsed(!isSidebarCollapsed);\n setIsSidebarPaneOpen(not);\n }}\n />\n </div>\n );\n};\n\nConfigurePageSidebar.propTypes = {\n /**\n * The route to the landing page of the configure screen.\n * When the user clicks on the 'configure' text, they will be taken to the specified route.\n */\n configurePageRoute: PropTypes.string,\n /**\n * To specify the label to be shown on top of the sidebar.\n */\n label: PropTypes.string,\n /**\n * To specify the configure nav links to be shown in the sidebar.\n */\n navLinks: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n to: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.shape({ label: PropTypes.string, to: PropTypes.string })\n ),\n })\n ),\n};\n\nexport default ConfigurePageSidebar;\n"],"names":["ConfigurePageSidebar","_ref","label","items","navLinks","configurePageRoute","history","useHistory","productName","globalProps","appName","substr","toLowerCase","_useState","useState","_useState2","_slicedToArray","isSidebarPaneOpen","setIsSidebarPaneOpen","_useState3","_useState4","isSidebarCollapsed","setIsSidebarCollapsed","_useTranslation","useTranslation","t","isLargerScreen","window","innerWidth","isSidebarClosed","not","useEffect","handleResize","addEventListener","removeEventListener","handleConfigureLinkClick","push","React","createElement","className","classnames","onClick","SelectedLink","isConfigureSidebar","handleGoBack","navLink","Button","style","icon","Chevron","color","concat","tooltipProps","content","position"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAIpB;AAAA,EAAA,IAHJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACKC,KAAK,GAAAF,IAAA,CAAfG,QAAQ;IACRC,kBAAkB,GAAAJ,IAAA,CAAlBI,kBAAkB,CAAA;AAElB,EAAA,IAAMC,OAAO,GAAGC,yBAAU,EAAE,CAAA;AAC5B,EAAA,IAAMC,WAAW,GAAGC,WAAW,CAACC,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,CAAA;AAC/D,EAAA,IAAA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G,KAAK,EAAA,kBAAA,CAAAC,MAAA,CAAqB3C,WAAW,EAAA,YAAA,CAAA;AAAa,SAAA;AAAE,OAC9D,CAAC,CAAA;KACF;AACF4C,IAAAA,YAAY,EAAE;MACZC,OAAO,EAAExB,eAAe,GACpBJ,CAAC,CAAC,iCAAiC,CAAC,GACpCA,CAAC,CAAC,iCAAiC,CAAC;AACxC6B,MAAAA,QAAQ,EAAE,QAAA;KACV;IACFb,OAAO,EAAE,SAAAA,OAAAA,GAAM;MACbnB,qBAAqB,CAAC,CAACD,kBAAkB,CAAC,CAAA;MAC1CH,oBAAoB,CAACY,SAAG,CAAC,CAAA;AAC3B,KAAA;AAAE,GACH,CACE,CAAC,CAAA;AAEV;;;;"}
@@ -11,13 +11,13 @@ var neetoui = require('@bigbinary/neetoui');
11
11
  var ramda = require('ramda');
12
12
  var reactI18next = require('react-i18next');
13
13
  var reactRouterDom = require('react-router-dom');
14
+ var Chevron = require('./Chevron-3258aee1.js');
14
15
  var useFetchNeetoApps = require('@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps');
15
16
  var ProductTypefaceLogos = require('@bigbinary/neeto-icons/typeface-logos');
16
17
  var _extends = require('./extends-1b35a664.js');
17
18
  var defineProperty = require('./defineProperty-886ed289.js');
18
19
  var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
19
20
  var neetoIcons = require('@bigbinary/neeto-icons');
20
- var sidebar = require('./sidebar-195d99bd.js');
21
21
  require('@bigbinary/neeto-commons-frontend/utils/general');
22
22
  require('@bigbinary/neeto-filters-frontend');
23
23
  require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
@@ -49,19 +49,6 @@ var useLocalStorage__default = /*#__PURE__*/_interopDefaultLegacy(useLocalStorag
49
49
  var useFetchNeetoApps__default = /*#__PURE__*/_interopDefaultLegacy(useFetchNeetoApps);
50
50
  var ProductTypefaceLogos__namespace = /*#__PURE__*/_interopNamespace(ProductTypefaceLogos);
51
51
 
52
- var Chevron = function Chevron(_ref) {
53
- var style = _ref.style;
54
- return /*#__PURE__*/React__default["default"].createElement("svg", {
55
- style: style,
56
- height: "16",
57
- viewBox: "0 0 16 16",
58
- width: "16"
59
- }, /*#__PURE__*/React__default["default"].createElement("path", {
60
- d: "M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z",
61
- fill: "currentColor"
62
- }));
63
- };
64
-
65
52
  var Header = function Header(_ref) {
66
53
  var _ProductTypefaceLogos;
67
54
  var customLogo = _ref.customLogo,
@@ -122,7 +109,7 @@ var Links = function Links(_ref) {
122
109
  };
123
110
  return /*#__PURE__*/React__default["default"].createElement("div", {
124
111
  className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
125
- }, navLinks.filter(sidebar.filterByPermissions).map(function (navLink, index) {
112
+ }, navLinks.filter(Chevron.filterByPermissions).map(function (navLink, index) {
126
113
  var label = navLink.label,
127
114
  to = navLink.to,
128
115
  icon = navLink.icon,
@@ -139,7 +126,7 @@ var Links = function Links(_ref) {
139
126
  var isMenuExpanded = isActive() && isActiveLinkExpanded && !isCountsLoadingDeprecated;
140
127
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
141
128
  key: index
142
- }, /*#__PURE__*/React__default["default"].createElement(sidebar.CheckPointNavLinks, _extends._extends({
129
+ }, /*#__PURE__*/React__default["default"].createElement(Chevron.CheckPointNavLinks, _extends._extends({
143
130
  activeClassName: "active",
144
131
  className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
145
132
  "data-testid": "navlink-".concat(neetoCist.hyphenate(label)),
@@ -168,7 +155,7 @@ var Links = function Links(_ref) {
168
155
  })
169
156
  }, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Down, {
170
157
  size: 16
171
- }))), items && !isConfigureNavLink && isMenuExpanded && /*#__PURE__*/React__default["default"].createElement(sidebar.Items, _objectSpread({
158
+ }))), items && !isConfigureNavLink && isMenuExpanded && /*#__PURE__*/React__default["default"].createElement(Chevron.Items, _objectSpread({
172
159
  isCountsLoading: isCountsLoading,
173
160
  items: items
174
161
  }, otherProps)));
@@ -189,7 +176,7 @@ var Sidebar = function Sidebar(_ref) {
189
176
  _useState4 = slicedToArray._slicedToArray(_useState3, 2),
190
177
  selectedNavLinkRoute = _useState4[0],
191
178
  setSelectedNavLinkRoute = _useState4[1];
192
- var _useLocalStorage = useLocalStorage__default["default"](sidebar.getSidebarStateLocalStorageKey(), false),
179
+ var _useLocalStorage = useLocalStorage__default["default"](Chevron.getSidebarStateLocalStorageKey(), false),
193
180
  _useLocalStorage2 = slicedToArray._slicedToArray(_useLocalStorage, 2),
194
181
  isSidebarCollapsed = _useLocalStorage2[0],
195
182
  setIsSidebarCollapsed = _useLocalStorage2[1];
@@ -256,7 +243,7 @@ var Sidebar = function Sidebar(_ref) {
256
243
  clearSettingsNav: function clearSettingsNav() {
257
244
  return setSelectedNavLinkRoute(null);
258
245
  }
259
- }), neetoCist.isPresent(selectedNavLinkRoute) ? /*#__PURE__*/React__default["default"].createElement(sidebar.SelectedLink, {
246
+ }), neetoCist.isPresent(selectedNavLinkRoute) ? /*#__PURE__*/React__default["default"].createElement(Chevron.SelectedLink, {
260
247
  handleGoBack: handleGoBack,
261
248
  navLink: neetoCist.findLastBy({
262
249
  to: selectedNavLinkRoute
@@ -271,7 +258,7 @@ var Sidebar = function Sidebar(_ref) {
271
258
  "data-testid": "sidebar-toggleButton",
272
259
  style: isLargerScreen() ? "text" : "secondary",
273
260
  icon: function icon() {
274
- return /*#__PURE__*/React__default["default"].createElement(Chevron, {
261
+ return /*#__PURE__*/React__default["default"].createElement(Chevron.Chevron, {
275
262
  style: {
276
263
  color: "rgb(var(--neeto-".concat(productName, "-primary))")
277
264
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sources":["../../src/components/Sidebar/Components/Chevron.jsx","../../src/components/Sidebar/Components/Header.jsx","../../src/components/Sidebar/Components/Links/index.jsx","../../src/components/Sidebar/index.jsx"],"sourcesContent":["import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n","import React from \"react\";\n\nimport { capitalize, findBy } from \"neetocist\";\nimport useFetchNeetoApps from \"neetocommons/react-utils/useFetchNeetoApps\";\nimport { Neeto } from \"neetoicons/typeface-logos\";\nimport * as ProductTypefaceLogos from \"neetoicons/typeface-logos\";\nimport { Link } from \"react-router-dom\";\n\nconst Header = ({ customLogo, clearSettingsNav }) => {\n const productName = globalProps.appName.substr(5);\n const logoName = `Neeto${capitalize(productName.toLowerCase())}`;\n const ProductTypefaceLogo = ProductTypefaceLogos[logoName] ?? Neeto;\n const LogoComponent = customLogo ?? ProductTypefaceLogo;\n\n const { data } = useFetchNeetoApps();\n\n let homePath = \"/\";\n if (data?.neetoApps) {\n const thisApp = findBy({ name: productName }, data.neetoApps);\n if (thisApp?.url) {\n homePath = new URL(thisApp?.url).pathname;\n }\n }\n\n return (\n <div\n className=\"neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"sidebar-info\"\n >\n <Link\n className=\"neeto-molecules-sidebar__logo neeto-ui-w-full\"\n to={homePath}\n onClick={clearSettingsNav}\n >\n <LogoComponent />\n </Link>\n </div>\n );\n};\n\nexport default React.memo(Header);\n","import React, { useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { hyphenate, isNotEmpty, isNotPresent } from \"neetocist\";\nimport { Down } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { is, not } from \"ramda\";\nimport { useLocation } from \"react-router-dom\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\nimport Items from \"./Items\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Links = ({\n navLinks,\n isCountsLoading: isCountsLoadingDeprecated,\n setSelectedNavLinkRoute,\n}) => {\n const location = useLocation();\n const [isActiveLinkExpanded, setIsActiveLinkExpanded] = useState(true);\n\n const handleNavLinkClick = ({ event, isActive, items, navLink }) => {\n if (isNotPresent(items)) return;\n\n if (navLink.isConfigureNavLink && isNotEmpty(navLink.items)) {\n setSelectedNavLinkRoute(navLink.to);\n }\n\n if (isActive()) {\n setIsActiveLinkExpanded(not);\n event.preventDefault();\n\n return;\n }\n\n setIsActiveLinkExpanded(true);\n };\n\n return (\n <div className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable\">\n {navLinks.filter(filterByPermissions).map((navLink, index) => {\n const {\n label,\n to,\n icon,\n items,\n isConfigureNavLink,\n isCountsLoading = false,\n ...otherProps\n } = navLink;\n const IconSVG = icon;\n const url = new URL(to, window.location.href);\n const isActive = () =>\n is(Function, otherProps.isActive)\n ? otherProps.isActive()\n : location.pathname.startsWith(url.pathname);\n\n const isMenuExpanded =\n isActive() && isActiveLinkExpanded && !isCountsLoadingDeprecated;\n\n return (\n <React.Fragment key={index}>\n <CheckPointNavLinks\n activeClassName=\"active\"\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link\"\n data-testid={`navlink-${hyphenate(label)}`}\n onClick={event =>\n handleNavLinkClick({ event, isActive, items, navLink })\n }\n {...{ isActive, to, ...otherProps }}\n >\n {icon && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-testid={label}\n >\n <IconSVG />\n </span>\n )}\n <Typography\n className=\"neeto-molecules-sidebar__link-label\"\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n >\n {label}\n </Typography>\n {items && !isConfigureNavLink && (\n <span\n className={classnames(\n \"neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret\",\n {\n \"neeto-molecules-sidebar__link-icon--rotate\":\n isMenuExpanded,\n }\n )}\n >\n <Down size={16} />\n </span>\n )}\n </CheckPointNavLinks>\n {items && !isConfigureNavLink && isMenuExpanded && (\n <Items {...{ isCountsLoading, items, ...otherProps }} />\n )}\n </React.Fragment>\n );\n })}\n </div>\n );\n};\n\nexport default Links;\n","import React, { useEffect, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent, findLastBy } from \"neetocist\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport useLocalStorage from \"neetocommons/react-utils/useLocalStorage\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { findLast, is, not } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useLocation, useHistory } from \"react-router-dom\";\n\nimport Chevron from \"./Components/Chevron\";\nimport Header from \"./Components/Header\";\nimport Links from \"./Components/Links\";\nimport SelectedLink from \"./Components/Links/SelectedLink\";\nimport \"./sidebar.scss\";\nimport { getSidebarStateLocalStorageKey } from \"./utils\";\n\nconst Sidebar = ({ navLinks, customLogo, isCountsLoading = false }) => {\n const productName = globalProps.appName.substr(5).toLowerCase();\n const [isSidebarPaneOpen, setIsSidebarPaneOpen] = useState(false);\n const [selectedNavLinkRoute, setSelectedNavLinkRoute] = useState(null);\n const [isSidebarCollapsed, setIsSidebarCollapsed] = useLocalStorage(\n getSidebarStateLocalStorageKey(),\n false\n );\n\n const location = useLocation();\n const history = useHistory();\n const { t } = useTranslation();\n\n const isLargerScreen = () => window.innerWidth > 768;\n const isSidebarClosed = isLargerScreen()\n ? isSidebarCollapsed\n : not(isSidebarPaneOpen);\n\n useEffect(() => {\n if (!isPresent(navLinks)) return;\n const currentLink = findLast(({ to, isActive }) => {\n const url = new URL(to, window.location.href);\n\n return is(Function, isActive)\n ? isActive()\n : location.pathname.includes(url.pathname);\n })(navLinks);\n\n if (isPresent(currentLink)) {\n setSelectedNavLinkRoute(\n currentLink.isConfigureNavLink ? currentLink.to : null\n );\n }\n }, []);\n\n useEffect(() => {\n const handleResize = () => {\n if (isLargerScreen()) return;\n setIsSidebarPaneOpen(false);\n setIsSidebarCollapsed(true);\n };\n window.addEventListener(\"resize\", handleResize);\n\n return () => window.removeEventListener(\"resize\", handleResize);\n }, []);\n\n const handleGoBack = event => {\n event.preventDefault();\n setSelectedNavLinkRoute(null);\n const settingsNavLink = navLinks.find(\n link => isPresent(link.isConfigureNavLink) && link.isConfigureNavLink\n );\n if (settingsNavLink.to) {\n history.push(buildUrl(settingsNavLink.to));\n }\n };\n\n return (\n <div\n data-testid=\"sidebar-container\"\n className={classnames(\"neeto-molecules-sidebar__wrapper\", {\n \"neeto-molecules-sidebar__wrapper--collapsed\": isLargerScreen()\n ? isSidebarCollapsed\n : not(isSidebarPaneOpen),\n })}\n >\n <div\n className=\"neeto-molecules-sidebar__backdrop\"\n onClick={() => {\n setIsSidebarPaneOpen(false);\n setSelectedNavLinkRoute(null);\n }}\n />\n <div\n data-cy=\"sidebar-wrapper\"\n data-testid=\"sidebar\"\n className={classnames(\n \"neeto-molecules-sidebar neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden\",\n {\n \"neeto-molecules-sidebar--focus-mode\":\n isPresent(selectedNavLinkRoute),\n }\n )}\n >\n <Header\n {...{ customLogo }}\n clearSettingsNav={() => setSelectedNavLinkRoute(null)}\n />\n {isPresent(selectedNavLinkRoute) ? (\n <SelectedLink\n {...{ handleGoBack }}\n navLink={findLastBy({ to: selectedNavLinkRoute }, navLinks)}\n />\n ) : (\n <Links {...{ isCountsLoading, navLinks, setSelectedNavLinkRoute }} />\n )}\n </div>\n <Button\n className=\"neeto-molecules-sidebar__toggler\"\n data-cy=\"neeto-molecules-sidebar-toggler\"\n data-testid=\"sidebar-toggleButton\"\n style={isLargerScreen() ? \"text\" : \"secondary\"}\n icon={() => (\n <Chevron\n style={{ color: `rgb(var(--neeto-${productName}-primary))` }}\n />\n )}\n tooltipProps={{\n content: isSidebarClosed\n ? t(\"neetoMolecules.sidebar.showMenu\")\n : t(\"neetoMolecules.sidebar.hideMenu\"),\n position: \"bottom\",\n }}\n onClick={() => {\n setIsSidebarCollapsed(!isSidebarCollapsed);\n setIsSidebarPaneOpen(not);\n }}\n />\n </div>\n );\n};\n\nSidebar.propTypes = {\n /**\n * To specify the navlinks to be shown in sidebar.\n */\n navLinks: PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n label: PropTypes.string,\n to: PropTypes.string,\n isActive: PropTypes.func,\n checkpointKey: PropTypes.string,\n isCountsLoading: PropTypes.bool,\n items: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n to: PropTypes.string,\n count: PropTypes.number,\n isActive: PropTypes.func,\n type: PropTypes.string,\n filters: PropTypes.array,\n checkpointKey: PropTypes.string,\n })\n ),\n })\n ),\n /**\n * To override the logo displayed on the sidebar.\n */\n customLogo: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n /**\n * Boolean to notate whether the counts are being fetched.\n */\n isCountsLoading: PropTypes.bool,\n};\n\nexport default Sidebar;\n"],"names":["Chevron","_ref","style","React","createElement","height","viewBox","width","d","fill","Header","_ProductTypefaceLogos","customLogo","clearSettingsNav","productName","globalProps","appName","substr","logoName","concat","capitalize","toLowerCase","ProductTypefaceLogo","ProductTypefaceLogos","Neeto","LogoComponent","_useFetchNeetoApps","useFetchNeetoApps","data","homePath","neetoApps","thisApp","findBy","name","url","URL","pathname","className","Link","to","onClick","memo","Links","navLinks","isCountsLoadingDeprecated","isCountsLoading","setSelectedNavLinkRoute","location","useLocation","_useState","useState","_useState2","_slicedToArray","isActiveLinkExpanded","setIsActiveLinkExpanded","handleNavLinkClick","_ref2","event","isActive","items","navLink","isNotPresent","isConfigureNavLink","isNotEmpty","not","preventDefault","filter","filterByPermissions","map","index","label","icon","_navLink$isCountsLoad","otherProps","_objectWithoutProperties","_excluded","IconSVG","window","href","is","Function","startsWith","isMenuExpanded","Fragment","key","CheckPointNavLinks","_extends","activeClassName","hyphenate","_objectSpread","Typography","component","weight","classnames","Down","size","Items","Sidebar","_ref$isCountsLoading","isSidebarPaneOpen","setIsSidebarPaneOpen","_useState3","_useState4","selectedNavLinkRoute","_useLocalStorage","useLocalStorage","getSidebarStateLocalStorageKey","_useLocalStorage2","isSidebarCollapsed","setIsSidebarCollapsed","history","useHistory","_useTranslation","useTranslation","t","isLargerScreen","innerWidth","isSidebarClosed","useEffect","isPresent","currentLink","findLast","includes","handleResize","addEventListener","removeEventListener","handleGoBack","settingsNavLink","find","link","push","buildUrl","SelectedLink","findLastBy","Button","color","tooltipProps","content","position"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;EAAA,oBACtBC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAWF,IAAAA,KAAK,EAALA,KAAK;AAAIG,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAA;GACxDJ,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEI,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA,CACP;;ACDD,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAAT,IAAA,EAAyC;AAAA,EAAA,IAAAU,qBAAA,CAAA;AAAA,EAAA,IAAnCC,UAAU,GAAAX,IAAA,CAAVW,UAAU;IAAEC,gBAAgB,GAAAZ,IAAA,CAAhBY,gBAAgB,CAAA;EAC5C,IAAMC,WAAW,GAAGC,WAAW,CAACC,OAAO,CAACC,MAAM,CAAC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EAAEgE,oBAAAA;AAAqB,KAAC,EAAE5D,QAAQ,CAAA;AAAE,GAC7D,CAAC,gBAEFxC,yBAAA,CAAAC,aAAA,CAACsC,KAAK,EAAA;AAAOG,IAAAA,eAAe,EAAfA,eAAe;AAAEF,IAAAA,QAAQ,EAARA,QAAQ;AAAEG,IAAAA,uBAAuB,EAAvBA,uBAAAA;AAAuB,GAAK,CAEnE,CAAC,eACN3C,yBAAA,CAAAC,aAAA,CAACkI,cAAM,EAAA;AACLjG,IAAAA,SAAS,EAAC,kCAAkC;AAC5C,IAAA,SAAA,EAAQ,iCAAiC;AACzC,IAAA,aAAA,EAAY,sBAAsB;AAClCnC,IAAAA,KAAK,EAAEiH,cAAc,EAAE,GAAG,MAAM,GAAG,WAAY;IAC/C5C,IAAI,EAAE,SAAAA,IAAA,GAAA;AAAA,MAAA,oBACJpE,yBAAA,CAAAC,aAAA,CAACJ,OAAO,EAAA;AACNE,QAAAA,KAAK,EAAE;UAAEqI,KAAK,EAAA,kBAAA,CAAApH,MAAA,CAAqBL,WAAW,EAAA,YAAA,CAAA;AAAa,SAAA;AAAE,OAC9D,CAAC,CAAA;KACF;AACF0H,IAAAA,YAAY,EAAE;MACZC,OAAO,EAAEpB,eAAe,GACpBH,CAAC,CAAC,iCAAiC,CAAC,GACpCA,CAAC,CAAC,iCAAiC,CAAC;AACxCwB,MAAAA,QAAQ,EAAE,QAAA;KACV;IACFlG,OAAO,EAAE,SAAAA,OAAAA,GAAM;MACbqE,qBAAqB,CAAC,CAACD,kBAAkB,CAAC,CAAA;MAC1CR,oBAAoB,CAACpC,SAAG,CAAC,CAAA;AAC3B,KAAA;AAAE,GACH,CACE,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Sidebar.js","sources":["../../src/components/Sidebar/Components/Header.jsx","../../src/components/Sidebar/Components/Links/index.jsx","../../src/components/Sidebar/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { capitalize, findBy } from \"neetocist\";\nimport useFetchNeetoApps from \"neetocommons/react-utils/useFetchNeetoApps\";\nimport { Neeto } from \"neetoicons/typeface-logos\";\nimport * as ProductTypefaceLogos from \"neetoicons/typeface-logos\";\nimport { Link } from \"react-router-dom\";\n\nconst Header = ({ customLogo, clearSettingsNav }) => {\n const productName = globalProps.appName.substr(5);\n const logoName = `Neeto${capitalize(productName.toLowerCase())}`;\n const ProductTypefaceLogo = ProductTypefaceLogos[logoName] ?? Neeto;\n const LogoComponent = customLogo ?? ProductTypefaceLogo;\n\n const { data } = useFetchNeetoApps();\n\n let homePath = \"/\";\n if (data?.neetoApps) {\n const thisApp = findBy({ name: productName }, data.neetoApps);\n if (thisApp?.url) {\n homePath = new URL(thisApp?.url).pathname;\n }\n }\n\n return (\n <div\n className=\"neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"sidebar-info\"\n >\n <Link\n className=\"neeto-molecules-sidebar__logo neeto-ui-w-full\"\n to={homePath}\n onClick={clearSettingsNav}\n >\n <LogoComponent />\n </Link>\n </div>\n );\n};\n\nexport default React.memo(Header);\n","import React, { useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { hyphenate, isNotEmpty, isNotPresent } from \"neetocist\";\nimport { Down } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { is, not } from \"ramda\";\nimport { useLocation } from \"react-router-dom\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\nimport Items from \"./Items\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Links = ({\n navLinks,\n isCountsLoading: isCountsLoadingDeprecated,\n setSelectedNavLinkRoute,\n}) => {\n const location = useLocation();\n const [isActiveLinkExpanded, setIsActiveLinkExpanded] = useState(true);\n\n const handleNavLinkClick = ({ event, isActive, items, navLink }) => {\n if (isNotPresent(items)) return;\n\n if (navLink.isConfigureNavLink && isNotEmpty(navLink.items)) {\n setSelectedNavLinkRoute(navLink.to);\n }\n\n if (isActive()) {\n setIsActiveLinkExpanded(not);\n event.preventDefault();\n\n return;\n }\n\n setIsActiveLinkExpanded(true);\n };\n\n return (\n <div className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable\">\n {navLinks.filter(filterByPermissions).map((navLink, index) => {\n const {\n label,\n to,\n icon,\n items,\n isConfigureNavLink,\n isCountsLoading = false,\n ...otherProps\n } = navLink;\n const IconSVG = icon;\n const url = new URL(to, window.location.href);\n const isActive = () =>\n is(Function, otherProps.isActive)\n ? otherProps.isActive()\n : location.pathname.startsWith(url.pathname);\n\n const isMenuExpanded =\n isActive() && isActiveLinkExpanded && !isCountsLoadingDeprecated;\n\n return (\n <React.Fragment key={index}>\n <CheckPointNavLinks\n activeClassName=\"active\"\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link\"\n data-testid={`navlink-${hyphenate(label)}`}\n onClick={event =>\n handleNavLinkClick({ event, isActive, items, navLink })\n }\n {...{ isActive, to, ...otherProps }}\n >\n {icon && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-testid={label}\n >\n <IconSVG />\n </span>\n )}\n <Typography\n className=\"neeto-molecules-sidebar__link-label\"\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n >\n {label}\n </Typography>\n {items && !isConfigureNavLink && (\n <span\n className={classnames(\n \"neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret\",\n {\n \"neeto-molecules-sidebar__link-icon--rotate\":\n isMenuExpanded,\n }\n )}\n >\n <Down size={16} />\n </span>\n )}\n </CheckPointNavLinks>\n {items && !isConfigureNavLink && isMenuExpanded && (\n <Items {...{ isCountsLoading, items, ...otherProps }} />\n )}\n </React.Fragment>\n );\n })}\n </div>\n );\n};\n\nexport default Links;\n","import React, { useEffect, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent, findLastBy } from \"neetocist\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport useLocalStorage from \"neetocommons/react-utils/useLocalStorage\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { findLast, is, not } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useLocation, useHistory } from \"react-router-dom\";\n\nimport Chevron from \"./Components/Chevron\";\nimport Header from \"./Components/Header\";\nimport Links from \"./Components/Links\";\nimport SelectedLink from \"./Components/Links/SelectedLink\";\nimport \"./sidebar.scss\";\nimport { getSidebarStateLocalStorageKey } from \"./utils\";\n\nconst Sidebar = ({ navLinks, customLogo, isCountsLoading = false }) => {\n const productName = globalProps.appName.substr(5).toLowerCase();\n const [isSidebarPaneOpen, setIsSidebarPaneOpen] = useState(false);\n const [selectedNavLinkRoute, setSelectedNavLinkRoute] = useState(null);\n const [isSidebarCollapsed, setIsSidebarCollapsed] = useLocalStorage(\n getSidebarStateLocalStorageKey(),\n false\n );\n\n const location = useLocation();\n const history = useHistory();\n const { t } = useTranslation();\n\n const isLargerScreen = () => window.innerWidth > 768;\n const isSidebarClosed = isLargerScreen()\n ? isSidebarCollapsed\n : not(isSidebarPaneOpen);\n\n useEffect(() => {\n if (!isPresent(navLinks)) return;\n const currentLink = findLast(({ to, isActive }) => {\n const url = new URL(to, window.location.href);\n\n return is(Function, isActive)\n ? isActive()\n : location.pathname.includes(url.pathname);\n })(navLinks);\n\n if (isPresent(currentLink)) {\n setSelectedNavLinkRoute(\n currentLink.isConfigureNavLink ? currentLink.to : null\n );\n }\n }, []);\n\n useEffect(() => {\n const handleResize = () => {\n if (isLargerScreen()) return;\n setIsSidebarPaneOpen(false);\n setIsSidebarCollapsed(true);\n };\n window.addEventListener(\"resize\", handleResize);\n\n return () => window.removeEventListener(\"resize\", handleResize);\n }, []);\n\n const handleGoBack = event => {\n event.preventDefault();\n setSelectedNavLinkRoute(null);\n const settingsNavLink = navLinks.find(\n link => isPresent(link.isConfigureNavLink) && link.isConfigureNavLink\n );\n if (settingsNavLink.to) {\n history.push(buildUrl(settingsNavLink.to));\n }\n };\n\n return (\n <div\n data-testid=\"sidebar-container\"\n className={classnames(\"neeto-molecules-sidebar__wrapper\", {\n \"neeto-molecules-sidebar__wrapper--collapsed\": isLargerScreen()\n ? isSidebarCollapsed\n : not(isSidebarPaneOpen),\n })}\n >\n <div\n className=\"neeto-molecules-sidebar__backdrop\"\n onClick={() => {\n setIsSidebarPaneOpen(false);\n setSelectedNavLinkRoute(null);\n }}\n />\n <div\n data-cy=\"sidebar-wrapper\"\n data-testid=\"sidebar\"\n className={classnames(\n \"neeto-molecules-sidebar neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden\",\n {\n \"neeto-molecules-sidebar--focus-mode\":\n isPresent(selectedNavLinkRoute),\n }\n )}\n >\n <Header\n {...{ customLogo }}\n clearSettingsNav={() => setSelectedNavLinkRoute(null)}\n />\n {isPresent(selectedNavLinkRoute) ? (\n <SelectedLink\n {...{ handleGoBack }}\n navLink={findLastBy({ to: selectedNavLinkRoute }, navLinks)}\n />\n ) : (\n <Links {...{ isCountsLoading, navLinks, setSelectedNavLinkRoute }} />\n )}\n </div>\n <Button\n className=\"neeto-molecules-sidebar__toggler\"\n data-cy=\"neeto-molecules-sidebar-toggler\"\n data-testid=\"sidebar-toggleButton\"\n style={isLargerScreen() ? \"text\" : \"secondary\"}\n icon={() => (\n <Chevron\n style={{ color: `rgb(var(--neeto-${productName}-primary))` }}\n />\n )}\n tooltipProps={{\n content: isSidebarClosed\n ? t(\"neetoMolecules.sidebar.showMenu\")\n : t(\"neetoMolecules.sidebar.hideMenu\"),\n position: \"bottom\",\n }}\n onClick={() => {\n setIsSidebarCollapsed(!isSidebarCollapsed);\n setIsSidebarPaneOpen(not);\n }}\n />\n </div>\n );\n};\n\nSidebar.propTypes = {\n /**\n * To specify the navlinks to be shown in sidebar.\n */\n navLinks: PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n label: PropTypes.string,\n to: PropTypes.string,\n isActive: PropTypes.func,\n checkpointKey: PropTypes.string,\n isCountsLoading: PropTypes.bool,\n items: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n to: PropTypes.string,\n count: PropTypes.number,\n isActive: PropTypes.func,\n type: PropTypes.string,\n filters: PropTypes.array,\n checkpointKey: PropTypes.string,\n })\n ),\n })\n ),\n /**\n * To override the logo displayed on the sidebar.\n */\n customLogo: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n /**\n * Boolean to notate whether the counts are being fetched.\n */\n isCountsLoading: PropTypes.bool,\n};\n\nexport default Sidebar;\n"],"names":["Header","_ref","_ProductTypefaceLogos","customLogo","clearSettingsNav","productName","globalProps","appName","substr","logoName","concat","capitalize","toLowerCase","ProductTypefaceLogo","ProductTypefaceLogos","Neeto","LogoComponent","_useFetchNeetoApps","useFetchNeetoApps","data","homePath","neetoApps","thisApp","findBy","name","url","URL","pathname","React","createElement","className","Link","to","onClick","memo","Links","navLinks","isCountsLoadingDeprecated","isCountsLoading","setSelectedNavLinkRoute","location","useLocation","_useState","useState","_useState2","_slicedToArray","isActiveLinkExpanded","setIsActiveLinkExpanded","handleNavLinkClick","_ref2","event","isActive","items","navLink","isNotPresent","isConfigureNavLink","isNotEmpty","not","preventDefault","filter","filterByPermissions","map","index","label","icon","_navLink$isCountsLoad","otherProps","_objectWithoutProperties","_excluded","IconSVG","window","href","is","Function","startsWith","isMenuExpanded","Fragment","key","CheckPointNavLinks","_extends","activeClassName","hyphenate","_objectSpread","Typography","component","style","weight","classnames","Down","size","Items","Sidebar","_ref$isCountsLoading","isSidebarPaneOpen","setIsSidebarPaneOpen","_useState3","_useState4","selectedNavLinkRoute","_useLocalStorage","useLocalStorage","getSidebarStateLocalStorageKey","_useLocalStorage2","isSidebarCollapsed","setIsSidebarCollapsed","history","useHistory","_useTranslation","useTranslation","t","isLargerScreen","innerWidth","isSidebarClosed","useEffect","isPresent","currentLink","findLast","includes","handleResize","addEventListener","removeEventListener","handleGoBack","settingsNavLink","find","link","push","buildUrl","SelectedLink","findLastBy","Button","Chevron","color","tooltipProps","content","position"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAyC;AAAA,EAAA,IAAAC,qBAAA,CAAA;AAAA,EAAA,IAAnCC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAEC,gBAAgB,GAAAH,IAAA,CAAhBG,gBAAgB,CAAA;EAC5C,IAAMC,WAAW,GAAGC,WAAW,CAACC,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAAA;AACjD,EAAA,IAAMC,QAAQ,GAAA,OAAA,CAAAC,MAAA,CAAWC,oBAAU,CAACN,WAAW,CAACO,WAAW,EAAE,CAAC,CAAE,CAAA;AAChE,EAAA,IAAMC,mBAAmB,GAAA,CAAAX,qBAAA,GAAGY,+BAAoB,CAACL,QAAQ,CAAC,MAAAP,IAAAA,IAAAA,qBAAA,KAAAA,KAAAA,CAAAA,GAAAA,qBAAA,GAAIa,0BAAK,CAAA;EACnE,IAAMC,aAAa,GAAGb,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAVA,KAAAA,CAAAA,GAAAA,UAAU,GAAIU,mBAAmB,CAAA;AAEvD,EAAA,IAAAI,kBAAA,GAAiBC,qCAAiB,EAAE;IAA5BC,IAAI,GAAAF,kBAAA,CAAJE,IAAI,CAAA;EAEZ,IAAIC,QAAQ,GAAG,GAAG,CAAA;AAClB,EAAA,IAAID,IAAI,KAAJA,IAAAA,IAAAA,IAAI,eAAJA,IAAI,CAAEE,SAAS,EAAE;IACnB,IAAMC,OAAO,GAAGC,gBAAM,CAAC;AAAEC,MAAAA,IAAI,EAAEnB,WAAAA;AAAY,KAAC,EAAEc,IAAI,CAACE,SAAS,CAAC,CAAA;AAC7D,IAAA,IAAIC,OAAO,KAAPA,IAAAA,IAAAA,OAAO,eAAPA,OAAO,CAAEG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