@copart/ops-tool-kit 1.13.0-beta.25 → 1.13.0-beta.26
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/bin/cli.js +0 -0
- package/dist/ops-tool-kit.js +1147 -613
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
47
47
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
48
48
|
|
|
49
49
|
const name$1 = "@copart/ops-tool-kit";
|
|
50
|
-
const version$3 = "1.13.0-beta.
|
|
50
|
+
const version$3 = "1.13.0-beta.26";
|
|
51
51
|
const main$1 = "dist/ops-tool-kit.js";
|
|
52
52
|
const style = "dist/ops-tool-kit.css";
|
|
53
53
|
const files = [
|
|
@@ -290,54 +290,6 @@ function _createClass$2(e, r, t) {
|
|
|
290
290
|
writable: !1
|
|
291
291
|
}), e;
|
|
292
292
|
}
|
|
293
|
-
function _createForOfIteratorHelper(r, e) {
|
|
294
|
-
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
295
|
-
if (!t) {
|
|
296
|
-
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
297
|
-
t && (r = t);
|
|
298
|
-
var n = 0,
|
|
299
|
-
F = function () {};
|
|
300
|
-
return {
|
|
301
|
-
s: F,
|
|
302
|
-
n: function () {
|
|
303
|
-
return n >= r.length ? {
|
|
304
|
-
done: !0
|
|
305
|
-
} : {
|
|
306
|
-
done: !1,
|
|
307
|
-
value: r[n++]
|
|
308
|
-
};
|
|
309
|
-
},
|
|
310
|
-
e: function (r) {
|
|
311
|
-
throw r;
|
|
312
|
-
},
|
|
313
|
-
f: F
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
317
|
-
}
|
|
318
|
-
var o,
|
|
319
|
-
a = !0,
|
|
320
|
-
u = !1;
|
|
321
|
-
return {
|
|
322
|
-
s: function () {
|
|
323
|
-
t = t.call(r);
|
|
324
|
-
},
|
|
325
|
-
n: function () {
|
|
326
|
-
var r = t.next();
|
|
327
|
-
return a = r.done, r;
|
|
328
|
-
},
|
|
329
|
-
e: function (r) {
|
|
330
|
-
u = !0, o = r;
|
|
331
|
-
},
|
|
332
|
-
f: function () {
|
|
333
|
-
try {
|
|
334
|
-
a || null == t.return || t.return();
|
|
335
|
-
} finally {
|
|
336
|
-
if (u) throw o;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
293
|
function _defineProperty$2(e, r, t) {
|
|
342
294
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
343
295
|
value: t,
|
|
@@ -2969,10 +2921,10 @@ var BreadcrumbsProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
2969
2921
|
}(React__namespace.Component);
|
|
2970
2922
|
|
|
2971
2923
|
var _class;
|
|
2972
|
-
var _excluded$
|
|
2924
|
+
var _excluded$6 = ["breadcrumbs"];
|
|
2973
2925
|
var getCrumbProps = function getCrumbProps(props) {
|
|
2974
2926
|
props.breadcrumbs;
|
|
2975
|
-
var crumbProps = _objectWithoutProperties(props, _excluded$
|
|
2927
|
+
var crumbProps = _objectWithoutProperties(props, _excluded$6);
|
|
2976
2928
|
return crumbProps;
|
|
2977
2929
|
};
|
|
2978
2930
|
var Crumb$1 = withBreadcrumbs(_class = /*#__PURE__*/function (_React$Component) {
|
|
@@ -21345,7 +21297,7 @@ FeedbackDialog.defaultProps = {
|
|
|
21345
21297
|
}
|
|
21346
21298
|
};
|
|
21347
21299
|
|
|
21348
|
-
var css_248z$m = ".utilities_ops-app-frame_AppBarComponent_AppBar--root {\n background-color: var(--blue);\n background-color: var(--blue);\n height: 48px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n white-space: nowrap;\n /* padding-top: env(safe-area-inset-top, 0px); */\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--leftItems {\n width: 100%;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarIcons {\n margin: 0 12px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogo {\n display: flex;\n align-items: center;\n flex-direction: column;\n margin-left: 5px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogoNew {\n display: flex;\n margin: 3px 0 0 16px;\n grid-gap: 10px;\n gap: 10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--moduleName {\n color: white;\n font-size: 11px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items {\n color: white;\n cursor: pointer;\n font-size: 18px;\n display: flex;\n justify-content: center;\n margin: 8px !important;\n position: relative;\n width: 25px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--logout {\n margin-right: 24px !important;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items i {\n color: #fff;\n font-size: 20px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--lightBulbIcon i {\n color: #ffff00;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--language {\n width: auto;\n grid-gap: 4px;\n grid-gap: 5px;\n gap: 5px;\n display: flex;\n font-size: 14px;\n font-weight: 600;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard {\n width: auto;\n cursor: pointer;\n display: flex;\n align-items: center;\n background: #fff;\n color: #1D5AB9;\n font-weight: 600;\n border-radius: 4px;\n font-size: 14px;\n grid-gap: 8px;\n grid-gap: 8px;\n gap: 8px;\n padding: 2px 8px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard span i {\n color: #1D5AB9;\n font-size: 16px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard .utilities_ops-app-frame_AppBarComponent_AppBar--yardNumber {\n font-size: 14px;\n font-weight: 400;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col {\n display: flex;\n color: white;\n font-size: 13px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col svg {\n color: white;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\n width: 6rem;\n margin-top: 0rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--text {\n margin-top: 0.6rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--iconText {\n margin-top: 0.4rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchBar,\n.utilities_ops-app-frame_AppBarComponent_AppBar--placeholderDiv {\n margin-top: -0.2rem;\n margin-left: 2rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarLeft > img.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\n display: inline;\n display: initial;\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-style: italic;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/opensans/v18/memnYaGs126MiZpBA-UFUKXGUdhmIqOjjg.woff2)\n format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--appTitle {\n color: #fff;\n font-family: 'Open Sans', sans-serif;\n font-weight: 600;\n font-style: italic;\n font-size: 14px;\n position: relative;\n left: 16px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--item {\n display: flex;\n color: white;\n font-size: 13px;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon {\n /* margin-left: 10px;\n margin-right: 7px; */\n cursor: pointer;\n display: flex;\n align-items: center;\n background: #fff;\n color: #1D5AB9;\n font-weight: 600;\n border-radius: 4px;\n box-shadow: inset 0px -2px 0px rgba(0, 0, 0, 0.4), 0px 1.6px 3.6px 0px rgba(0, 0, 0, 0.13), 0px 0.3px 0.9px 0px rgba(0, 0, 0, 0.10);\n font-size: 14px;\n grid-gap: 8px;\n gap: 8px;\n margin: 0 8px;\n padding: 6px 20px 7px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span {\n display: flex;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span i {\n font-size: 18px;\n color: #1D5AB9;\n}\n\n/* .searchIcon > div {\n margin-left: 7px;\n} */\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper i {\n color: #fff;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper span {\n display: flex;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault {\n color: white;\n cursor: default;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable,\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\n background-color: white;\n border-radius: 20px;\n margin: 5px;\n padding: 0px 10px;\n height: 25px;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--light {\n border: 1px solid #1d5ab9;\n justify-content: flex-start;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightDefault {\n color: black;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline,\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\n background-color: white;\n border-radius: 20px;\n display: flex;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\n color: green;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable i {\n color: green;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline {\n color: red;\n margin: 5px 0px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline svg {\n margin-right: 5px;\n margin-left: 5px;\n width: 24px;\n height: 24px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--SpinnerWrapper {\n margin-left: 5px;\n display: inline-flex;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i {\n font-size: 16px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i {\n line-height: unset;\n font-size: 16px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable {\n color: green;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\n margin-right: 5px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\n color: red;\n}\n\n/* .userMenu {\n margin-left: 10px !important;\n margin-right: 5px !important;\n} */\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\n margin: 8px;\n display: flex;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\n margin-left: 7px;\n font-size: 14px;\n font-weight: 600;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--feedback {\n margin: 0 !important;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--overflowItems {\n width: 100%;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button {\n cursor: pointer;\n position: relative;\n top: -2px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button i {\n color: #fff;\n font-size: 22px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpDot {\n background-color: #ef5350;\n border-radius: 50%;\n position: absolute;\n top: 3px;\n left: 13px;\n width: 10px;\n height: 10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip{\n position: absolute;\n background: #fff;\n padding: 8px;\n right: 30px;\n top: -2px;\n border-radius: 2px;\n font-weight: 400;\n font-size: 12px;\n cursor: auto;\n color: #000;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip::before{\n content: \"\";\n position: absolute;\n top: 50%;\n left: 100%;\n margin-top: -5px;\n border-width: 5px;\n border-style: solid;\n border-color: transparent transparent transparent #fff;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip i{\n color: #000;\n font-size: 12px;\n margin-left: 5px;\n position: relative;\n top: 1px;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer {\n position: absolute;\n display: flex;\n width: 100vw;\n bottom: 0;\n z-index: 10000;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\n position: absolute;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 425px;\n max-width: 425px;\n background-color: white;\n border: 0px solid;\n padding: 20px 30px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide {\n background-color: rgba(0,0,0,.5);\n width: 100%;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--st0{fill:#0075E6;}\n.utilities_ops-app-frame_AppBarComponent_AppBar--st1{fill:#6A819C;}\n.utilities_ops-app-frame_AppBarComponent_AppBar--st2{fill:#FFFFFF;}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 2px;\n right: 510px;\n height: 38px;\n width: 38px;\n background-color: white;\n z-index: 11000;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--profile {\n padding: 5px 7px;\n background: #fff;\n border-radius: 50%;\n font-weight: 600;\n color: #1d5ab9;\n font-size: 12px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchContainer {\n background: rgba(255, 255, 255, 0.40);\n backdrop-filter: blur(20px);\n position: absolute;\n top: 50px;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 999;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper{\n position: absolute;\n z-index: 10000;\n height: 100vh;\n width: 100vw;\n background-color: rgba(0,0,0,.5);\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\n width: 425px;\n max-width: 425px;\n position: absolute;\n right: 0;\n /* height: calc(100vh - 100px); */\n /* padding: 15px; */\n background-color: white;\n overflow-y: auto;\n}\n\n@media only screen and (max-width: 1024px) {\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\n margin-right: 2px;\n }\n\n /* .searchIcon {\n margin-left: 5px;\n margin-right: 2px;\n }\n\n .searchIcon > div {\n margin-left: 2px;\n } */\n\n /* .userMenu {\n margin-left: 3px !important;\n margin-right: 3px !important;\n } */\n\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\n margin-left: 3px !important;\n margin-right: 3px !important;\n }\n\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\n margin-left: 2px;\n }\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--sideBarWrapper\n{\n position: absolute;\n z-index: 10000;\n height: 100vh;\n top: 100px;\n width: 100vw;\n background-color: rgba(0,0,0,.5);\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv\n{\n width: 425px;\n max-width: 425px;\n position: absolute;\n right: 0;\n /* height: calc(100vh - 100px); */\n background-color: white;\n overflow-y: hidden;\n padding: 10px;\n display: flex;\n flex-direction: column;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar {\n width: 12px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb {\n background-color: #888;\n border-radius: 10px;\n border: 3px solid #f1f1f1;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb:hover {\n background-color: #555;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeader{\n font-size: 24px;\n font-weight: 700;\n padding-bottom: 10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsWrapper{\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\n background-color: #ef5350;\n color: white;\n font-size: 12px;\n width: 1rem;\n border-radius: 50%;\n position: absolute;\n top: -5px;\n left: 11px;\n height: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--twoChars {\n width: 1.1rem;\n height: 1.1rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--threeChars {\n width: 1.3rem;\n height: 1.3rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--notificationIconWrapper {\n cursor: pointer;\n margin-left: 12px;\n position: relative;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\n width: 0px;\n height: 0px;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n border-bottom: 11px solid white;\n position: absolute;\n bottom: -13px;\n right: 5px;\n}\n\n/* .arrowTipContainer.ideaNoteArrow {\n right: 16px;\n} */\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpArrow {\n right: 3px;\n bottom: -10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--profileArrow {\n bottom: -12px;\n right: 8px;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 10px solid white;\n}\n\n@media (max-width: 1366px) {\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\n width: 400px;\n max-width: 400px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\n width: 400px;\n max-width: 400px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\n width: 400px;\n max-width: 400px;\n}\n}\n\n@media (max-width: 768px) {\n .utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\n width: 85%;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\n left: 12px;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\n right: 5px;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\n width: 85% !important;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer iframe {\n width: 85% !important;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\n display: none;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\n width: 85%;\n }\n}";
|
|
21300
|
+
var css_248z$m = ".utilities_ops-app-frame_AppBarComponent_AppBar--root {\n background-color: var(--blue);\n background-color: var(--blue);\n height: 48px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n white-space: nowrap;\n /* padding-top: env(safe-area-inset-top, 0px); */\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--leftItems {\n width: 100%;\n display: flex;\n justify-content: start;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarIcons {\n margin: 0 12px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogo {\n display: flex;\n align-items: center;\n flex-direction: column;\n margin-left: 5px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--copartLogoNew {\n display: flex;\n margin: 3px 0 0 16px;\n grid-gap: 10px;\n gap: 10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--moduleName {\n color: white;\n font-size: 11px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items {\n color: white;\n cursor: pointer;\n font-size: 18px;\n display: flex;\n justify-content: center;\n margin: 8px !important;\n position: relative;\n width: 25px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--logout {\n margin-right: 24px !important;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items i {\n color: #fff;\n font-size: 20px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--lightBulbIcon i {\n color: #ffff00;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--language {\n width: auto;\n grid-gap: 4px;\n grid-gap: 5px;\n gap: 5px;\n display: flex;\n font-size: 14px;\n font-weight: 600;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard {\n width: auto;\n cursor: pointer;\n display: flex;\n align-items: center;\n background: #fff;\n color: #1D5AB9;\n font-weight: 600;\n border-radius: 4px;\n font-size: 14px;\n grid-gap: 8px;\n grid-gap: 8px;\n gap: 8px;\n padding: 2px 8px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard span i {\n color: #1D5AB9;\n font-size: 16px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--yard .utilities_ops-app-frame_AppBarComponent_AppBar--yardNumber {\n font-size: 14px;\n font-weight: 400;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col {\n display: flex;\n color: white;\n font-size: 13px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid .utilities_ops-app-frame_AppBarComponent_AppBar--col svg {\n color: white;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\n width: 6rem;\n margin-top: 0rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--text {\n margin-top: 0.6rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--iconText {\n margin-top: 0.4rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchBar,\n.utilities_ops-app-frame_AppBarComponent_AppBar--placeholderDiv {\n margin-top: -0.2rem;\n margin-left: 2rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--appBarLeft > img.utilities_ops-app-frame_AppBarComponent_AppBar--logo {\n display: inline;\n display: initial;\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-style: italic;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/opensans/v18/memnYaGs126MiZpBA-UFUKXGUdhmIqOjjg.woff2)\n format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--appTitle {\n color: #fff;\n font-family: 'Open Sans', sans-serif;\n font-weight: 600;\n font-style: italic;\n font-size: 14px;\n position: relative;\n left: 16px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--item {\n display: flex;\n color: white;\n font-size: 13px;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon {\n /* margin-left: 10px;\n margin-right: 7px; */\n cursor: pointer;\n display: flex;\n align-items: center;\n background: #fff;\n color: #1D5AB9;\n font-weight: 600;\n border-radius: 4px;\n box-shadow: inset 0px -2px 0px rgba(0, 0, 0, 0.4), 0px 1.6px 3.6px 0px rgba(0, 0, 0, 0.13), 0px 0.3px 0.9px 0px rgba(0, 0, 0, 0.10);\n font-size: 14px;\n grid-gap: 8px;\n gap: 8px;\n margin: 0 8px;\n padding: 6px 20px 7px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span {\n display: flex;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchIcon span i {\n font-size: 18px;\n color: #1D5AB9;\n}\n\n/* .searchIcon > div {\n margin-left: 7px;\n} */\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper i {\n color: #fff;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchWrapper span {\n display: flex;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault {\n color: white;\n cursor: default;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable,\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\n background-color: white;\n border-radius: 20px;\n margin: 5px;\n padding: 0px 10px;\n height: 25px;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--light {\n border: 1px solid #1d5ab9;\n justify-content: flex-start;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightDefault {\n color: black;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline,\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\n background-color: white;\n border-radius: 20px;\n display: flex;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable {\n color: green;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--lightAvailable i {\n color: green;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline {\n color: red;\n margin: 5px 0px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneOffline svg {\n margin-right: 5px;\n margin-left: 5px;\n width: 24px;\n height: 24px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--SpinnerWrapper {\n margin-left: 5px;\n display: inline-flex;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i {\n font-size: 16px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i {\n line-height: unset;\n font-size: 16px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable {\n color: green;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\n margin-right: 5px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable {\n color: red;\n}\n\n/* .userMenu {\n margin-left: 10px !important;\n margin-right: 5px !important;\n} */\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\n margin: 8px;\n display: flex;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\n margin-left: 7px;\n font-size: 14px;\n font-weight: 600;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--feedback {\n margin: 0 !important;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--overflowItems {\n width: 100%;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button {\n cursor: pointer;\n position: relative;\n top: -2px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelp_button i {\n color: #fff;\n font-size: 22px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpDot {\n background-color: #ef5350;\n border-radius: 50%;\n position: absolute;\n top: 3px;\n left: 13px;\n width: 10px;\n height: 10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip{\n position: absolute;\n background: #fff;\n padding: 8px;\n right: 30px;\n top: -2px;\n border-radius: 2px;\n font-weight: 400;\n font-size: 12px;\n cursor: auto;\n color: #000;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip::before{\n content: \"\";\n position: absolute;\n top: 50%;\n left: 100%;\n margin-top: -5px;\n border-width: 5px;\n border-style: solid;\n border-color: transparent transparent transparent #fff;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpTooltip i{\n color: #000;\n font-size: 12px;\n margin-left: 5px;\n position: relative;\n top: 1px;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer {\n position: absolute;\n display: flex;\n width: 100vw;\n bottom: 0;\n z-index: 10000;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\n position: absolute;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 425px;\n max-width: 425px;\n background-color: white;\n border: 0px solid;\n padding: 20px 30px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide {\n background-color: rgba(0,0,0,.5);\n width: 100%;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--st0{fill:#0075E6;}\n.utilities_ops-app-frame_AppBarComponent_AppBar--st1{fill:#6A819C;}\n.utilities_ops-app-frame_AppBarComponent_AppBar--st2{fill:#FFFFFF;}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 2px;\n right: 510px;\n height: 38px;\n width: 38px;\n background-color: white;\n z-index: 11000;\n cursor: pointer;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--profile {\n padding: 5px 7px;\n background: #fff;\n border-radius: 50%;\n font-weight: 600;\n color: #1d5ab9;\n font-size: 12px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--searchContainer {\n background: rgba(255, 255, 255, 0.40);\n backdrop-filter: blur(20px);\n position: absolute;\n top: 50px;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 999;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper{\n position: absolute;\n z-index: 10000;\n height: 100vh;\n width: 100vw;\n background-color: rgba(0,0,0,.5);\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\n width: 425px;\n max-width: 425px;\n position: absolute;\n right: 0;\n /* height: calc(100vh - 100px); */\n /* padding: 15px; */\n background-color: white;\n overflow-y: auto;\n}\n\n@media only screen and (max-width: 1024px) {\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneDefault i,\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneAvailable i,\n .utilities_ops-app-frame_AppBarComponent_AppBar--phoneUnvailable svg {\n margin-right: 2px;\n }\n\n /* .searchIcon {\n margin-left: 5px;\n margin-right: 2px;\n }\n\n .searchIcon > div {\n margin-left: 2px;\n } */\n\n /* .userMenu {\n margin-left: 3px !important;\n margin-right: 3px !important;\n } */\n\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag {\n margin-left: 3px !important;\n margin-right: 3px !important;\n }\n\n .utilities_ops-app-frame_AppBarComponent_AppBar--roleAndFlag > div {\n margin-left: 2px;\n }\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--sideBarWrapper\n{\n position: absolute;\n z-index: 10000;\n height: 100vh;\n top: 100px;\n width: 100vw;\n background-color: rgba(0,0,0,.5);\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv\n{\n width: 425px;\n max-width: 425px;\n position: absolute;\n right: 0;\n /* height: calc(100vh - 100px); */\n background-color: white;\n overflow-y: hidden;\n padding: 10px;\n display: flex;\n flex-direction: column;\n}\n\n/* Stable marker for NAC sidebar v2 detection — must remain in bundle */\n.g2-notifications-sidebar-v2 {\n display: flex;\n flex-direction: column;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar {\n width: 12px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb {\n background-color: #888;\n border-radius: 10px;\n border: 3px solid #f1f1f1;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv::-webkit-scrollbar-thumb:hover {\n background-color: #555;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeader{\n font-size: 20px;\n font-weight: 700;\n padding: 0 20px 12px;\n margin: 0 -10px 12px;\n border-bottom: 1px solid #edebe9;\n color: #323130;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeaderCount{\n font-size: 16px;\n font-weight: 600;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationsWrapper{\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\n background-color: #ef5350;\n color: white;\n font-size: 12px;\n width: 1rem;\n border-radius: 50%;\n position: absolute;\n top: -5px;\n left: 11px;\n height: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--twoChars {\n width: 1.1rem;\n height: 1.1rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount.utilities_ops-app-frame_AppBarComponent_AppBar--threeChars {\n width: 1.3rem;\n height: 1.3rem;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items.utilities_ops-app-frame_AppBarComponent_AppBar--notificationIconWrapper {\n cursor: pointer;\n margin-left: 12px;\n position: relative;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\n width: 0px;\n height: 0px;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n border-bottom: 11px solid white;\n position: absolute;\n bottom: -13px;\n right: 5px;\n}\n\n/* .arrowTipContainer.ideaNoteArrow {\n right: 16px;\n} */\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--mihelpArrow {\n right: 3px;\n bottom: -10px;\n}\n\n.utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer.utilities_ops-app-frame_AppBarComponent_AppBar--profileArrow {\n bottom: -12px;\n right: 8px;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 10px solid white;\n}\n\n@media (max-width: 1366px) {\n.utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\n width: 400px;\n max-width: 400px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\n width: 400px;\n max-width: 400px;\n}\n.utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\n width: 400px;\n max-width: 400px;\n}\n}\n\n@media (max-width: 768px) {\n .utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv {\n width: 85%;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount{\n left: 12px;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer {\n right: 5px;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaNoteIframe {\n width: 85% !important;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer iframe {\n width: 85% !important;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide .utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHideButton {\n display: none;\n }\n .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper .utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar {\n width: 85%;\n }\n}";
|
|
21349
21301
|
styleInject(css_248z$m);
|
|
21350
21302
|
|
|
21351
21303
|
var LogOutMenu = function LogOutMenu(_ref) {
|
|
@@ -21531,15 +21483,17 @@ var MobileMenu = function MobileMenu(props) {
|
|
|
21531
21483
|
var closeSidebar = props.closeSidebar,
|
|
21532
21484
|
logout = props.logout,
|
|
21533
21485
|
items = props.items,
|
|
21534
|
-
|
|
21486
|
+
_props$bannerNotifica = props.bannerNotifications,
|
|
21487
|
+
bannerNotifications = _props$bannerNotifica === void 0 ? [] : _props$bannerNotifica,
|
|
21535
21488
|
sideBarTopValue = props.sideBarTopValue,
|
|
21536
21489
|
availableStatuses = props.availableStatuses,
|
|
21537
21490
|
currentUserStatus = props.currentUserStatus,
|
|
21538
21491
|
onUserStatusUpdate = props.onUserStatusUpdate;
|
|
21492
|
+
var hasBannerNotifications = bannerNotifications.length > 0;
|
|
21539
21493
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21540
21494
|
className: "utilities_ops-app-frame_AppBarComponent_MobileMenu_MobileMenu--mobileMenuSidebarWrapper",
|
|
21541
21495
|
style: {
|
|
21542
|
-
top:
|
|
21496
|
+
top: hasBannerNotifications ? "".concat(sideBarTopValue, "px") : '48px'
|
|
21543
21497
|
},
|
|
21544
21498
|
onClick: closeSidebar
|
|
21545
21499
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -22531,7 +22485,8 @@ var HelpSideBar = function HelpSideBar(_ref) {
|
|
|
22531
22485
|
feedbackConfig = _ref.feedbackConfig,
|
|
22532
22486
|
showMihelpDot = _ref.showMihelpDot,
|
|
22533
22487
|
sideBarTopValue = _ref.sideBarTopValue,
|
|
22534
|
-
|
|
22488
|
+
_ref$bannerNotificati = _ref.bannerNotifications,
|
|
22489
|
+
bannerNotifications = _ref$bannerNotificati === void 0 ? [] : _ref$bannerNotificati;
|
|
22535
22490
|
var _useState = React.useState(null),
|
|
22536
22491
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22537
22492
|
helpContent = _useState2[0],
|
|
@@ -23070,11 +23025,11 @@ var HelpSideBar = function HelpSideBar(_ref) {
|
|
|
23070
23025
|
className: "utilities_ops-app-frame_Help_Help--backdrop",
|
|
23071
23026
|
onClick: handleBackDropClick,
|
|
23072
23027
|
style: {
|
|
23073
|
-
top:
|
|
23028
|
+
top: bannerNotifications.length ? "".concat(sideBarTopValue, "px") : '48px'
|
|
23074
23029
|
}
|
|
23075
23030
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23076
23031
|
style: {
|
|
23077
|
-
height: "calc(100dvh - ".concat(
|
|
23032
|
+
height: "calc(100dvh - ".concat(bannerNotifications.length ? sideBarTopValue : 48, "px)")
|
|
23078
23033
|
},
|
|
23079
23034
|
ref: mihelpRef,
|
|
23080
23035
|
className: _getClassName("miHelpSideBar ".concat(!helpContent || isChrome() && overFlowHidden || !isChrome() && showQuestionSection ? 'overFlowHidden' : ''), _styleModuleImportMap$5, {
|
|
@@ -23521,7 +23476,7 @@ var RoleSelector$2 = function RoleSelector(_ref) {
|
|
|
23521
23476
|
}));
|
|
23522
23477
|
};
|
|
23523
23478
|
|
|
23524
|
-
var _excluded$
|
|
23479
|
+
var _excluded$5 = ["selectedYard", "name", "handleChange", "yardOptions", "label"];
|
|
23525
23480
|
var getDescription = function getDescription(yardOptions) {
|
|
23526
23481
|
return function (code) {
|
|
23527
23482
|
return yardOptions[code].yard_number;
|
|
@@ -23537,7 +23492,7 @@ var YardNumberMenu$2 = function YardNumberMenu(_ref) {
|
|
|
23537
23492
|
handleChange = _ref.handleChange,
|
|
23538
23493
|
yardOptions = _ref.yardOptions,
|
|
23539
23494
|
label = _ref.label,
|
|
23540
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
23495
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
23541
23496
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23542
23497
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--col-1-1"
|
|
23543
23498
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, _extends$1({}, otherProps, {
|
|
@@ -24481,14 +24436,14 @@ var HierarchyMenu = function HierarchyMenu(props) {
|
|
|
24481
24436
|
});
|
|
24482
24437
|
};
|
|
24483
24438
|
|
|
24484
|
-
var _excluded$
|
|
24439
|
+
var _excluded$4 = ["value", "handleChange", "yardOptions", "label", "disabled"];
|
|
24485
24440
|
var YardNumberMenu$1 = function YardNumberMenu(_ref) {
|
|
24486
24441
|
var value = _ref.value,
|
|
24487
24442
|
handleChange = _ref.handleChange,
|
|
24488
24443
|
yardOptions = _ref.yardOptions;
|
|
24489
24444
|
_ref.label;
|
|
24490
24445
|
var disabled = _ref.disabled,
|
|
24491
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
24446
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$4);
|
|
24492
24447
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24493
24448
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_SettingsView--col-1-1"
|
|
24494
24449
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.AutoSelect, _extends$1({}, otherProps, {
|
|
@@ -25576,17 +25531,24 @@ var SettingsView = /*#__PURE__*/function (_React$Component) {
|
|
|
25576
25531
|
}]);
|
|
25577
25532
|
}(React__default["default"].Component);
|
|
25578
25533
|
|
|
25579
|
-
var css_248z$9 = ".utilities_ops-announcements_Banner--appBarContentBox {\n word-break: break-word;\n word-wrap: anywhere;\n white-space: pre-wrap;\n font-weight: 600;\n max-width: 100%;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContent {\n padding: 10px 10px;\n font-size: 13px;\n width: 95%;\n display: flex;\n align-items: center;\n grid-gap: 20px;\n gap: 20px;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationInfoBar {\n display: flex;\n color: #6c7a89;\n grid-gap: 8px;\n gap: 8px;\n width: 90%;\n font-size: 12px;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationInfoBar b {\n color: #171717;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\n color: white;\n width: 26px;\n min-height: 26px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContentBox {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n overflow: hidden;\n /* font-weight: 600; */\n /* autoprefixer: off */\n -webkit-box-orient: vertical;\n /* autoprefixer: on */\n font-size: 12px;\n color: #201f1e;\n cursor: default;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContentBox * {\n display: inline;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContentBox a {\n text-decoration: underline;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n overflow: hidden;\n width: 95%;\n /* font-weight: 600; */\n /* autoprefixer: off */\n -webkit-box-orient: vertical;\n /* autoprefixer: on */\n font-size: 12px;\n padding: 5px 5px;\n min-height: 20px;\n padding: 4px 5px 3px;\n}\n\n.utilities_ops-announcements_Banner--notificationInfoBox b {\n color: #171717;\n}\n\n.utilities_ops-announcements_Banner--notificationInfoBox i {\n font-size: 20px !important;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer {\n display: flex;\n flex-direction: row;\n justify-content: center;\n grid-gap: 10px;\n gap: 10px;\n font-size: 12px;\n align-items: center;\n padding: 0px 10px;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i {\n position: relative;\n right: -4px;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationCountContainer {\n width: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.utilities_ops-announcements_Banner--notificationContainer {\n display: flex;\n flex-direction: row;\n /* padding: 10px 10px; */\n grid-gap: 5px;\n gap: 5px;\n min-height: 40px;\n width: 100%;\n /* padding-top: env(safe-area-inset-top, 0px);\n position: sticky;\n top: 0; */\n}\n\n.utilities_ops-announcements_Banner--sideBar.utilities_ops-announcements_Banner--notificationContainer {\n padding: 8px 6px;\n min-width: 0;\n}\n\n.utilities_ops-announcements_Banner--notificationInfoBox {\n color: white;\n width: 52px;\n min-height: 52px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationInfoBox {\n color: white;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 6px;\n}\n.utilities_ops-announcements_Banner--notificationBarBtn {\n width: 52px;\n min-height: 52px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn {\n width: auto;\n min-height: auto;\n align-items: flex-start;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer i {\n font-size: 22px;\n}\n\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn i {\n font-size: 20px;\n}\n\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\n flex-direction: column;\n /* padding: 10px 10px; */\n grid-gap: 0px;\n}\n\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar i {\n font-size: 13px;\n}\n\n.utilities_ops-announcements_Banner--arrowTipContainer {\n width: 0px;\n height: 0px;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n border-bottom: 13px solid white;\n position: absolute;\n top: 51px;\n right: 50px;\n}\n\n.utilities_ops-announcements_Banner--appBarContentWrapper {\n padding-right: 10px;\n font-size: 12px;\n flex: 1 1 0%;\n min-width: 0;\n display: flex;\n flex-direction: column;\n grid-gap: 4px;\n gap: 4px;\n margin-top: 5px;\n max-width: 100%;\n}\n\n.utilities_ops-announcements_Banner--sideBarNotificationMeta {\n display: flex;\n flex-wrap: wrap;\n min-width: 0;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--appBarContentWrapper {\n padding-left: 10px;\n}\n\n.utilities_ops-announcements_Banner--appBarContentWrapper b {\n color: #171717;\n}\n\n.utilities_ops-announcements_Banner--feedUrl {\n text-decoration: none !important;\n}\n\n.utilities_ops-announcements_Banner--feedUrl i {\n font-size: 14px;\n cursor: pointer;\n color: #1d5ab9;\n left: 2px;\n position: relative;\n top: 2px;\n margin-right: 3px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroup {\n border: 1px solid #e1dfdd;\n border-radius: 8px;\n padding: 12px;\n margin-bottom: 12px;\n background-color: #ffffff;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupHeader {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 10px;\n min-height: 28px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupHeaderWithBack {\n position: relative;\n justify-content: center;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupHeaderTitle {\n display: flex;\n align-items: center;\n justify-content: center;\n grid-gap: 8px;\n gap: 8px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationBackBtn {\n position: absolute;\n left: 0;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n color: #3261bd;\n cursor: pointer;\n width: 28px;\n height: 28px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationBackBtn i {\n font-size: 18px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupAppIcon {\n width: 20px;\n height: 20px;\n -o-object-fit: contain;\n object-fit: contain;\n -webkit-filter: invert(24%) sepia(100%) saturate(1350%) hue-rotate(201deg) brightness(96%) contrast(93%);\n filter: invert(24%) sepia(100%) saturate(1350%) hue-rotate(201deg) brightness(96%) contrast(93%);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupAppIconPlaceholder {\n width: 20px;\n height: 20px;\n border-radius: 4px;\n background-color: #deecf9;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupAppName {\n color: #3261bd;\n color: var(--Type-Copart-Neue-Rest, #3261bd);\n font-family: 'Segoe UI', SegoeUI, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n text-transform: uppercase;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupList {\n display: flex;\n flex-direction: column;\n grid-gap: 6px;\n gap: 6px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRow {\n display: flex;\n align-items: flex-start;\n grid-gap: 8px;\n gap: 8px;\n padding: 8px 10px;\n border-radius: 4px;\n min-height: 36px;\n min-width: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowIcon {\n color: white;\n width: 20px;\n height: 20px;\n min-width: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-top: 1px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowContent {\n flex: 1;\n min-width: 0;\n font-size: 12px;\n font-weight: 600;\n color: #201f1e;\n line-height: 1.35;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowText {\n word-break: break-word;\n word-wrap: anywhere;\n white-space: normal;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowText * {\n display: inline;\n word-wrap: inherit;\n word-break: inherit;\n white-space: inherit;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowMeta {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n grid-gap: 4px;\n gap: 4px;\n flex-shrink: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowLink {\n text-decoration: none;\n line-height: 1;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowLink i {\n font-size: 16px;\n color: #1d5ab9;\n cursor: pointer;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationRowTime {\n font-size: 11px;\n color: #605e5c;\n font-weight: 400;\n white-space: nowrap;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationViewAll {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n grid-gap: 6px;\n gap: 6px;\n width: 100%;\n margin-top: 10px;\n padding: 0;\n border: none;\n background: none;\n color: #0f4cab;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n cursor: pointer;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationViewAll i {\n display: inline-flex;\n align-items: center;\n font-size: 16px;\n line-height: 1;\n}\n\n@media (max-width: 1760px) {\n .utilities_ops-announcements_Banner--notificationBarContent input {\n width: 331px !important;\n }\n}\n";
|
|
25534
|
+
var css_248z$9 = ".utilities_ops-announcements_Banner--appBarContentBox {\n word-break: break-word;\n word-wrap: anywhere;\n white-space: pre-wrap;\n font-weight: 600;\n max-width: 100%;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContent {\n padding: 10px 10px;\n font-size: 13px;\n width: 95%;\n display: flex;\n align-items: center;\n grid-gap: 20px;\n gap: 20px;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationInfoBar {\n display: flex;\n color: #6c7a89;\n grid-gap: 8px;\n gap: 8px;\n width: 90%;\n font-size: 12px;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationInfoBar b {\n color: #171717;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\n color: white;\n width: 26px;\n min-height: 26px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContentBox {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n overflow: hidden;\n /* font-weight: 600; */\n /* autoprefixer: off */\n -webkit-box-orient: vertical;\n /* autoprefixer: on */\n font-size: 12px;\n color: #201f1e;\n cursor: default;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContentBox * {\n display: inline;\n}\n\n.utilities_ops-announcements_Banner--notificationBarContentBox a {\n text-decoration: underline;\n}\n\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n overflow: hidden;\n width: 95%;\n /* font-weight: 600; */\n /* autoprefixer: off */\n -webkit-box-orient: vertical;\n /* autoprefixer: on */\n font-size: 12px;\n padding: 5px 5px;\n min-height: 20px;\n padding: 4px 5px 3px;\n}\n\n.utilities_ops-announcements_Banner--notificationInfoBox b {\n color: #171717;\n}\n\n.utilities_ops-announcements_Banner--notificationInfoBox i {\n font-size: 20px !important;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer {\n display: flex;\n flex-direction: row;\n justify-content: center;\n grid-gap: 10px;\n gap: 10px;\n font-size: 12px;\n align-items: center;\n padding: 0px 10px;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i {\n position: relative;\n right: -4px;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer .utilities_ops-announcements_Banner--notificationCountContainer {\n width: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.utilities_ops-announcements_Banner--notificationContainer {\n display: flex;\n flex-direction: row;\n /* padding: 10px 10px; */\n grid-gap: 5px;\n gap: 5px;\n min-height: 40px;\n width: 100%;\n /* padding-top: env(safe-area-inset-top, 0px);\n position: sticky;\n top: 0; */\n}\n\n.utilities_ops-announcements_Banner--sideBar.utilities_ops-announcements_Banner--notificationContainer {\n padding: 8px 6px;\n min-width: 0;\n}\n\n.utilities_ops-announcements_Banner--notificationInfoBox {\n color: white;\n width: 52px;\n min-height: 52px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationInfoBox {\n color: white;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 6px;\n}\n.utilities_ops-announcements_Banner--notificationBarBtn {\n width: 52px;\n min-height: 52px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn {\n width: auto;\n min-height: auto;\n align-items: flex-start;\n}\n\n.utilities_ops-announcements_Banner--notificationBtnContainer i {\n font-size: 22px;\n}\n\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--notificationBarBtn i {\n font-size: 20px;\n}\n\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\n flex-direction: column;\n /* padding: 10px 10px; */\n grid-gap: 0px;\n}\n\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar i {\n font-size: 13px;\n}\n\n.utilities_ops-announcements_Banner--arrowTipContainer {\n width: 0px;\n height: 0px;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n border-bottom: 13px solid white;\n position: absolute;\n top: 51px;\n right: 50px;\n}\n\n.utilities_ops-announcements_Banner--appBarContentWrapper {\n padding-right: 10px;\n font-size: 12px;\n flex: 1 1 0%;\n min-width: 0;\n display: flex;\n flex-direction: column;\n grid-gap: 4px;\n gap: 4px;\n margin-top: 5px;\n max-width: 100%;\n}\n\n.utilities_ops-announcements_Banner--sideBarNotificationMeta {\n display: flex;\n flex-wrap: wrap;\n min-width: 0;\n align-items: center;\n}\n\n.utilities_ops-announcements_Banner--sideBar .utilities_ops-announcements_Banner--appBarContentWrapper {\n padding-left: 10px;\n}\n\n.utilities_ops-announcements_Banner--appBarContentWrapper b {\n color: #171717;\n}\n\n.utilities_ops-announcements_Banner--feedUrl {\n text-decoration: none !important;\n}\n\n.utilities_ops-announcements_Banner--feedUrl i {\n font-size: 14px;\n cursor: pointer;\n color: #1d5ab9;\n left: 2px;\n position: relative;\n top: 2px;\n margin-right: 3px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationSidebarList {\n display: flex;\n flex-direction: column;\n grid-gap: 8px;\n gap: 8px;\n min-width: 0;\n width: 100%;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardWrapper {\n position: relative;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardWrapperStacked {\n padding-bottom: 12px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardWrapperExpanded {\n padding-bottom: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardWrapperExpanded .utilities_ops-announcements_Banner--sideNotificationStackContainer {\n opacity: 0;\n visibility: hidden;\n -webkit-transform: none;\n transform: none;\n transition: none;\n pointer-events: none;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedGroup {\n display: flex;\n flex-direction: column;\n grid-gap: 5px;\n gap: 5px;\n min-width: 0;\n width: 100%;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationSecondaryBody {\n width: 100%;\n min-width: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationAnimateCollapse {\n display: grid;\n grid-template-rows: 0fr;\n opacity: 0;\n transition:\n grid-template-rows 0.4s cubic-bezier(0.32, 0.72, 0, 1),\n opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1);\n transition:\n grid-template-rows 0.4s cubic-bezier(0.32, 0.72, 0, 1),\n opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1),\n -ms-grid-rows 0.4s cubic-bezier(0.32, 0.72, 0, 1);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationAnimateCollapseOpen {\n grid-template-rows: 1fr;\n opacity: 1;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCollapseBody {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationAnimateCollapseInner {\n overflow: hidden;\n min-height: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCollapseBodyWrap,\n.utilities_ops-announcements_Banner--sideNotificationExpandedItemsWrap {\n min-width: 0;\n width: 100%;\n}\n\n/* Nested white notification cards inside the expanded app group container */\n.utilities_ops-announcements_Banner--sideNotificationExpandedItemsList {\n display: flex;\n flex-direction: column;\n grid-gap: 8px;\n gap: 8px;\n min-width: 0;\n width: 100%;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationItemCard {\n background-color: #ffffff;\n border-radius: 8px;\n padding: 10px 12px;\n min-width: 0;\n width: 100%;\n overflow: hidden;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationStackContainer {\n position: absolute;\n left: 8px;\n right: 8px;\n bottom: 0;\n height: 16px;\n cursor: pointer;\n z-index: 0;\n opacity: 1;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n transition:\n opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1),\n -webkit-transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n transition:\n opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1),\n transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n transition:\n opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1),\n transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),\n -webkit-transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationStackContainerHidden {\n opacity: 0;\n -webkit-transform: translateY(6px);\n transform: translateY(6px);\n pointer-events: none;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationStackLayer {\n position: absolute;\n left: 0;\n right: 0;\n height: 8px;\n background-color: #d6e4f7;\n border-radius: 0 0 8px 8px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationStackLayer1 {\n bottom: 6px;\n background-color: rgba(223, 233, 251, 0.70);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationStackLayer2 {\n bottom: 0px;\n left: 6px;\n right: 6px;\n background-color: rgba(223, 233, 251, 0.50);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCard {\n position: relative;\n z-index: 1;\n background-color: #DFE9FB;\n border-radius: 8px;\n padding: 12px 14px;\n min-width: 0;\n overflow: hidden;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardHeader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n grid-gap: 8px;\n gap: 8px;\n margin: 0 -14px 10px;\n padding: 0 14px 10px;\n border-bottom: 1px solid #C7D1E5;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardHeaderLeft {\n display: flex;\n align-items: center;\n grid-gap: 8px;\n gap: 8px;\n min-width: 0;\n flex: 1;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardHeaderRight {\n display: flex;\n align-items: center;\n grid-gap: 6px;\n gap: 6px;\n flex-shrink: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardHeaderTime {\n font-size: 11px;\n color: rgba(0, 0, 0, 0.20);\n font-weight: 600;\n white-space: nowrap;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationChevronBtn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n color: #000;\n cursor: pointer;\n width: 24px;\n height: 24px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationChevronBtn i,\n.utilities_ops-announcements_Banner--sideNotificationChevronBtn svg {\n font-size: 16px;\n color: #000;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationChevronIcon {\n display: inline-flex;\n transition: -webkit-transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationChevronIconExpanded {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardPreview {\n font-size: 13px;\n font-weight: 600;\n color: #201f1e;\n line-height: 1.4;\n min-width: 0;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n text-overflow: ellipsis;\n word-break: break-word;\n word-wrap: anywhere;\n /* autoprefixer: off */\n -webkit-box-orient: vertical;\n /* autoprefixer: on */\n}\n\n.utilities_ops-announcements_Banner--sideNotificationCardPreview * {\n display: inline;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationMoreBtn {\n display: block;\n margin-top: 8px;\n padding: 0;\n border: none;\n background: none;\n color: #1E54AD;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.2;\n cursor: pointer;\n text-align: left;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationLoadMoreSentinel {\n height: 1px;\n width: 100%;\n flex-shrink: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowMain {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 600;\n color: #201f1e;\n line-height: 1.35;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowText {\n word-break: break-word;\n word-wrap: anywhere;\n white-space: normal;\n display: inline;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowText * {\n white-space: normal;\n word-wrap: anywhere;\n word-break: break-word;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowLink {\n display: inline-flex;\n vertical-align: middle;\n text-decoration: none;\n line-height: 1;\n margin-left: 5px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowLink i {\n font-size: 16px;\n color: #1d5ab9;\n cursor: pointer;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRow {\n display: flex;\n align-items: flex-start;\n grid-gap: 8px;\n gap: 8px;\n min-width: 0;\n width: 100%;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowAction {\n width: 100%;\n margin-top: 8px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowMeta {\n display: flex;\n grid-gap: 8px;\n gap: 8px;\n flex-shrink: 0;\n align-self: flex-start;\n padding-top: 1px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationExpandedRowTime {\n font-size: 11px;\n color: rgba(0, 0, 0, 0.20);\n font-weight: 600;\n white-space: nowrap;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationDismissBtn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n cursor: pointer;\n color: #000;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationDismissBtn i {\n font-size: 18px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupAppIconWrap {\n width: 24px;\n height: 24px;\n border-radius: 4px;\n background-color: #ffffff;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupAppIcon {\n width: 16px;\n height: 16px;\n -o-object-fit: contain;\n object-fit: contain;\n -webkit-filter: invert(24%) sepia(100%) saturate(1350%) hue-rotate(201deg) brightness(96%) contrast(93%);\n filter: invert(24%) sepia(100%) saturate(1350%) hue-rotate(201deg) brightness(96%) contrast(93%);\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupAppIconPlaceholder {\n width: 24px;\n height: 24px;\n border-radius: 4px;\n background-color: #ffffff;\n flex-shrink: 0;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationGroupAppName {\n color: #3261bd;\n font-family: 'Segoe UI', SegoeUI, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n text-transform: uppercase;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n@media (max-width: 1760px) {\n .utilities_ops-announcements_Banner--notificationBarContent input {\n width: 331px !important;\n }\n}\n\n.utilities_ops-announcements_Banner--sideNotificationEmptyState {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n grid-gap: 16px;\n gap: 16px;\n margin-top: 75px;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationEmptyIcon {\n display: block;\n width: auto;\n height: auto;\n max-width: 100%;\n}\n\n.utilities_ops-announcements_Banner--sideNotificationEmptyText {\n font-family: 'Segoe UI', SegoeUI, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, sans-serif;\n font-size: 14px;\n font-weight: 600;\n color: #323130;\n}\n";
|
|
25580
25535
|
styleInject(css_248z$9);
|
|
25581
25536
|
|
|
25582
|
-
|
|
25583
|
-
|
|
25584
|
-
|
|
25585
|
-
|
|
25586
|
-
|
|
25587
|
-
|
|
25588
|
-
|
|
25589
|
-
|
|
25537
|
+
var PREFERENCE_KEY = 'g2-viewedNotifications';
|
|
25538
|
+
|
|
25539
|
+
// Backward-compat bridge for apps still on older toolkit versions that read/write
|
|
25540
|
+
// viewedNotifications via localStorage only. New toolkit uses user preferences as
|
|
25541
|
+
// source of truth but mirrors to localStorage on init and dismiss so mixed-version
|
|
25542
|
+
// apps stay in sync on the same browser.
|
|
25543
|
+
// TODO: Remove LEGACY_LOCAL_STORAGE_KEY, readLegacyLocalStorageMap,
|
|
25544
|
+
// writeLegacyLocalStorageMap, mergeMapsWithLatestDismissed dual-read logic, and
|
|
25545
|
+
// localStorage writes in syncViewedNotificationsStores / addNotificationToViewedList
|
|
25546
|
+
// once all apps have migrated to the latest toolkit.
|
|
25547
|
+
var LEGACY_LOCAL_STORAGE_KEY = 'viewedNotifications';
|
|
25548
|
+
|
|
25549
|
+
/** In-memory map for O(1) dismiss lookups during filterNotifications. */
|
|
25550
|
+
var viewedNotificationsMap = {};
|
|
25551
|
+
var initPromise = null;
|
|
25590
25552
|
function injectDismissedAt(notification) {
|
|
25591
25553
|
return _objectSpread2(_objectSpread2({}, notification), {}, {
|
|
25592
25554
|
dismissedAt: new Date().toISOString()
|
|
@@ -25595,40 +25557,222 @@ function injectDismissedAt(notification) {
|
|
|
25595
25557
|
function getNotificationSignatureToStore(notification) {
|
|
25596
25558
|
return compose(injectDismissedAt, pick$1(['notificationId', 'endsAt', 'startsAt']))(notification);
|
|
25597
25559
|
}
|
|
25598
|
-
function
|
|
25560
|
+
function arrayToMap(entries) {
|
|
25561
|
+
if (!Array.isArray(entries)) return {};
|
|
25562
|
+
return entries.reduce(function (acc, entry) {
|
|
25563
|
+
if (entry !== null && entry !== void 0 && entry.notificationId) {
|
|
25564
|
+
acc[entry.notificationId] = entry;
|
|
25565
|
+
}
|
|
25566
|
+
return acc;
|
|
25567
|
+
}, {});
|
|
25568
|
+
}
|
|
25569
|
+
function mapToPayload(map) {
|
|
25570
|
+
return {
|
|
25571
|
+
viewedNotifications: Object.values(map)
|
|
25572
|
+
};
|
|
25573
|
+
}
|
|
25574
|
+
function normalizePreferenceData(data) {
|
|
25575
|
+
if (!data || _typeof$1(data) !== 'object') return {};
|
|
25576
|
+
if (Array.isArray(data.viewedNotifications)) {
|
|
25577
|
+
return arrayToMap(data.viewedNotifications);
|
|
25578
|
+
}
|
|
25579
|
+
|
|
25580
|
+
// Support legacy object-map shape if ever stored that way.
|
|
25581
|
+
if (!Array.isArray(data.viewedNotifications) && !data.viewedNotifications && Object.values(data).every(function (entry) {
|
|
25582
|
+
return entry && _typeof$1(entry) === 'object' && entry.notificationId;
|
|
25583
|
+
})) {
|
|
25584
|
+
return data;
|
|
25585
|
+
}
|
|
25586
|
+
return {};
|
|
25587
|
+
}
|
|
25588
|
+
function readLegacyLocalStorageMap() {
|
|
25599
25589
|
try {
|
|
25600
|
-
|
|
25590
|
+
var raw = localStorage.getItem(LEGACY_LOCAL_STORAGE_KEY);
|
|
25591
|
+
if (!raw) return {};
|
|
25592
|
+
var parsed = JSON.parse(raw);
|
|
25593
|
+
if (Array.isArray(parsed)) {
|
|
25594
|
+
return arrayToMap(parsed);
|
|
25595
|
+
}
|
|
25596
|
+
if (parsed && _typeof$1(parsed) === 'object') {
|
|
25597
|
+
return parsed;
|
|
25598
|
+
}
|
|
25599
|
+
return {};
|
|
25601
25600
|
} catch (err) {
|
|
25602
25601
|
console.error(err);
|
|
25602
|
+
return {};
|
|
25603
25603
|
}
|
|
25604
25604
|
}
|
|
25605
|
-
|
|
25606
|
-
// Removes entries whose endsAt has already passed.
|
|
25607
|
-
// endsAt is stored as a UTC string without Z (e.g. '2024-01-15 14:30:00'),
|
|
25608
|
-
// matching the end_date_ts_utc format used in generateQuery's Solr filter.
|
|
25609
|
-
// Any entry with endsAt < now will never be returned by the API again, so it
|
|
25610
|
-
// can be safely dropped.
|
|
25611
|
-
function pruneExpiredViewedNotifications() {
|
|
25605
|
+
function writeLegacyLocalStorageMap(map) {
|
|
25612
25606
|
try {
|
|
25613
|
-
|
|
25614
|
-
if (!viewed || _typeof$1(viewed) !== 'object' || Array.isArray(viewed)) return;
|
|
25615
|
-
var entries = Object.entries(viewed);
|
|
25616
|
-
if (!entries.length) return;
|
|
25617
|
-
var now = new Date();
|
|
25618
|
-
var pruned = Object.fromEntries(entries.filter(function (_ref) {
|
|
25619
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
25620
|
-
entry = _ref2[1];
|
|
25621
|
-
if (!entry || !entry.endsAt) return false;
|
|
25622
|
-
var endsAt = new Date(String(entry.endsAt).replace(' ', 'T') + 'Z');
|
|
25623
|
-
return !isNaN(endsAt.getTime()) && endsAt > now;
|
|
25624
|
-
}));
|
|
25625
|
-
// Skip the write if nothing was pruned to avoid unnecessary localStorage I/O
|
|
25626
|
-
if (Object.keys(pruned).length === entries.length) return;
|
|
25627
|
-
localStorage.setItem('viewedNotifications', JSON.stringify(pruned));
|
|
25607
|
+
localStorage.setItem(LEGACY_LOCAL_STORAGE_KEY, JSON.stringify(map));
|
|
25628
25608
|
} catch (err) {
|
|
25629
25609
|
console.error(err);
|
|
25630
25610
|
}
|
|
25631
25611
|
}
|
|
25612
|
+
function getDismissedAtTime(entry) {
|
|
25613
|
+
if (!(entry !== null && entry !== void 0 && entry.dismissedAt)) return 0;
|
|
25614
|
+
var time = new Date(entry.dismissedAt).getTime();
|
|
25615
|
+
return Number.isNaN(time) ? 0 : time;
|
|
25616
|
+
}
|
|
25617
|
+
|
|
25618
|
+
// When preferences and localStorage diverge, keep the most recently dismissed entry.
|
|
25619
|
+
function mergeMapsWithLatestDismissed() {
|
|
25620
|
+
for (var _len = arguments.length, maps = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25621
|
+
maps[_key] = arguments[_key];
|
|
25622
|
+
}
|
|
25623
|
+
return maps.reduce(function (acc, map) {
|
|
25624
|
+
Object.entries(map || {}).forEach(function (_ref) {
|
|
25625
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
25626
|
+
id = _ref2[0],
|
|
25627
|
+
entry = _ref2[1];
|
|
25628
|
+
if (!(entry !== null && entry !== void 0 && entry.notificationId)) return;
|
|
25629
|
+
var existing = acc[id];
|
|
25630
|
+
if (!existing || getDismissedAtTime(entry) >= getDismissedAtTime(existing)) {
|
|
25631
|
+
acc[id] = entry;
|
|
25632
|
+
}
|
|
25633
|
+
});
|
|
25634
|
+
return acc;
|
|
25635
|
+
}, {});
|
|
25636
|
+
}
|
|
25637
|
+
function mapsAreEqual(left, right) {
|
|
25638
|
+
var leftKeys = Object.keys(left);
|
|
25639
|
+
var rightKeys = Object.keys(right);
|
|
25640
|
+
if (leftKeys.length !== rightKeys.length) return false;
|
|
25641
|
+
return leftKeys.every(function (key) {
|
|
25642
|
+
return JSON.stringify(left[key]) === JSON.stringify(right[key]);
|
|
25643
|
+
});
|
|
25644
|
+
}
|
|
25645
|
+
|
|
25646
|
+
// Removes entries whose endsAt has already passed.
|
|
25647
|
+
// endsAt is stored as a UTC string without Z (e.g. '2024-01-15 14:30:00'),
|
|
25648
|
+
// matching the end_date_ts_utc format used in generateQuery's Solr filter.
|
|
25649
|
+
function pruneExpiredViewedNotificationsMap(map) {
|
|
25650
|
+
if (!map || _typeof$1(map) !== 'object') return {};
|
|
25651
|
+
var now = new Date();
|
|
25652
|
+
return Object.fromEntries(Object.entries(map).filter(function (_ref3) {
|
|
25653
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
25654
|
+
entry = _ref4[1];
|
|
25655
|
+
if (!entry || !entry.endsAt) return false;
|
|
25656
|
+
var endsAt = new Date(String(entry.endsAt).replace(' ', 'T') + 'Z');
|
|
25657
|
+
return !isNaN(endsAt.getTime()) && endsAt > now;
|
|
25658
|
+
}));
|
|
25659
|
+
}
|
|
25660
|
+
function persistViewedNotificationsMap(_x) {
|
|
25661
|
+
return _persistViewedNotificationsMap.apply(this, arguments);
|
|
25662
|
+
}
|
|
25663
|
+
function _persistViewedNotificationsMap() {
|
|
25664
|
+
_persistViewedNotificationsMap = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee(map) {
|
|
25665
|
+
var _t;
|
|
25666
|
+
return _regenerator().w(function (_context) {
|
|
25667
|
+
while (1) switch (_context.p = _context.n) {
|
|
25668
|
+
case 0:
|
|
25669
|
+
_context.p = 0;
|
|
25670
|
+
_context.n = 1;
|
|
25671
|
+
return fetcher$1.setUserPreferences(PREFERENCE_KEY, mapToPayload(map));
|
|
25672
|
+
case 1:
|
|
25673
|
+
_context.n = 3;
|
|
25674
|
+
break;
|
|
25675
|
+
case 2:
|
|
25676
|
+
_context.p = 2;
|
|
25677
|
+
_t = _context.v;
|
|
25678
|
+
console.error('setUserPreferences viewed notifications error', _t);
|
|
25679
|
+
case 3:
|
|
25680
|
+
return _context.a(2);
|
|
25681
|
+
}
|
|
25682
|
+
}, _callee, null, [[0, 2]]);
|
|
25683
|
+
}));
|
|
25684
|
+
return _persistViewedNotificationsMap.apply(this, arguments);
|
|
25685
|
+
}
|
|
25686
|
+
function syncViewedNotificationsStores(_x2) {
|
|
25687
|
+
return _syncViewedNotificationsStores.apply(this, arguments);
|
|
25688
|
+
}
|
|
25689
|
+
function _syncViewedNotificationsStores() {
|
|
25690
|
+
_syncViewedNotificationsStores = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee2(map) {
|
|
25691
|
+
var preferenceMapBeforeSync,
|
|
25692
|
+
_args2 = arguments;
|
|
25693
|
+
return _regenerator().w(function (_context2) {
|
|
25694
|
+
while (1) switch (_context2.n) {
|
|
25695
|
+
case 0:
|
|
25696
|
+
preferenceMapBeforeSync = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : null;
|
|
25697
|
+
writeLegacyLocalStorageMap(map);
|
|
25698
|
+
if (!(preferenceMapBeforeSync && mapsAreEqual(map, preferenceMapBeforeSync))) {
|
|
25699
|
+
_context2.n = 1;
|
|
25700
|
+
break;
|
|
25701
|
+
}
|
|
25702
|
+
return _context2.a(2);
|
|
25703
|
+
case 1:
|
|
25704
|
+
_context2.n = 2;
|
|
25705
|
+
return persistViewedNotificationsMap(map);
|
|
25706
|
+
case 2:
|
|
25707
|
+
return _context2.a(2);
|
|
25708
|
+
}
|
|
25709
|
+
}, _callee2);
|
|
25710
|
+
}));
|
|
25711
|
+
return _syncViewedNotificationsStores.apply(this, arguments);
|
|
25712
|
+
}
|
|
25713
|
+
function setViewedNotificationsMap(map) {
|
|
25714
|
+
viewedNotificationsMap = map;
|
|
25715
|
+
}
|
|
25716
|
+
function isNotificationViewed(notificationId) {
|
|
25717
|
+
return Boolean(viewedNotificationsMap[notificationId]);
|
|
25718
|
+
}
|
|
25719
|
+
function initViewedNotifications() {
|
|
25720
|
+
return _initViewedNotifications.apply(this, arguments);
|
|
25721
|
+
}
|
|
25722
|
+
function _initViewedNotifications() {
|
|
25723
|
+
_initViewedNotifications = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee4() {
|
|
25724
|
+
return _regenerator().w(function (_context4) {
|
|
25725
|
+
while (1) switch (_context4.n) {
|
|
25726
|
+
case 0:
|
|
25727
|
+
if (!initPromise) {
|
|
25728
|
+
_context4.n = 1;
|
|
25729
|
+
break;
|
|
25730
|
+
}
|
|
25731
|
+
return _context4.a(2, initPromise);
|
|
25732
|
+
case 1:
|
|
25733
|
+
initPromise = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
25734
|
+
var preferenceMap, preferenceData, legacyMap, mergedMap, prunedMap, _t2;
|
|
25735
|
+
return _regenerator().w(function (_context3) {
|
|
25736
|
+
while (1) switch (_context3.p = _context3.n) {
|
|
25737
|
+
case 0:
|
|
25738
|
+
preferenceMap = {};
|
|
25739
|
+
_context3.p = 1;
|
|
25740
|
+
_context3.n = 2;
|
|
25741
|
+
return fetcher$1.getUserPreferences(PREFERENCE_KEY);
|
|
25742
|
+
case 2:
|
|
25743
|
+
preferenceData = _context3.v;
|
|
25744
|
+
preferenceMap = normalizePreferenceData(preferenceData);
|
|
25745
|
+
_context3.n = 4;
|
|
25746
|
+
break;
|
|
25747
|
+
case 3:
|
|
25748
|
+
_context3.p = 3;
|
|
25749
|
+
_t2 = _context3.v;
|
|
25750
|
+
console.error('getUserPreferences viewed notifications error', _t2);
|
|
25751
|
+
case 4:
|
|
25752
|
+
legacyMap = readLegacyLocalStorageMap();
|
|
25753
|
+
mergedMap = mergeMapsWithLatestDismissed(preferenceMap, legacyMap);
|
|
25754
|
+
prunedMap = pruneExpiredViewedNotificationsMap(mergedMap);
|
|
25755
|
+
setViewedNotificationsMap(prunedMap);
|
|
25756
|
+
_context3.n = 5;
|
|
25757
|
+
return syncViewedNotificationsStores(prunedMap, preferenceMap);
|
|
25758
|
+
case 5:
|
|
25759
|
+
return _context3.a(2);
|
|
25760
|
+
}
|
|
25761
|
+
}, _callee3, null, [[1, 3]]);
|
|
25762
|
+
}))();
|
|
25763
|
+
return _context4.a(2, initPromise);
|
|
25764
|
+
}
|
|
25765
|
+
}, _callee4);
|
|
25766
|
+
}));
|
|
25767
|
+
return _initViewedNotifications.apply(this, arguments);
|
|
25768
|
+
}
|
|
25769
|
+
function addNotificationToViewedList(notification) {
|
|
25770
|
+
if (!(notification !== null && notification !== void 0 && notification.notificationId)) return;
|
|
25771
|
+
var nextMap = _objectSpread2(_objectSpread2({}, viewedNotificationsMap), {}, _defineProperty$2({}, notification.notificationId, getNotificationSignatureToStore(notification)));
|
|
25772
|
+
setViewedNotificationsMap(nextMap);
|
|
25773
|
+
writeLegacyLocalStorageMap(nextMap);
|
|
25774
|
+
persistViewedNotificationsMap(nextMap);
|
|
25775
|
+
}
|
|
25632
25776
|
|
|
25633
25777
|
// Parses a UTC date string like '2024-01-15 14:30:00' (no Z suffix) into a Date object.
|
|
25634
25778
|
// startsAt/endsAt come from the API with the T and Z stripped, so we restore them here.
|
|
@@ -25672,12 +25816,29 @@ function filterOutExpiredNotifications(notifications) {
|
|
|
25672
25816
|
return startDate < now && now < endDate;
|
|
25673
25817
|
})(notifications);
|
|
25674
25818
|
}
|
|
25819
|
+
var NOTIFICATION_DISPLAY_LOCATION = {
|
|
25820
|
+
BANNER: 'BANNER',
|
|
25821
|
+
SIDEBAR: 'SIDEBAR'
|
|
25822
|
+
};
|
|
25823
|
+
function getNotificationDisplayLocation(notification) {
|
|
25824
|
+
var value = (notification === null || notification === void 0 ? void 0 : notification.displayLocation) || NOTIFICATION_DISPLAY_LOCATION.BANNER;
|
|
25825
|
+
var normalized = String(value).toUpperCase();
|
|
25826
|
+
return normalized === NOTIFICATION_DISPLAY_LOCATION.SIDEBAR ? NOTIFICATION_DISPLAY_LOCATION.SIDEBAR : NOTIFICATION_DISPLAY_LOCATION.BANNER;
|
|
25827
|
+
}
|
|
25828
|
+
function filterBannerNotifications(notifications) {
|
|
25829
|
+
return (notifications || []).filter(function (notification) {
|
|
25830
|
+
return getNotificationDisplayLocation(notification) === NOTIFICATION_DISPLAY_LOCATION.BANNER;
|
|
25831
|
+
});
|
|
25832
|
+
}
|
|
25833
|
+
function filterSidebarNotifications(notifications) {
|
|
25834
|
+
return (notifications || []).filter(function (notification) {
|
|
25835
|
+
return getNotificationDisplayLocation(notification) === NOTIFICATION_DISPLAY_LOCATION.SIDEBAR;
|
|
25836
|
+
});
|
|
25837
|
+
}
|
|
25675
25838
|
function filterNotifications(notifications) {
|
|
25676
25839
|
try {
|
|
25677
25840
|
var coreAppConfig = storage$2.getLocalItem('opsportal-core:config') || {};
|
|
25678
25841
|
var filterByTargets = coreAppConfig.filterNotificationsByTargets;
|
|
25679
|
-
// filterOutViewedNotifications
|
|
25680
|
-
var viewedNotifications = getViewedNotifications();
|
|
25681
25842
|
// filterOutExpiredNotifications
|
|
25682
25843
|
var now = new Date();
|
|
25683
25844
|
// filterOutNotificationByAudience — only when filterNotificationsByTargets is true;
|
|
@@ -25694,7 +25855,7 @@ function filterNotifications(notifications) {
|
|
|
25694
25855
|
if ((notification === null || notification === void 0 ? void 0 : notification.status) !== 'A') return false;
|
|
25695
25856
|
|
|
25696
25857
|
// filterOutViewedNotifications
|
|
25697
|
-
if (
|
|
25858
|
+
if (isNotificationViewed(notification.notificationId)) return false;
|
|
25698
25859
|
|
|
25699
25860
|
// filterOutExpiredNotifications
|
|
25700
25861
|
var startsAt = notification.startsAt,
|
|
@@ -25746,7 +25907,6 @@ function getPriorityCode(category) {
|
|
|
25746
25907
|
information: 1
|
|
25747
25908
|
}[category.toLowerCase()];
|
|
25748
25909
|
}
|
|
25749
|
-
var MAX_NOTIFICATIONS_PER_APP_GROUP = 5;
|
|
25750
25910
|
function getAppTileIcon(sourceApplication) {
|
|
25751
25911
|
var _storage$getLocalItem;
|
|
25752
25912
|
if (!sourceApplication) return null;
|
|
@@ -25757,44 +25917,45 @@ function getAppTileIcon(sourceApplication) {
|
|
|
25757
25917
|
});
|
|
25758
25918
|
return tile ? tile.faIconUrl || tile.iconUrl : null;
|
|
25759
25919
|
}
|
|
25920
|
+
function getNotificationStartTime(notification) {
|
|
25921
|
+
var startsAt = notification.startsAt,
|
|
25922
|
+
timeZoneType = notification.timeZoneType;
|
|
25923
|
+
if (timeZoneType === 'Recipient TimeZone' || timeZoneType === 'RPTZ') {
|
|
25924
|
+
return startsAt;
|
|
25925
|
+
}
|
|
25926
|
+
return moment.utc(startsAt).local().format('YYYY-MM-DD HH:mm:ss');
|
|
25927
|
+
}
|
|
25928
|
+
function getNotificationTimestamp(notification) {
|
|
25929
|
+
var startTime = getNotificationStartTime(notification);
|
|
25930
|
+
var startDate = moment(startTime);
|
|
25931
|
+
return startDate.isValid() ? startDate.valueOf() : 0;
|
|
25932
|
+
}
|
|
25760
25933
|
function groupNotificationsByApp(notifications) {
|
|
25761
|
-
var maxPerGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : MAX_NOTIFICATIONS_PER_APP_GROUP;
|
|
25762
25934
|
var groupMap = new Map();
|
|
25763
|
-
var groupOrder = [];
|
|
25764
25935
|
notifications.forEach(function (notification) {
|
|
25765
25936
|
var appName = notification.sourceApplication || 'Other';
|
|
25766
25937
|
if (!groupMap.has(appName)) {
|
|
25767
25938
|
groupMap.set(appName, []);
|
|
25768
|
-
groupOrder.push(appName);
|
|
25769
25939
|
}
|
|
25770
25940
|
groupMap.get(appName).push(notification);
|
|
25771
25941
|
});
|
|
25772
|
-
|
|
25773
|
-
|
|
25774
|
-
|
|
25942
|
+
return Array.from(groupMap.entries()).map(function (_ref2) {
|
|
25943
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
25944
|
+
appName = _ref3[0],
|
|
25945
|
+
all = _ref3[1];
|
|
25946
|
+
var sorted = _toConsumableArray(all).sort(function (a, b) {
|
|
25947
|
+
return getNotificationTimestamp(b) - getNotificationTimestamp(a);
|
|
25775
25948
|
});
|
|
25776
|
-
});
|
|
25777
|
-
return groupOrder.map(function (appName) {
|
|
25778
|
-
var all = groupMap.get(appName);
|
|
25779
25949
|
return {
|
|
25780
25950
|
appName: appName,
|
|
25781
|
-
totalCount:
|
|
25782
|
-
notifications:
|
|
25783
|
-
|
|
25951
|
+
totalCount: sorted.length,
|
|
25952
|
+
notifications: sorted,
|
|
25953
|
+
latestTimestamp: sorted.length ? getNotificationTimestamp(sorted[0]) : 0
|
|
25784
25954
|
};
|
|
25955
|
+
}).sort(function (a, b) {
|
|
25956
|
+
return b.latestTimestamp - a.latestTimestamp;
|
|
25785
25957
|
});
|
|
25786
25958
|
}
|
|
25787
|
-
function getExpandedAppGroup(notifications, appName) {
|
|
25788
|
-
var appNotifications = notifications.filter(function (notification) {
|
|
25789
|
-
return (notification.sourceApplication || 'Other') === appName;
|
|
25790
|
-
});
|
|
25791
|
-
return {
|
|
25792
|
-
appName: appName,
|
|
25793
|
-
totalCount: appNotifications.length,
|
|
25794
|
-
notifications: appNotifications,
|
|
25795
|
-
hasMore: false
|
|
25796
|
-
};
|
|
25797
|
-
}
|
|
25798
25959
|
function sortNotifications(notifications) {
|
|
25799
25960
|
try {
|
|
25800
25961
|
return _toConsumableArray(notifications).map(function (n) {
|
|
@@ -25842,6 +26003,30 @@ var getTimeDiff = function getTimeDiff(startsAt) {
|
|
|
25842
26003
|
}
|
|
25843
26004
|
return '';
|
|
25844
26005
|
};
|
|
26006
|
+
var getSidebarTimeDiff = function getSidebarTimeDiff(startsAt) {
|
|
26007
|
+
var startDate = moment(startsAt);
|
|
26008
|
+
var todayDate = moment(new Date());
|
|
26009
|
+
var minsDiff = todayDate.diff(startDate, 'minutes');
|
|
26010
|
+
var hoursDiff = todayDate.diff(startDate, 'hours');
|
|
26011
|
+
var daysDiff = todayDate.diff(startDate, 'days');
|
|
26012
|
+
var monthsDiff = todayDate.diff(startDate, 'months');
|
|
26013
|
+
if (minsDiff < 1) {
|
|
26014
|
+
return '1m ago';
|
|
26015
|
+
}
|
|
26016
|
+
if (minsDiff < 60) {
|
|
26017
|
+
return "".concat(minsDiff, "m ago");
|
|
26018
|
+
}
|
|
26019
|
+
if (hoursDiff < 24) {
|
|
26020
|
+
return "".concat(hoursDiff, "h ago");
|
|
26021
|
+
}
|
|
26022
|
+
if (daysDiff <= 30) {
|
|
26023
|
+
return "".concat(daysDiff, "d ago");
|
|
26024
|
+
}
|
|
26025
|
+
if (monthsDiff <= 12) {
|
|
26026
|
+
return "".concat(monthsDiff, "mo ago");
|
|
26027
|
+
}
|
|
26028
|
+
return '';
|
|
26029
|
+
};
|
|
25845
26030
|
var SANITIZE_REGEX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>|<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi;
|
|
25846
26031
|
var SanitizeNotificationContent = function SanitizeNotificationContent(str) {
|
|
25847
26032
|
SANITIZE_REGEX.lastIndex = 0;
|
|
@@ -25877,7 +26062,7 @@ var useWindowSize = function useWindowSize() {
|
|
|
25877
26062
|
return windowSize;
|
|
25878
26063
|
};
|
|
25879
26064
|
|
|
25880
|
-
var _excluded$
|
|
26065
|
+
var _excluded$3 = ["count", "current", "showNavButtons", "onLeftButtonClick", "onRightButtonClick", "saveActionComponentState", "ActionComponent", "notificationsTopContainerRef", "mobileNotificationsTopContainerRef", "setNotificationHeightFlag", "sidebarExpandedSecondary"];
|
|
25881
26066
|
var alertBackgroundColorMapping = {
|
|
25882
26067
|
alert: '#fab9b9',
|
|
25883
26068
|
warning: '#f5f5cb',
|
|
@@ -25946,13 +26131,13 @@ var Banner = function Banner(props) {
|
|
|
25946
26131
|
notificationsTopContainerRef = props.notificationsTopContainerRef,
|
|
25947
26132
|
mobileNotificationsTopContainerRef = props.mobileNotificationsTopContainerRef,
|
|
25948
26133
|
setNotificationHeightFlag = props.setNotificationHeightFlag,
|
|
25949
|
-
|
|
26134
|
+
sidebarExpandedSecondary = props.sidebarExpandedSecondary,
|
|
26135
|
+
notification = _objectWithoutProperties(props, _excluded$3);
|
|
25950
26136
|
var dismissibleFlag = notification.dismissibleFlag,
|
|
25951
26137
|
onDismiss = notification.onDismiss,
|
|
25952
26138
|
startsAt = notification.startsAt,
|
|
25953
26139
|
timeZoneType = notification.timeZoneType,
|
|
25954
26140
|
showSideBar = notification.showSideBar,
|
|
25955
|
-
isGroupedSideBar = notification.isGroupedSideBar,
|
|
25956
26141
|
action = notification.action,
|
|
25957
26142
|
content = notification.content,
|
|
25958
26143
|
sourceApplication = notification.sourceApplication,
|
|
@@ -25984,6 +26169,8 @@ var Banner = function Banner(props) {
|
|
|
25984
26169
|
}, [expanded]);
|
|
25985
26170
|
var startTime = timeZoneType === "Recipient TimeZone" || timeZoneType === "RPTZ" ? startsAt : moment.utc(startsAt).local().format("YYYY-MM-DD HH:mm:ss");
|
|
25986
26171
|
var timeDiff = getTimeDiff(startTime);
|
|
26172
|
+
var sidebarTimeDiff = sidebarExpandedSecondary ? getSidebarTimeDiff(startTime) : '';
|
|
26173
|
+
var isDismissible = dismissibleFlag === true || dismissibleFlag === "true";
|
|
25987
26174
|
var topNotificationBar = function topNotificationBar() {
|
|
25988
26175
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25989
26176
|
className: "utilities_ops-announcements_Banner--notificationContainer",
|
|
@@ -26050,10 +26237,10 @@ var Banner = function Banner(props) {
|
|
|
26050
26237
|
onRightButtonClick: onRightButtonClick
|
|
26051
26238
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26052
26239
|
className: "utilities_ops-announcements_Banner--notificationBarBtn",
|
|
26053
|
-
style:
|
|
26240
|
+
style: isDismissible ? {
|
|
26054
26241
|
borderLeft: '2px solid rgb(204, 204, 204)'
|
|
26055
26242
|
} : {}
|
|
26056
|
-
},
|
|
26243
|
+
}, isDismissible && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26057
26244
|
onClick: onDismiss
|
|
26058
26245
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.Icon, {
|
|
26059
26246
|
style: {
|
|
@@ -26063,112 +26250,54 @@ var Banner = function Banner(props) {
|
|
|
26063
26250
|
variant: "material"
|
|
26064
26251
|
}))));
|
|
26065
26252
|
};
|
|
26066
|
-
var
|
|
26067
|
-
var categoryColor = alertInfoColorMapping[categoryKey];
|
|
26068
|
-
var categoryBackground = alertBackgroundColorMapping[categoryKey];
|
|
26069
|
-
var groupedSideNotificationRow = function groupedSideNotificationRow() {
|
|
26253
|
+
var sidebarExpandedSecondaryRow = function sidebarExpandedSecondaryRow() {
|
|
26070
26254
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26071
|
-
className: "utilities_ops-announcements_Banner--
|
|
26072
|
-
style: {
|
|
26073
|
-
backgroundColor: categoryBackground
|
|
26074
|
-
}
|
|
26075
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26076
|
-
className: "utilities_ops-announcements_Banner--sideNotificationRowIcon",
|
|
26077
|
-
style: {
|
|
26078
|
-
backgroundColor: categoryColor
|
|
26079
|
-
}
|
|
26080
|
-
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
26081
|
-
name: alertToIconMapping[categoryKey],
|
|
26082
|
-
style: {
|
|
26083
|
-
fontSize: '11px'
|
|
26084
|
-
}
|
|
26085
|
-
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26086
|
-
className: "utilities_ops-announcements_Banner--sideNotificationRowContent"
|
|
26087
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26088
|
-
className: "utilities_ops-announcements_Banner--sideNotificationRowText",
|
|
26089
|
-
dangerouslySetInnerHTML: {
|
|
26090
|
-
__html: SanitizeNotificationContent(content)
|
|
26091
|
-
}
|
|
26092
|
-
}), action && ActionComponent && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26093
|
-
style: {
|
|
26094
|
-
marginTop: '4px'
|
|
26095
|
-
}
|
|
26096
|
-
}, /*#__PURE__*/React__default["default"].createElement(ActionComponent, {
|
|
26097
|
-
notification: notification,
|
|
26098
|
-
saveActionComponentState: saveActionComponentState
|
|
26099
|
-
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26100
|
-
className: "utilities_ops-announcements_Banner--sideNotificationRowMeta"
|
|
26101
|
-
}, (feedUrl || link) && /*#__PURE__*/React__default["default"].createElement("a", {
|
|
26102
|
-
href: feedUrl || link,
|
|
26103
|
-
target: "_blank",
|
|
26104
|
-
rel: "noopener noreferrer",
|
|
26105
|
-
className: "utilities_ops-announcements_Banner--sideNotificationRowLink"
|
|
26106
|
-
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.Icon, {
|
|
26107
|
-
name: "open_in_new",
|
|
26108
|
-
variant: "material"
|
|
26109
|
-
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26110
|
-
className: "utilities_ops-announcements_Banner--sideNotificationRowTime"
|
|
26111
|
-
}, timeDiff)));
|
|
26112
|
-
};
|
|
26113
|
-
var sideNotificationBar = function sideNotificationBar() {
|
|
26114
|
-
return isGroupedSideBar ? groupedSideNotificationRow() : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26115
|
-
className: "utilities_ops-announcements_Banner--notificationContainer utilities_ops-announcements_Banner--sideBar",
|
|
26116
|
-
style: {
|
|
26117
|
-
backgroundColor: categoryBackground
|
|
26118
|
-
}
|
|
26119
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26120
|
-
className: "utilities_ops-announcements_Banner--appBarContentWrapper",
|
|
26121
|
-
style: {
|
|
26122
|
-
borderLeft: "2px solid ".concat(categoryColor)
|
|
26123
|
-
}
|
|
26255
|
+
className: "utilities_ops-announcements_Banner--sideNotificationSecondaryBody"
|
|
26124
26256
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26125
|
-
className: "utilities_ops-announcements_Banner--
|
|
26257
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedRow"
|
|
26126
26258
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26127
|
-
className: "utilities_ops-announcements_Banner--
|
|
26128
|
-
style: {
|
|
26129
|
-
backgroundColor: categoryColor
|
|
26130
|
-
}
|
|
26131
|
-
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
26132
|
-
name: alertToIconMapping[categoryKey],
|
|
26133
|
-
style: {
|
|
26134
|
-
fontSize: '12px'
|
|
26135
|
-
}
|
|
26136
|
-
})), sourceApplication && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("b", null, sourceApplication), " -"), " ", timeDiff), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26137
|
-
className: "utilities_ops-announcements_Banner--appBarContentBox"
|
|
26259
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedRowMain"
|
|
26138
26260
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26261
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedRowText",
|
|
26139
26262
|
dangerouslySetInnerHTML: {
|
|
26140
26263
|
__html: SanitizeNotificationContent(content)
|
|
26141
26264
|
}
|
|
26142
26265
|
}), (feedUrl || link) && /*#__PURE__*/React__default["default"].createElement("a", {
|
|
26143
26266
|
href: feedUrl || link,
|
|
26144
26267
|
target: "_blank",
|
|
26145
|
-
|
|
26268
|
+
rel: "noopener noreferrer",
|
|
26269
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedRowLink"
|
|
26146
26270
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.Icon, {
|
|
26147
26271
|
name: "open_in_new",
|
|
26148
26272
|
variant: "material"
|
|
26149
|
-
}))), action && ActionComponent && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26150
|
-
style: {
|
|
26151
|
-
marginBottom: '5px'
|
|
26152
|
-
}
|
|
26153
|
-
}, /*#__PURE__*/React__default["default"].createElement(ActionComponent, {
|
|
26154
|
-
notification: notification,
|
|
26155
|
-
saveActionComponentState: saveActionComponentState
|
|
26156
26273
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26157
|
-
className: "utilities_ops-announcements_Banner--
|
|
26158
|
-
|
|
26159
|
-
|
|
26160
|
-
|
|
26161
|
-
|
|
26162
|
-
|
|
26274
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedRowMeta"
|
|
26275
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26276
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedRowTime"
|
|
26277
|
+
}, sidebarTimeDiff), isDismissible && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
26278
|
+
type: "button",
|
|
26279
|
+
className: "utilities_ops-announcements_Banner--sideNotificationDismissBtn",
|
|
26280
|
+
onClick: onDismiss,
|
|
26281
|
+
"aria-label": "Dismiss notification"
|
|
26163
26282
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.Icon, {
|
|
26164
26283
|
style: {
|
|
26165
|
-
cursor: 'pointer'
|
|
26166
|
-
color: '#8A8886',
|
|
26167
|
-
fontSize: '20px'
|
|
26284
|
+
cursor: 'pointer'
|
|
26168
26285
|
},
|
|
26169
26286
|
name: "close",
|
|
26170
26287
|
variant: "material"
|
|
26171
|
-
}))))
|
|
26288
|
+
})))), action && ActionComponent && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26289
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedRowAction"
|
|
26290
|
+
}, /*#__PURE__*/React__default["default"].createElement(ActionComponent, {
|
|
26291
|
+
notification: notification,
|
|
26292
|
+
saveActionComponentState: saveActionComponentState,
|
|
26293
|
+
displayVariant: "sidebarV2"
|
|
26294
|
+
})));
|
|
26295
|
+
};
|
|
26296
|
+
var sideNotificationBar = function sideNotificationBar() {
|
|
26297
|
+
if (sidebarExpandedSecondary) {
|
|
26298
|
+
return sidebarExpandedSecondaryRow();
|
|
26299
|
+
}
|
|
26300
|
+
return null;
|
|
26172
26301
|
};
|
|
26173
26302
|
var mobileNotificationBar = function mobileNotificationBar() {
|
|
26174
26303
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -26280,111 +26409,253 @@ var _styleModuleImportMap$4 = {
|
|
|
26280
26409
|
"appBarContentWrapper": "utilities_ops-announcements_Banner--appBarContentWrapper",
|
|
26281
26410
|
"sideBarNotificationMeta": "utilities_ops-announcements_Banner--sideBarNotificationMeta",
|
|
26282
26411
|
"feedUrl": "utilities_ops-announcements_Banner--feedUrl",
|
|
26283
|
-
"
|
|
26284
|
-
"
|
|
26285
|
-
"
|
|
26286
|
-
"
|
|
26287
|
-
"
|
|
26412
|
+
"sideNotificationSidebarList": "utilities_ops-announcements_Banner--sideNotificationSidebarList",
|
|
26413
|
+
"sideNotificationCardWrapper": "utilities_ops-announcements_Banner--sideNotificationCardWrapper",
|
|
26414
|
+
"sideNotificationCardWrapperStacked": "utilities_ops-announcements_Banner--sideNotificationCardWrapperStacked",
|
|
26415
|
+
"sideNotificationCardWrapperExpanded": "utilities_ops-announcements_Banner--sideNotificationCardWrapperExpanded",
|
|
26416
|
+
"sideNotificationStackContainer": "utilities_ops-announcements_Banner--sideNotificationStackContainer",
|
|
26417
|
+
"sideNotificationExpandedGroup": "utilities_ops-announcements_Banner--sideNotificationExpandedGroup",
|
|
26418
|
+
"sideNotificationSecondaryBody": "utilities_ops-announcements_Banner--sideNotificationSecondaryBody",
|
|
26419
|
+
"sideNotificationAnimateCollapse": "utilities_ops-announcements_Banner--sideNotificationAnimateCollapse",
|
|
26420
|
+
"sideNotificationAnimateCollapseOpen": "utilities_ops-announcements_Banner--sideNotificationAnimateCollapseOpen",
|
|
26421
|
+
"sideNotificationCollapseBody": "utilities_ops-announcements_Banner--sideNotificationCollapseBody",
|
|
26422
|
+
"sideNotificationAnimateCollapseInner": "utilities_ops-announcements_Banner--sideNotificationAnimateCollapseInner",
|
|
26423
|
+
"sideNotificationCollapseBodyWrap": "utilities_ops-announcements_Banner--sideNotificationCollapseBodyWrap",
|
|
26424
|
+
"sideNotificationExpandedItemsWrap": "utilities_ops-announcements_Banner--sideNotificationExpandedItemsWrap",
|
|
26425
|
+
"sideNotificationExpandedItemsList": "utilities_ops-announcements_Banner--sideNotificationExpandedItemsList",
|
|
26426
|
+
"sideNotificationItemCard": "utilities_ops-announcements_Banner--sideNotificationItemCard",
|
|
26427
|
+
"sideNotificationStackContainerHidden": "utilities_ops-announcements_Banner--sideNotificationStackContainerHidden",
|
|
26428
|
+
"sideNotificationStackLayer": "utilities_ops-announcements_Banner--sideNotificationStackLayer",
|
|
26429
|
+
"sideNotificationStackLayer1": "utilities_ops-announcements_Banner--sideNotificationStackLayer1",
|
|
26430
|
+
"sideNotificationStackLayer2": "utilities_ops-announcements_Banner--sideNotificationStackLayer2",
|
|
26431
|
+
"sideNotificationCard": "utilities_ops-announcements_Banner--sideNotificationCard",
|
|
26432
|
+
"sideNotificationCardHeader": "utilities_ops-announcements_Banner--sideNotificationCardHeader",
|
|
26433
|
+
"sideNotificationCardHeaderLeft": "utilities_ops-announcements_Banner--sideNotificationCardHeaderLeft",
|
|
26434
|
+
"sideNotificationCardHeaderRight": "utilities_ops-announcements_Banner--sideNotificationCardHeaderRight",
|
|
26435
|
+
"sideNotificationCardHeaderTime": "utilities_ops-announcements_Banner--sideNotificationCardHeaderTime",
|
|
26436
|
+
"sideNotificationChevronBtn": "utilities_ops-announcements_Banner--sideNotificationChevronBtn",
|
|
26437
|
+
"sideNotificationChevronIcon": "utilities_ops-announcements_Banner--sideNotificationChevronIcon",
|
|
26438
|
+
"sideNotificationChevronIconExpanded": "utilities_ops-announcements_Banner--sideNotificationChevronIconExpanded",
|
|
26439
|
+
"sideNotificationCardPreview": "utilities_ops-announcements_Banner--sideNotificationCardPreview",
|
|
26440
|
+
"sideNotificationMoreBtn": "utilities_ops-announcements_Banner--sideNotificationMoreBtn",
|
|
26441
|
+
"sideNotificationLoadMoreSentinel": "utilities_ops-announcements_Banner--sideNotificationLoadMoreSentinel",
|
|
26442
|
+
"sideNotificationExpandedRowMain": "utilities_ops-announcements_Banner--sideNotificationExpandedRowMain",
|
|
26443
|
+
"sideNotificationExpandedRowText": "utilities_ops-announcements_Banner--sideNotificationExpandedRowText",
|
|
26444
|
+
"sideNotificationExpandedRowLink": "utilities_ops-announcements_Banner--sideNotificationExpandedRowLink",
|
|
26445
|
+
"sideNotificationExpandedRow": "utilities_ops-announcements_Banner--sideNotificationExpandedRow",
|
|
26446
|
+
"sideNotificationExpandedRowAction": "utilities_ops-announcements_Banner--sideNotificationExpandedRowAction",
|
|
26447
|
+
"sideNotificationExpandedRowMeta": "utilities_ops-announcements_Banner--sideNotificationExpandedRowMeta",
|
|
26448
|
+
"sideNotificationExpandedRowTime": "utilities_ops-announcements_Banner--sideNotificationExpandedRowTime",
|
|
26449
|
+
"sideNotificationDismissBtn": "utilities_ops-announcements_Banner--sideNotificationDismissBtn",
|
|
26450
|
+
"sideNotificationGroupAppIconWrap": "utilities_ops-announcements_Banner--sideNotificationGroupAppIconWrap",
|
|
26288
26451
|
"sideNotificationGroupAppIcon": "utilities_ops-announcements_Banner--sideNotificationGroupAppIcon",
|
|
26289
26452
|
"sideNotificationGroupAppIconPlaceholder": "utilities_ops-announcements_Banner--sideNotificationGroupAppIconPlaceholder",
|
|
26290
26453
|
"sideNotificationGroupAppName": "utilities_ops-announcements_Banner--sideNotificationGroupAppName",
|
|
26291
|
-
"
|
|
26292
|
-
"
|
|
26293
|
-
"
|
|
26294
|
-
"sideNotificationRowContent": "utilities_ops-announcements_Banner--sideNotificationRowContent",
|
|
26295
|
-
"sideNotificationRowText": "utilities_ops-announcements_Banner--sideNotificationRowText",
|
|
26296
|
-
"sideNotificationRowMeta": "utilities_ops-announcements_Banner--sideNotificationRowMeta",
|
|
26297
|
-
"sideNotificationRowLink": "utilities_ops-announcements_Banner--sideNotificationRowLink",
|
|
26298
|
-
"sideNotificationRowTime": "utilities_ops-announcements_Banner--sideNotificationRowTime",
|
|
26299
|
-
"sideNotificationViewAll": "utilities_ops-announcements_Banner--sideNotificationViewAll"
|
|
26454
|
+
"sideNotificationEmptyState": "utilities_ops-announcements_Banner--sideNotificationEmptyState",
|
|
26455
|
+
"sideNotificationEmptyIcon": "utilities_ops-announcements_Banner--sideNotificationEmptyIcon",
|
|
26456
|
+
"sideNotificationEmptyText": "utilities_ops-announcements_Banner--sideNotificationEmptyText"
|
|
26300
26457
|
}
|
|
26301
26458
|
};
|
|
26459
|
+
var EXPANDED_BATCH_SIZE = 15;
|
|
26302
26460
|
var SideNotificationGroup = function SideNotificationGroup(_ref) {
|
|
26303
26461
|
var appName = _ref.appName,
|
|
26304
26462
|
totalCount = _ref.totalCount,
|
|
26305
26463
|
notifications = _ref.notifications,
|
|
26306
|
-
|
|
26307
|
-
|
|
26308
|
-
onBack = _ref.onBack,
|
|
26309
|
-
onViewAll = _ref.onViewAll,
|
|
26464
|
+
isExpanded = _ref.isExpanded,
|
|
26465
|
+
onToggleExpand = _ref.onToggleExpand,
|
|
26310
26466
|
_onDismiss = _ref.onDismiss,
|
|
26467
|
+
scrollContainerRef = _ref.scrollContainerRef,
|
|
26311
26468
|
ActionComponent = _ref.ActionComponent,
|
|
26312
26469
|
saveActionComponentState = _ref.saveActionComponentState;
|
|
26313
26470
|
var appIconUrl = getAppTileIcon(appName);
|
|
26471
|
+
var topNotification = notifications[0];
|
|
26472
|
+
var moreCount = totalCount - 1;
|
|
26473
|
+
var stackLayers = Math.min(moreCount, 2);
|
|
26474
|
+
var topStartTime = topNotification ? getNotificationStartTime(topNotification) : null;
|
|
26475
|
+
var topTimeDiff = topStartTime ? getSidebarTimeDiff(topStartTime) : '';
|
|
26476
|
+
var _useState = React.useState(EXPANDED_BATCH_SIZE),
|
|
26477
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26478
|
+
visibleCount = _useState2[0],
|
|
26479
|
+
setVisibleCount = _useState2[1];
|
|
26480
|
+
var loadMoreRef = React.useRef(null);
|
|
26481
|
+
var totalCountRef = React.useRef(notifications.length);
|
|
26482
|
+
totalCountRef.current = notifications.length;
|
|
26483
|
+
React.useEffect(function () {
|
|
26484
|
+
setVisibleCount(EXPANDED_BATCH_SIZE);
|
|
26485
|
+
}, [isExpanded, notifications.length]);
|
|
26486
|
+
var loadMoreIfNeeded = React.useCallback(function () {
|
|
26487
|
+
var scrollRoot = scrollContainerRef === null || scrollContainerRef === void 0 ? void 0 : scrollContainerRef.current;
|
|
26488
|
+
var sentinel = loadMoreRef.current;
|
|
26489
|
+
if (!scrollRoot || !sentinel) {
|
|
26490
|
+
return;
|
|
26491
|
+
}
|
|
26492
|
+
setVisibleCount(function (prev) {
|
|
26493
|
+
if (prev >= totalCountRef.current) {
|
|
26494
|
+
return prev;
|
|
26495
|
+
}
|
|
26496
|
+
var rootRect = scrollRoot.getBoundingClientRect();
|
|
26497
|
+
var sentinelRect = sentinel.getBoundingClientRect();
|
|
26498
|
+
if (sentinelRect.top <= rootRect.bottom + 200) {
|
|
26499
|
+
return Math.min(prev + EXPANDED_BATCH_SIZE, totalCountRef.current);
|
|
26500
|
+
}
|
|
26501
|
+
return prev;
|
|
26502
|
+
});
|
|
26503
|
+
}, [scrollContainerRef]);
|
|
26504
|
+
React.useEffect(function () {
|
|
26505
|
+
if (!isExpanded || visibleCount >= notifications.length) {
|
|
26506
|
+
return undefined;
|
|
26507
|
+
}
|
|
26508
|
+
var scrollRoot = scrollContainerRef === null || scrollContainerRef === void 0 ? void 0 : scrollContainerRef.current;
|
|
26509
|
+
var sentinel = loadMoreRef.current;
|
|
26510
|
+
if (!scrollRoot || !sentinel) {
|
|
26511
|
+
return undefined;
|
|
26512
|
+
}
|
|
26513
|
+
var observer = new IntersectionObserver(function (entries) {
|
|
26514
|
+
var _entries$;
|
|
26515
|
+
if ((_entries$ = entries[0]) !== null && _entries$ !== void 0 && _entries$.isIntersecting) {
|
|
26516
|
+
loadMoreIfNeeded();
|
|
26517
|
+
}
|
|
26518
|
+
}, {
|
|
26519
|
+
root: scrollRoot,
|
|
26520
|
+
rootMargin: '200px',
|
|
26521
|
+
threshold: 0
|
|
26522
|
+
});
|
|
26523
|
+
observer.observe(sentinel);
|
|
26524
|
+
scrollRoot.addEventListener('scroll', loadMoreIfNeeded, {
|
|
26525
|
+
passive: true
|
|
26526
|
+
});
|
|
26527
|
+
loadMoreIfNeeded();
|
|
26528
|
+
return function () {
|
|
26529
|
+
observer.disconnect();
|
|
26530
|
+
scrollRoot.removeEventListener('scroll', loadMoreIfNeeded);
|
|
26531
|
+
};
|
|
26532
|
+
}, [isExpanded, notifications.length, visibleCount, scrollContainerRef, loadMoreIfNeeded]);
|
|
26533
|
+
React.useEffect(function () {
|
|
26534
|
+
if (!isExpanded || visibleCount >= notifications.length) {
|
|
26535
|
+
return undefined;
|
|
26536
|
+
}
|
|
26537
|
+
var frameId = requestAnimationFrame(loadMoreIfNeeded);
|
|
26538
|
+
return function () {
|
|
26539
|
+
return cancelAnimationFrame(frameId);
|
|
26540
|
+
};
|
|
26541
|
+
}, [isExpanded, visibleCount, notifications.length, loadMoreIfNeeded]);
|
|
26542
|
+
var handleExpandClick = function handleExpandClick(e) {
|
|
26543
|
+
e.stopPropagation();
|
|
26544
|
+
if (!isExpanded) {
|
|
26545
|
+
onToggleExpand();
|
|
26546
|
+
}
|
|
26547
|
+
};
|
|
26548
|
+
var handleChevronClick = function handleChevronClick(e) {
|
|
26549
|
+
e.stopPropagation();
|
|
26550
|
+
onToggleExpand();
|
|
26551
|
+
};
|
|
26552
|
+
var moreLabel = moreCount === 1 ? '1 more notification' : "".concat(moreCount, " more notifications");
|
|
26553
|
+
var visibleNotifications = notifications.slice(0, visibleCount);
|
|
26554
|
+
var hasMore = visibleCount < notifications.length;
|
|
26555
|
+
var renderHeader = function renderHeader() {
|
|
26556
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26557
|
+
className: "utilities_ops-announcements_Banner--sideNotificationCardHeader"
|
|
26558
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26559
|
+
className: "utilities_ops-announcements_Banner--sideNotificationCardHeaderLeft"
|
|
26560
|
+
}, appIconUrl ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26561
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupAppIconWrap"
|
|
26562
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
26563
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupAppIcon",
|
|
26564
|
+
src: appIconUrl,
|
|
26565
|
+
alt: ""
|
|
26566
|
+
})) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26567
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupAppIconPlaceholder"
|
|
26568
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26569
|
+
className: "utilities_ops-announcements_Banner--sideNotificationGroupAppName"
|
|
26570
|
+
}, appName, " (", totalCount, ")")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26571
|
+
className: "utilities_ops-announcements_Banner--sideNotificationCardHeaderRight"
|
|
26572
|
+
}, !isExpanded && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26573
|
+
className: "utilities_ops-announcements_Banner--sideNotificationCardHeaderTime"
|
|
26574
|
+
}, topTimeDiff), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
26575
|
+
type: "button",
|
|
26576
|
+
className: "utilities_ops-announcements_Banner--sideNotificationChevronBtn",
|
|
26577
|
+
onClick: handleChevronClick,
|
|
26578
|
+
"aria-label": isExpanded ? 'Collapse notifications' : 'Expand notifications',
|
|
26579
|
+
"aria-expanded": isExpanded
|
|
26580
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26581
|
+
className: _getClassName("sideNotificationChevronIcon".concat(isExpanded ? ' sideNotificationChevronIconExpanded' : ''), _styleModuleImportMap$4, {
|
|
26582
|
+
"handleMissingStyleName": "warn"
|
|
26583
|
+
})
|
|
26584
|
+
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
26585
|
+
variant: "regular",
|
|
26586
|
+
name: "angle-down",
|
|
26587
|
+
style: {
|
|
26588
|
+
color: '#000'
|
|
26589
|
+
}
|
|
26590
|
+
})))));
|
|
26591
|
+
};
|
|
26314
26592
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26315
|
-
className: "
|
|
26316
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26317
|
-
className: _getClassName("sideNotificationGroupHeader".concat(showBackButton ? ' sideNotificationGroupHeaderWithBack' : ''), _styleModuleImportMap$4, {
|
|
26593
|
+
className: _getClassName("sideNotificationCardWrapper".concat(moreCount > 0 && !isExpanded ? ' sideNotificationCardWrapperStacked' : '').concat(isExpanded ? ' sideNotificationCardWrapperExpanded' : ''), _styleModuleImportMap$4, {
|
|
26318
26594
|
"handleMissingStyleName": "warn"
|
|
26319
26595
|
})
|
|
26320
|
-
},
|
|
26321
|
-
|
|
26322
|
-
className: "
|
|
26323
|
-
|
|
26324
|
-
|
|
26325
|
-
},
|
|
26326
|
-
|
|
26596
|
+
}, moreCount > 0 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26597
|
+
onClick: handleExpandClick,
|
|
26598
|
+
className: _getClassName("sideNotificationStackContainer".concat(isExpanded ? ' sideNotificationStackContainerHidden' : ''), _styleModuleImportMap$4, {
|
|
26599
|
+
"handleMissingStyleName": "warn"
|
|
26600
|
+
})
|
|
26601
|
+
}, Array.from({
|
|
26602
|
+
length: stackLayers
|
|
26603
|
+
}, function (_, i) {
|
|
26604
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26605
|
+
key: i,
|
|
26606
|
+
className: _getClassName("sideNotificationStackLayer sideNotificationStackLayer".concat(stackLayers - i), _styleModuleImportMap$4, {
|
|
26607
|
+
"handleMissingStyleName": "warn"
|
|
26608
|
+
})
|
|
26609
|
+
});
|
|
26327
26610
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26328
|
-
className: "utilities_ops-announcements_Banner--
|
|
26329
|
-
},
|
|
26330
|
-
className: "
|
|
26331
|
-
|
|
26332
|
-
|
|
26333
|
-
}
|
|
26334
|
-
className: "utilities_ops-announcements_Banner--
|
|
26335
|
-
}
|
|
26336
|
-
className: "utilities_ops-announcements_Banner--
|
|
26337
|
-
},
|
|
26338
|
-
className: "utilities_ops-announcements_Banner--
|
|
26339
|
-
},
|
|
26340
|
-
|
|
26341
|
-
|
|
26342
|
-
}
|
|
26611
|
+
className: "utilities_ops-announcements_Banner--sideNotificationCard"
|
|
26612
|
+
}, renderHeader(), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26613
|
+
className: _getClassName("sideNotificationAnimateCollapse sideNotificationCollapseBodyWrap".concat(!isExpanded ? ' sideNotificationAnimateCollapseOpen' : ''), _styleModuleImportMap$4, {
|
|
26614
|
+
"handleMissingStyleName": "warn"
|
|
26615
|
+
})
|
|
26616
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26617
|
+
className: "utilities_ops-announcements_Banner--sideNotificationAnimateCollapseInner"
|
|
26618
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26619
|
+
className: "utilities_ops-announcements_Banner--sideNotificationCollapseBody"
|
|
26620
|
+
}, topNotification && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26621
|
+
className: "utilities_ops-announcements_Banner--sideNotificationCardPreview"
|
|
26622
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26623
|
+
dangerouslySetInnerHTML: {
|
|
26624
|
+
__html: SanitizeNotificationContent(topNotification.content)
|
|
26625
|
+
}
|
|
26626
|
+
})), moreCount > 0 && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
26627
|
+
type: "button",
|
|
26628
|
+
className: "utilities_ops-announcements_Banner--sideNotificationMoreBtn",
|
|
26629
|
+
onClick: handleExpandClick
|
|
26630
|
+
}, moreLabel)))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26631
|
+
className: _getClassName("sideNotificationAnimateCollapse sideNotificationExpandedItemsWrap".concat(isExpanded ? ' sideNotificationAnimateCollapseOpen' : ''), _styleModuleImportMap$4, {
|
|
26632
|
+
"handleMissingStyleName": "warn"
|
|
26633
|
+
})
|
|
26634
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26635
|
+
className: "utilities_ops-announcements_Banner--sideNotificationAnimateCollapseInner"
|
|
26636
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26637
|
+
className: "utilities_ops-announcements_Banner--sideNotificationExpandedItemsList"
|
|
26638
|
+
}, visibleNotifications.map(function (notification) {
|
|
26639
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26640
|
+
key: notification.notificationId,
|
|
26641
|
+
className: "utilities_ops-announcements_Banner--sideNotificationItemCard"
|
|
26642
|
+
}, /*#__PURE__*/React__default["default"].createElement(Banner, _extends$1({}, notification, {
|
|
26343
26643
|
showSideBar: true,
|
|
26344
26644
|
isGroupedSideBar: true,
|
|
26645
|
+
sidebarExpandedSecondary: true,
|
|
26345
26646
|
onDismiss: function onDismiss() {
|
|
26346
26647
|
return _onDismiss(notification);
|
|
26347
26648
|
},
|
|
26348
26649
|
ActionComponent: ActionComponent,
|
|
26349
26650
|
saveActionComponentState: saveActionComponentState
|
|
26350
|
-
}));
|
|
26351
|
-
})
|
|
26352
|
-
|
|
26353
|
-
className: "utilities_ops-announcements_Banner--
|
|
26354
|
-
|
|
26355
|
-
}
|
|
26356
|
-
|
|
26357
|
-
|
|
26358
|
-
}), /*#__PURE__*/React__default["default"].createElement("span", null, "View all")));
|
|
26359
|
-
};
|
|
26360
|
-
|
|
26361
|
-
var ESTIMATED_ITEM_HEIGHT = 80;
|
|
26362
|
-
var ESTIMATED_GROUP_HEIGHT = 320;
|
|
26363
|
-
var OVERSCAN = 3;
|
|
26364
|
-
function buildOffsets(count, itemHeights) {
|
|
26365
|
-
var defaultHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ESTIMATED_ITEM_HEIGHT;
|
|
26366
|
-
var offsets = new Array(count + 1);
|
|
26367
|
-
offsets[0] = 0;
|
|
26368
|
-
for (var i = 0; i < count; i++) {
|
|
26369
|
-
offsets[i + 1] = offsets[i] + (itemHeights[i] || defaultHeight) + 12;
|
|
26370
|
-
}
|
|
26371
|
-
return offsets;
|
|
26372
|
-
}
|
|
26373
|
-
|
|
26374
|
-
// Binary search: find the last index whose offset is <= scrollTop
|
|
26375
|
-
function findStartIndex(offsets, scrollTop) {
|
|
26376
|
-
var lo = 0;
|
|
26377
|
-
var hi = offsets.length - 2;
|
|
26378
|
-
while (lo < hi) {
|
|
26379
|
-
var mid = lo + hi + 1 >> 1;
|
|
26380
|
-
if (offsets[mid] <= scrollTop) {
|
|
26381
|
-
lo = mid;
|
|
26382
|
-
} else {
|
|
26383
|
-
hi = mid - 1;
|
|
26384
|
-
}
|
|
26385
|
-
}
|
|
26386
|
-
return lo;
|
|
26387
|
-
}
|
|
26651
|
+
})));
|
|
26652
|
+
}), isExpanded && hasMore && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26653
|
+
ref: loadMoreRef,
|
|
26654
|
+
className: "utilities_ops-announcements_Banner--sideNotificationLoadMoreSentinel",
|
|
26655
|
+
"aria-hidden": "true"
|
|
26656
|
+
}))))));
|
|
26657
|
+
};
|
|
26658
|
+
|
|
26388
26659
|
var Notifications = function Notifications(_ref) {
|
|
26389
26660
|
var notifications = _ref.notifications,
|
|
26390
26661
|
_onDismiss = _ref.onDismiss;
|
|
@@ -26404,16 +26675,12 @@ var Notifications = function Notifications(_ref) {
|
|
|
26404
26675
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
26405
26676
|
last = _useState4[0],
|
|
26406
26677
|
setLast = _useState4[1];
|
|
26407
|
-
var _useState5 = React.useState(
|
|
26678
|
+
var _useState5 = React.useState({}),
|
|
26408
26679
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
26409
|
-
|
|
26410
|
-
|
|
26680
|
+
expandedGroups = _useState6[0],
|
|
26681
|
+
setExpandedGroups = _useState6[1];
|
|
26411
26682
|
var scrollRef = React.useRef(null);
|
|
26412
|
-
var
|
|
26413
|
-
var _useState7 = React.useState(0),
|
|
26414
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
26415
|
-
scrollTop = _useState8[0],
|
|
26416
|
-
setScrollTop = _useState8[1];
|
|
26683
|
+
var notificationIdsRef = React.useRef('');
|
|
26417
26684
|
var onLeftButtonClick = function onLeftButtonClick() {
|
|
26418
26685
|
return i === 0 ? setI(last) : setI(i - 1);
|
|
26419
26686
|
};
|
|
@@ -26421,9 +26688,7 @@ var Notifications = function Notifications(_ref) {
|
|
|
26421
26688
|
return i === last ? setI(0) : setI(i + 1);
|
|
26422
26689
|
};
|
|
26423
26690
|
var resetSidebarView = React.useCallback(function () {
|
|
26424
|
-
|
|
26425
|
-
itemHeightsRef.current = {};
|
|
26426
|
-
setScrollTop(0);
|
|
26691
|
+
setExpandedGroups({});
|
|
26427
26692
|
if (scrollRef.current) {
|
|
26428
26693
|
scrollRef.current.scrollTop = 0;
|
|
26429
26694
|
}
|
|
@@ -26433,14 +26698,24 @@ var Notifications = function Notifications(_ref) {
|
|
|
26433
26698
|
setI(notifications.length - 1);
|
|
26434
26699
|
}
|
|
26435
26700
|
setLast(notifications.length - 1);
|
|
26436
|
-
|
|
26437
|
-
|
|
26438
|
-
|
|
26439
|
-
|
|
26701
|
+
var nextIds = notifications.map(function (n) {
|
|
26702
|
+
return n.notificationId;
|
|
26703
|
+
}).join('|');
|
|
26704
|
+
var structureChanged = nextIds !== notificationIdsRef.current;
|
|
26705
|
+
notificationIdsRef.current = nextIds;
|
|
26706
|
+
if (structureChanged) {
|
|
26707
|
+
setExpandedGroups(function (prev) {
|
|
26708
|
+
var next = {};
|
|
26709
|
+
var appNames = new Set(notifications.map(function (n) {
|
|
26710
|
+
return n.sourceApplication || 'Other';
|
|
26711
|
+
}));
|
|
26712
|
+
Object.keys(prev).forEach(function (appName) {
|
|
26713
|
+
if (prev[appName] && appNames.has(appName)) {
|
|
26714
|
+
next[appName] = true;
|
|
26715
|
+
}
|
|
26716
|
+
});
|
|
26717
|
+
return next;
|
|
26440
26718
|
});
|
|
26441
|
-
if (!stillHasApp) {
|
|
26442
|
-
setExpandedAppName(null);
|
|
26443
|
-
}
|
|
26444
26719
|
}
|
|
26445
26720
|
}, [notifications]);
|
|
26446
26721
|
React.useEffect(function () {
|
|
@@ -26448,87 +26723,13 @@ var Notifications = function Notifications(_ref) {
|
|
|
26448
26723
|
resetSidebarView();
|
|
26449
26724
|
}
|
|
26450
26725
|
}, [sidebarOpen, resetSidebarView]);
|
|
26451
|
-
|
|
26452
|
-
// Virtualizer state for the sidebar list
|
|
26453
|
-
var _useState9 = React.useState(600),
|
|
26454
|
-
_useState0 = _slicedToArray(_useState9, 2),
|
|
26455
|
-
viewportHeight = _useState0[0],
|
|
26456
|
-
setViewportHeight = _useState0[1];
|
|
26457
|
-
var rafPendingRef = React.useRef(false);
|
|
26458
|
-
var _useState1 = React.useState(0),
|
|
26459
|
-
_useState10 = _slicedToArray(_useState1, 2),
|
|
26460
|
-
forceUpdate = _useState10[1];
|
|
26461
|
-
React.useEffect(function () {
|
|
26462
|
-
var el = scrollRef.current;
|
|
26463
|
-
if (!el) return;
|
|
26464
|
-
var handleScroll = function handleScroll() {
|
|
26465
|
-
return setScrollTop(el.scrollTop);
|
|
26466
|
-
};
|
|
26467
|
-
var ro = new ResizeObserver(function (entries) {
|
|
26468
|
-
var _iterator = _createForOfIteratorHelper(entries),
|
|
26469
|
-
_step;
|
|
26470
|
-
try {
|
|
26471
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
26472
|
-
var entry = _step.value;
|
|
26473
|
-
setViewportHeight(entry.contentRect.height);
|
|
26474
|
-
}
|
|
26475
|
-
} catch (err) {
|
|
26476
|
-
_iterator.e(err);
|
|
26477
|
-
} finally {
|
|
26478
|
-
_iterator.f();
|
|
26479
|
-
}
|
|
26480
|
-
});
|
|
26481
|
-
el.addEventListener('scroll', handleScroll, {
|
|
26482
|
-
passive: true
|
|
26483
|
-
});
|
|
26484
|
-
ro.observe(el);
|
|
26485
|
-
return function () {
|
|
26486
|
-
el.removeEventListener('scroll', handleScroll);
|
|
26487
|
-
ro.disconnect();
|
|
26488
|
-
};
|
|
26489
|
-
}, [showSideBar]);
|
|
26490
|
-
|
|
26491
|
-
// Ref callback: measures rendered item height and triggers a rAF-batched re-render
|
|
26492
|
-
// when the measured height differs from the cached value.
|
|
26493
|
-
var measureItem = React.useCallback(function (index) {
|
|
26494
|
-
return function (node) {
|
|
26495
|
-
if (!node) return;
|
|
26496
|
-
var height = node.getBoundingClientRect().height;
|
|
26497
|
-
if (itemHeightsRef.current[index] === height) return;
|
|
26498
|
-
itemHeightsRef.current[index] = height;
|
|
26499
|
-
if (!rafPendingRef.current) {
|
|
26500
|
-
rafPendingRef.current = true;
|
|
26501
|
-
requestAnimationFrame(function () {
|
|
26502
|
-
rafPendingRef.current = false;
|
|
26503
|
-
forceUpdate(function (n) {
|
|
26504
|
-
return n + 1;
|
|
26505
|
-
});
|
|
26506
|
-
});
|
|
26507
|
-
}
|
|
26508
|
-
};
|
|
26509
|
-
}, []);
|
|
26510
26726
|
var count = notifications.length;
|
|
26511
|
-
var notificationGroups = showSideBar ?
|
|
26512
|
-
var
|
|
26513
|
-
|
|
26514
|
-
|
|
26515
|
-
|
|
26516
|
-
if (scrollRef.current) {
|
|
26517
|
-
scrollRef.current.scrollTop = 0;
|
|
26518
|
-
}
|
|
26519
|
-
};
|
|
26520
|
-
var handleBackToAllApps = function handleBackToAllApps() {
|
|
26521
|
-
resetSidebarView();
|
|
26727
|
+
var notificationGroups = showSideBar ? groupNotificationsByApp(notifications) : [];
|
|
26728
|
+
var toggleGroupExpand = function toggleGroupExpand(appName) {
|
|
26729
|
+
setExpandedGroups(function (prev) {
|
|
26730
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty$2({}, appName, !prev[appName]));
|
|
26731
|
+
});
|
|
26522
26732
|
};
|
|
26523
|
-
var virtualListCount = showSideBar ? notificationGroups.length : count;
|
|
26524
|
-
var estimatedHeight = showSideBar ? ESTIMATED_GROUP_HEIGHT : ESTIMATED_ITEM_HEIGHT;
|
|
26525
|
-
var offsets = buildOffsets(virtualListCount, itemHeightsRef.current, estimatedHeight);
|
|
26526
|
-
var totalHeight = offsets[virtualListCount];
|
|
26527
|
-
var rawStart = findStartIndex(offsets, scrollTop);
|
|
26528
|
-
var startIdx = Math.max(0, rawStart - OVERSCAN);
|
|
26529
|
-
var endRaw = rawStart;
|
|
26530
|
-
while (endRaw < virtualListCount && offsets[endRaw] < scrollTop + viewportHeight) endRaw++;
|
|
26531
|
-
var endIdx = Math.min(virtualListCount - 1, endRaw + OVERSCAN);
|
|
26532
26733
|
var notification = notifications[i];
|
|
26533
26734
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !isNil$2(notification) && !showSideBar ? /*#__PURE__*/React__default["default"].createElement(Banner, _extends$1({
|
|
26534
26735
|
current: i + 1,
|
|
@@ -26546,7 +26747,19 @@ var Notifications = function Notifications(_ref) {
|
|
|
26546
26747
|
notificationsTopContainerRef: notificationsTopContainerRef,
|
|
26547
26748
|
mobileNotificationsTopContainerRef: mobileNotificationsTopContainerRef,
|
|
26548
26749
|
setNotificationHeightFlag: setNotificationHeightFlag
|
|
26549
|
-
})) : null,
|
|
26750
|
+
})) : null, showSideBar ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26751
|
+
style: {
|
|
26752
|
+
height: '100%'
|
|
26753
|
+
}
|
|
26754
|
+
}, count === 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26755
|
+
className: "utilities_ops-announcements_Banner--sideNotificationEmptyState"
|
|
26756
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
26757
|
+
className: "utilities_ops-announcements_Banner--sideNotificationEmptyIcon",
|
|
26758
|
+
src: "/assets/icons/no_notification_sidebar.svg",
|
|
26759
|
+
alt: ""
|
|
26760
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
26761
|
+
className: "utilities_ops-announcements_Banner--sideNotificationEmptyText"
|
|
26762
|
+
}, "No pending notifications")) : null, count > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26550
26763
|
ref: scrollRef,
|
|
26551
26764
|
style: {
|
|
26552
26765
|
height: '100%',
|
|
@@ -26554,40 +26767,23 @@ var Notifications = function Notifications(_ref) {
|
|
|
26554
26767
|
overflowX: 'hidden'
|
|
26555
26768
|
}
|
|
26556
26769
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26557
|
-
|
|
26558
|
-
|
|
26559
|
-
|
|
26560
|
-
width: '100%'
|
|
26561
|
-
}
|
|
26562
|
-
}, Array.from({
|
|
26563
|
-
length: endIdx - startIdx + 1
|
|
26564
|
-
}, function (_, rel) {
|
|
26565
|
-
var index = startIdx + rel;
|
|
26566
|
-
var group = notificationGroups[index];
|
|
26567
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26770
|
+
className: "utilities_ops-announcements_Banner--sideNotificationSidebarList"
|
|
26771
|
+
}, notificationGroups.map(function (group) {
|
|
26772
|
+
return /*#__PURE__*/React__default["default"].createElement(SideNotificationGroup, {
|
|
26568
26773
|
key: group.appName,
|
|
26569
|
-
ref: measureItem(index),
|
|
26570
|
-
style: {
|
|
26571
|
-
position: 'absolute',
|
|
26572
|
-
top: offsets[index],
|
|
26573
|
-
left: 0,
|
|
26574
|
-
width: '100%'
|
|
26575
|
-
}
|
|
26576
|
-
}, /*#__PURE__*/React__default["default"].createElement(SideNotificationGroup, {
|
|
26577
26774
|
appName: group.appName,
|
|
26578
26775
|
totalCount: group.totalCount,
|
|
26579
26776
|
notifications: group.notifications,
|
|
26580
|
-
|
|
26581
|
-
|
|
26582
|
-
|
|
26583
|
-
onViewAll: function onViewAll() {
|
|
26584
|
-
return handleViewAll(group.appName);
|
|
26777
|
+
isExpanded: Boolean(expandedGroups[group.appName]),
|
|
26778
|
+
onToggleExpand: function onToggleExpand() {
|
|
26779
|
+
return toggleGroupExpand(group.appName);
|
|
26585
26780
|
},
|
|
26586
26781
|
onDismiss: _onDismiss,
|
|
26782
|
+
scrollContainerRef: scrollRef,
|
|
26587
26783
|
ActionComponent: ActionComponent,
|
|
26588
26784
|
saveActionComponentState: saveActionComponentState
|
|
26589
|
-
})
|
|
26590
|
-
}))) : null);
|
|
26785
|
+
});
|
|
26786
|
+
}))) : null) : null);
|
|
26591
26787
|
};
|
|
26592
26788
|
|
|
26593
26789
|
var capitalizeAndReplaceUnderscores = function capitalizeAndReplaceUnderscores(role) {
|
|
@@ -26656,6 +26852,7 @@ var _styleModuleImportMap$3 = {
|
|
|
26656
26852
|
"sideBarWrapper": "utilities_ops-app-frame_AppBarComponent_AppBar--sideBarWrapper",
|
|
26657
26853
|
"innerNotificationDiv": "utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv",
|
|
26658
26854
|
"notificationsHeader": "utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeader",
|
|
26855
|
+
"notificationsHeaderCount": "utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeaderCount",
|
|
26659
26856
|
"notificationsWrapper": "utilities_ops-app-frame_AppBarComponent_AppBar--notificationsWrapper",
|
|
26660
26857
|
"notificationCount": "utilities_ops-app-frame_AppBarComponent_AppBar--notificationCount",
|
|
26661
26858
|
"twoChars": "utilities_ops-app-frame_AppBarComponent_AppBar--twoChars",
|
|
@@ -27139,7 +27336,7 @@ var notificationIconComp = function notificationIconComp(_ref3) {
|
|
|
27139
27336
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--flex-grid-items",
|
|
27140
27337
|
style: _objectSpread2({}, marginStyle),
|
|
27141
27338
|
onClick: function onClick() {
|
|
27142
|
-
return
|
|
27339
|
+
return handleIconClick(ICONS.NOTIFICATIONS);
|
|
27143
27340
|
}
|
|
27144
27341
|
}, /*#__PURE__*/React__default["default"].createElement(coreComponents.IconV2, {
|
|
27145
27342
|
name: "bell",
|
|
@@ -27152,7 +27349,7 @@ var notificationIconComp = function notificationIconComp(_ref3) {
|
|
|
27152
27349
|
style: {
|
|
27153
27350
|
fontSize: '10px'
|
|
27154
27351
|
}
|
|
27155
|
-
}, notifications.length)),
|
|
27352
|
+
}, notifications.length)), notificationsVisible && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27156
27353
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--arrowTipContainer"
|
|
27157
27354
|
}));
|
|
27158
27355
|
};
|
|
@@ -27221,6 +27418,8 @@ var AppBar$1 = function AppBar(props) {
|
|
|
27221
27418
|
props.title;
|
|
27222
27419
|
var getInnovationHubToken = props.getInnovationHubToken,
|
|
27223
27420
|
notifications = props.notifications,
|
|
27421
|
+
_props$bannerNotifica = props.bannerNotifications,
|
|
27422
|
+
bannerNotifications = _props$bannerNotifica === void 0 ? [] : _props$bannerNotifica,
|
|
27224
27423
|
onDismiss = props.onDismiss,
|
|
27225
27424
|
ActionComponent = props.ActionComponent,
|
|
27226
27425
|
saveActionComponentState = props.saveActionComponentState,
|
|
@@ -27237,6 +27436,7 @@ var AppBar$1 = function AppBar(props) {
|
|
|
27237
27436
|
availableStatuses = props.availableStatuses,
|
|
27238
27437
|
currentUserStatus = props.currentUserStatus,
|
|
27239
27438
|
onUserStatusUpdate = props.onUserStatusUpdate;
|
|
27439
|
+
var hasBannerNotifications = bannerNotifications.length > 0;
|
|
27240
27440
|
var _useWindowSize = useWindowSize(),
|
|
27241
27441
|
width = _useWindowSize.width;
|
|
27242
27442
|
_useWindowSize.height;
|
|
@@ -27557,7 +27757,7 @@ var AppBar$1 = function AppBar(props) {
|
|
|
27557
27757
|
})), ideaNoteVisible && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27558
27758
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetContainer",
|
|
27559
27759
|
style: {
|
|
27560
|
-
top:
|
|
27760
|
+
top: hasBannerNotifications ? "".concat(sideBarTopValue, "px") : '48px'
|
|
27561
27761
|
}
|
|
27562
27762
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27563
27763
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--ideaWidgetHide",
|
|
@@ -27601,21 +27801,23 @@ var AppBar$1 = function AppBar(props) {
|
|
|
27601
27801
|
feedbackConfig: props.feedbackConfig,
|
|
27602
27802
|
showMihelpDot: showMihelpDot,
|
|
27603
27803
|
sideBarTopValue: sideBarTopValue,
|
|
27604
|
-
|
|
27804
|
+
bannerNotifications: bannerNotifications
|
|
27605
27805
|
}), notificationsVisible && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27606
27806
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--sideBarWrapper",
|
|
27607
27807
|
style: {
|
|
27608
|
-
top:
|
|
27808
|
+
top: hasBannerNotifications ? "".concat(sideBarTopValue, "px") : '48px'
|
|
27609
27809
|
},
|
|
27610
27810
|
onClick: closeSidebar
|
|
27611
27811
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27612
|
-
className: "utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv",
|
|
27812
|
+
className: "g2-notifications-sidebar-v2 utilities_ops-app-frame_AppBarComponent_AppBar--innerNotificationDiv",
|
|
27613
27813
|
style: {
|
|
27614
|
-
height: "calc(100dvh - ".concat(
|
|
27814
|
+
height: "calc(100dvh - ".concat(hasBannerNotifications ? sideBarTopValue : 48, "px)")
|
|
27615
27815
|
}
|
|
27616
27816
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27617
27817
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeader"
|
|
27618
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", null, "Notifications")
|
|
27818
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, "Notifications"), (notifications === null || notifications === void 0 ? void 0 : notifications.length) > 0 && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
27819
|
+
className: "utilities_ops-app-frame_AppBarComponent_AppBar--notificationsHeaderCount"
|
|
27820
|
+
}, " (", notifications.length, ")")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27619
27821
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--notificationsWrapper"
|
|
27620
27822
|
}, /*#__PURE__*/React__default["default"].createElement(Notifications, {
|
|
27621
27823
|
notifications: notifications || [],
|
|
@@ -27633,13 +27835,13 @@ var AppBar$1 = function AppBar(props) {
|
|
|
27633
27835
|
})), settingsVisible && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27634
27836
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebarWrapper",
|
|
27635
27837
|
style: {
|
|
27636
|
-
top:
|
|
27838
|
+
top: hasBannerNotifications ? "".concat(sideBarTopValue, "px") : '48px'
|
|
27637
27839
|
},
|
|
27638
27840
|
onClick: closeSidebar
|
|
27639
27841
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27640
27842
|
className: "utilities_ops-app-frame_AppBarComponent_AppBar--settingsSidebar",
|
|
27641
27843
|
style: {
|
|
27642
|
-
height: "calc(100dvh - ".concat(
|
|
27844
|
+
height: "calc(100dvh - ".concat(hasBannerNotifications ? sideBarTopValue : 48, "px)")
|
|
27643
27845
|
}
|
|
27644
27846
|
}, !stack || stack === 'c' ? /*#__PURE__*/React__default["default"].createElement(SettingsView$2, {
|
|
27645
27847
|
onSave: onSave,
|
|
@@ -27666,7 +27868,7 @@ var AppBar$1 = function AppBar(props) {
|
|
|
27666
27868
|
closeSidebar: closeSidebar,
|
|
27667
27869
|
logout: onLogoutItemClicked,
|
|
27668
27870
|
items: mobileMenuItems,
|
|
27669
|
-
|
|
27871
|
+
bannerNotifications: bannerNotifications,
|
|
27670
27872
|
sideBarTopValue: sideBarTopValue,
|
|
27671
27873
|
availableStatuses: availableStatuses,
|
|
27672
27874
|
currentUserStatus: currentUserStatus,
|
|
@@ -29506,6 +29708,7 @@ function fetchG2Notifications(updateNotifications, updateAllNotificationsList) {
|
|
|
29506
29708
|
notification.dismissibleFlag = notification.dismissal_flag;
|
|
29507
29709
|
notification.feedUrl = notification.feed_url;
|
|
29508
29710
|
notification.notificationId = notification.notification_id;
|
|
29711
|
+
notification.displayLocation = notification.display_location;
|
|
29509
29712
|
notification.sourceApplication = notification.source_application;
|
|
29510
29713
|
notification.sourcePlatform = notification.source_platform;
|
|
29511
29714
|
notification.timeZoneType = notification.timezone_type;
|
|
@@ -29530,9 +29733,6 @@ function fetchG2Notifications(updateNotifications, updateAllNotificationsList) {
|
|
|
29530
29733
|
});
|
|
29531
29734
|
compose(updateNotifications, filterNotifications)(modifiedNotifications);
|
|
29532
29735
|
updateAllNotificationsList(modifiedNotifications, true);
|
|
29533
|
-
// Prune expired entries from viewedNotifications after the main logic
|
|
29534
|
-
// settles. Deferred so it never blocks the notifications render.
|
|
29535
|
-
setTimeout(pruneExpiredViewedNotifications, 0);
|
|
29536
29736
|
}).catch(function (e) {
|
|
29537
29737
|
console.log(e);
|
|
29538
29738
|
});
|
|
@@ -30995,48 +31195,67 @@ var AppBar = function AppBar(_ref) {
|
|
|
30995
31195
|
}
|
|
30996
31196
|
if (history.location.pathname !== '/logout' && history.location.pathname !== '/login' && localStorage.getItem('login') && tileConfigAccess) {
|
|
30997
31197
|
if (notificationsSource.includes('Nchan')) {
|
|
30998
|
-
|
|
30999
|
-
|
|
31000
|
-
|
|
31001
|
-
|
|
31002
|
-
|
|
31003
|
-
|
|
31004
|
-
|
|
31005
|
-
|
|
31006
|
-
|
|
31007
|
-
|
|
31008
|
-
|
|
31009
|
-
|
|
31010
|
-
|
|
31011
|
-
|
|
31012
|
-
|
|
31013
|
-
|
|
31014
|
-
|
|
31015
|
-
|
|
31016
|
-
|
|
31198
|
+
var startNchanNotifications = /*#__PURE__*/function () {
|
|
31199
|
+
var _ref6 = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee5() {
|
|
31200
|
+
var client, pingIntervalInSec;
|
|
31201
|
+
return _regenerator().w(function (_context5) {
|
|
31202
|
+
while (1) switch (_context5.n) {
|
|
31203
|
+
case 0:
|
|
31204
|
+
_context5.n = 1;
|
|
31205
|
+
return initViewedNotifications();
|
|
31206
|
+
case 1:
|
|
31207
|
+
fetchG2Notifications(updateNotifications, updateAllNotificationsList);
|
|
31208
|
+
client = startWebSocketConnection(updateNotifications, updateAllNotificationsList, _reConnectSocket, updateUserStatusFromWebSocket, {
|
|
31209
|
+
onOpen: function onOpen() {
|
|
31210
|
+
reconnectingRef.current = false;
|
|
31211
|
+
},
|
|
31212
|
+
onClose: function onClose() {
|
|
31213
|
+
reconnectingRef.current = false;
|
|
31214
|
+
}
|
|
31215
|
+
});
|
|
31216
|
+
if (client) {
|
|
31217
|
+
socketClientRef.current = client;
|
|
31218
|
+
pingIntervalInSec = coreAppConfig.nchanPingIntervalInSec || 30;
|
|
31219
|
+
setPingInterval(setInterval(function () {
|
|
31220
|
+
if (client.readyState === WebSocket.OPEN) {
|
|
31221
|
+
client.send('_ping_');
|
|
31222
|
+
}
|
|
31223
|
+
}, pingIntervalInSec * 1000));
|
|
31224
|
+
setSocketClient(client);
|
|
31225
|
+
}
|
|
31226
|
+
case 2:
|
|
31227
|
+
return _context5.a(2);
|
|
31228
|
+
}
|
|
31229
|
+
}, _callee5);
|
|
31230
|
+
}));
|
|
31231
|
+
return function startNchanNotifications() {
|
|
31232
|
+
return _ref6.apply(this, arguments);
|
|
31233
|
+
};
|
|
31234
|
+
}();
|
|
31235
|
+
startNchanNotifications();
|
|
31017
31236
|
}
|
|
31018
31237
|
var loadUserStatus = /*#__PURE__*/function () {
|
|
31019
|
-
var
|
|
31238
|
+
var _ref7 = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
31020
31239
|
var _userStatus$toLowerCa, statuses, userStatus, statusList, statusListLower, isSystemAssignedStatus, isValidStatus, finalStatus, offlineIndex, updatedStatus, _t6, _t7;
|
|
31021
|
-
return _regenerator().w(function (
|
|
31022
|
-
while (1) switch (
|
|
31240
|
+
return _regenerator().w(function (_context6) {
|
|
31241
|
+
while (1) switch (_context6.p = _context6.n) {
|
|
31023
31242
|
case 0:
|
|
31024
|
-
|
|
31025
|
-
|
|
31243
|
+
_context6.p = 0;
|
|
31244
|
+
_context6.n = 1;
|
|
31026
31245
|
return fetchAvailableStatuses();
|
|
31027
31246
|
case 1:
|
|
31028
|
-
statuses =
|
|
31247
|
+
statuses = _context6.v;
|
|
31029
31248
|
setAvailableStatuses(statuses);
|
|
31030
|
-
|
|
31249
|
+
_context6.n = 2;
|
|
31031
31250
|
return fetchUserStatus();
|
|
31032
31251
|
case 2:
|
|
31033
|
-
userStatus =
|
|
31252
|
+
userStatus = _context6.v;
|
|
31034
31253
|
if (!(userStatus === null)) {
|
|
31035
|
-
|
|
31254
|
+
_context6.n = 3;
|
|
31036
31255
|
break;
|
|
31037
31256
|
}
|
|
31038
31257
|
setAvailableStatuses([]);
|
|
31039
|
-
return
|
|
31258
|
+
return _context6.a(2);
|
|
31040
31259
|
case 3:
|
|
31041
31260
|
statusList = statuses.map(function (s) {
|
|
31042
31261
|
return s.status;
|
|
@@ -31048,7 +31267,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
31048
31267
|
isValidStatus = userStatus && (statusListLower.includes(userStatus.toLowerCase()) || isSystemAssignedStatus);
|
|
31049
31268
|
finalStatus = userStatus;
|
|
31050
31269
|
if (isValidStatus) {
|
|
31051
|
-
|
|
31270
|
+
_context6.n = 8;
|
|
31052
31271
|
break;
|
|
31053
31272
|
}
|
|
31054
31273
|
offlineIndex = statusListLower.indexOf('offline');
|
|
@@ -31058,37 +31277,37 @@ var AppBar = function AppBar(_ref) {
|
|
|
31058
31277
|
finalStatus = statuses[0].status;
|
|
31059
31278
|
}
|
|
31060
31279
|
if (!finalStatus) {
|
|
31061
|
-
|
|
31280
|
+
_context6.n = 7;
|
|
31062
31281
|
break;
|
|
31063
31282
|
}
|
|
31064
31283
|
setCurrentUserStatus(finalStatus);
|
|
31065
31284
|
storage$2.setLocalItem('dashboard', finalStatus, 'userAvailability');
|
|
31066
|
-
|
|
31067
|
-
|
|
31285
|
+
_context6.p = 4;
|
|
31286
|
+
_context6.n = 5;
|
|
31068
31287
|
return updateUserStatus(finalStatus);
|
|
31069
31288
|
case 5:
|
|
31070
|
-
updatedStatus =
|
|
31289
|
+
updatedStatus = _context6.v;
|
|
31071
31290
|
setCurrentUserStatus(updatedStatus);
|
|
31072
31291
|
storage$2.setLocalItem('dashboard', updatedStatus, 'userAvailability');
|
|
31073
|
-
|
|
31292
|
+
_context6.n = 7;
|
|
31074
31293
|
break;
|
|
31075
31294
|
case 6:
|
|
31076
|
-
|
|
31077
|
-
_t6 =
|
|
31295
|
+
_context6.p = 6;
|
|
31296
|
+
_t6 = _context6.v;
|
|
31078
31297
|
console.error('Failed to update defaulted user status:', _t6);
|
|
31079
31298
|
showError('Failed to set default user status.');
|
|
31080
31299
|
case 7:
|
|
31081
|
-
|
|
31300
|
+
_context6.n = 9;
|
|
31082
31301
|
break;
|
|
31083
31302
|
case 8:
|
|
31084
31303
|
setCurrentUserStatus(finalStatus);
|
|
31085
31304
|
storage$2.setLocalItem('dashboard', finalStatus, 'userAvailability');
|
|
31086
31305
|
case 9:
|
|
31087
|
-
|
|
31306
|
+
_context6.n = 11;
|
|
31088
31307
|
break;
|
|
31089
31308
|
case 10:
|
|
31090
|
-
|
|
31091
|
-
_t7 =
|
|
31309
|
+
_context6.p = 10;
|
|
31310
|
+
_t7 = _context6.v;
|
|
31092
31311
|
console.error('Failed to load user status:', _t7);
|
|
31093
31312
|
// if (error.message && error.message.includes('available statuses')) {
|
|
31094
31313
|
// showError('Failed to fetch available statuses.')
|
|
@@ -31096,12 +31315,12 @@ var AppBar = function AppBar(_ref) {
|
|
|
31096
31315
|
// showError('Failed to fetch user status.')
|
|
31097
31316
|
// }
|
|
31098
31317
|
case 11:
|
|
31099
|
-
return
|
|
31318
|
+
return _context6.a(2);
|
|
31100
31319
|
}
|
|
31101
|
-
},
|
|
31320
|
+
}, _callee6, null, [[4, 6], [0, 10]]);
|
|
31102
31321
|
}));
|
|
31103
31322
|
return function loadUserStatus() {
|
|
31104
|
-
return
|
|
31323
|
+
return _ref7.apply(this, arguments);
|
|
31105
31324
|
};
|
|
31106
31325
|
}();
|
|
31107
31326
|
if (!isUserStatusHidden()) {
|
|
@@ -31196,8 +31415,10 @@ var AppBar = function AppBar(_ref) {
|
|
|
31196
31415
|
phoneStatus: '',
|
|
31197
31416
|
phoneStatusProcessing: false
|
|
31198
31417
|
} : _storage$chromePlugin;
|
|
31418
|
+
var bannerNotifications = filterBannerNotifications(notifications);
|
|
31419
|
+
var sidebarNotifications = filterSidebarNotifications(notifications);
|
|
31199
31420
|
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(Notifications, {
|
|
31200
|
-
notifications:
|
|
31421
|
+
notifications: bannerNotifications,
|
|
31201
31422
|
onDismiss: dismissNotification,
|
|
31202
31423
|
ActionComponent: ActionComponent,
|
|
31203
31424
|
saveActionComponentState: saveActionComponentState,
|
|
@@ -31234,7 +31455,8 @@ var AppBar = function AppBar(_ref) {
|
|
|
31234
31455
|
showTitle: showTitle,
|
|
31235
31456
|
title: title,
|
|
31236
31457
|
history: history,
|
|
31237
|
-
notifications:
|
|
31458
|
+
notifications: sidebarNotifications,
|
|
31459
|
+
bannerNotifications: bannerNotifications,
|
|
31238
31460
|
onDismiss: dismissNotification,
|
|
31239
31461
|
ActionComponent: ActionComponent,
|
|
31240
31462
|
saveActionComponentState: saveActionComponentState,
|
|
@@ -65210,7 +65432,7 @@ AppFrame.defaultProps = {
|
|
|
65210
65432
|
navItems: []
|
|
65211
65433
|
};
|
|
65212
65434
|
|
|
65213
|
-
var _excluded$
|
|
65435
|
+
var _excluded$2 = ["fromPhone", "toPhone", "appCode", "entityType", "lotAttributes"];
|
|
65214
65436
|
var logOutboundCalls = /*#__PURE__*/function () {
|
|
65215
65437
|
var _ref = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee(data) {
|
|
65216
65438
|
var _storage$getLocalItem;
|
|
@@ -65246,7 +65468,7 @@ var CallLogger = React__default["default"].memo(function (_ref2) {
|
|
|
65246
65468
|
entityType = _ref2$entityType === void 0 ? '' : _ref2$entityType,
|
|
65247
65469
|
_ref2$lotAttributes = _ref2.lotAttributes,
|
|
65248
65470
|
lotAttributes = _ref2$lotAttributes === void 0 ? {} : _ref2$lotAttributes,
|
|
65249
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
65471
|
+
props = _objectWithoutProperties(_ref2, _excluded$2);
|
|
65250
65472
|
var _useState = React.useState({
|
|
65251
65473
|
error: null,
|
|
65252
65474
|
success: null
|
|
@@ -68672,32 +68894,96 @@ function ContextualHelp(_ref) {
|
|
|
68672
68894
|
}
|
|
68673
68895
|
|
|
68674
68896
|
var IFRAME_EVENTS = {
|
|
68897
|
+
// app → shell
|
|
68675
68898
|
UPDATE_URI: 'UPDATE_URI',
|
|
68676
68899
|
UPDATE_CRUMBS: 'UPDATE_CRUMBS',
|
|
68677
|
-
SET_NAV_CONFIG: 'SET_NAV_CONFIG',
|
|
68678
68900
|
COUNTS_AVAILABLE: 'COUNTS_AVAILABLE',
|
|
68679
68901
|
UPDATE_NAV_COUNTS: 'UPDATE_NAV_COUNTS',
|
|
68680
|
-
REQUEST_NAV_COUNTS: 'REQUEST_NAV_COUNTS',
|
|
68681
68902
|
NAV_COUNTS_RESPONSE: 'NAV_COUNTS_RESPONSE',
|
|
68903
|
+
SET_NAV_CONFIG: 'SET_NAV_CONFIG',
|
|
68904
|
+
FETCH_REQUEST: 'FETCH_REQUEST',
|
|
68905
|
+
CANCEL_REQUEST: 'CANCEL_REQUEST',
|
|
68906
|
+
STORAGE_GET: 'STORAGE_GET',
|
|
68907
|
+
STORAGE_SET: 'STORAGE_SET',
|
|
68908
|
+
ACCESS_CHECK: 'ACCESS_CHECK',
|
|
68909
|
+
GET_INIT_DATA: 'GET_INIT_DATA',
|
|
68910
|
+
GET_IFRAME_DATA: 'GET_IFRAME_DATA',
|
|
68682
68911
|
SET_APP_ENV: 'SET_APP_ENV',
|
|
68912
|
+
HISTORY_GO: 'HISTORY_GO',
|
|
68913
|
+
SESSION_EXPIRED: 'SESSION_EXPIRED',
|
|
68914
|
+
// shell → app
|
|
68915
|
+
LOAD_URI: 'LOAD_URI',
|
|
68916
|
+
FETCH_RESPONSE: 'FETCH_RESPONSE',
|
|
68917
|
+
STORAGE_RESPONSE: 'STORAGE_RESPONSE',
|
|
68918
|
+
ACCESS_RESPONSE: 'ACCESS_RESPONSE',
|
|
68919
|
+
INIT_DATA: 'INIT_DATA',
|
|
68920
|
+
IFRAME_DATA: 'IFRAME_DATA',
|
|
68683
68921
|
STORAGE_CHANGED: 'STORAGE_CHANGED',
|
|
68684
|
-
|
|
68922
|
+
REQUEST_NAV_COUNTS: 'REQUEST_NAV_COUNTS',
|
|
68923
|
+
CRUMB_CLICKED: 'CRUMB_CLICKED'
|
|
68685
68924
|
};
|
|
68925
|
+
var ALLOWED_ORIGINS = ['.copart.com', '.copart.co.uk', '.copart.ca', '.copartmea.com', '.copart.ie'];
|
|
68926
|
+
function isAllowedOrigin(origin) {
|
|
68927
|
+
try {
|
|
68928
|
+
var hostname = new URL(origin).hostname;
|
|
68929
|
+
return ALLOWED_ORIGINS.some(function (domain) {
|
|
68930
|
+
return hostname === domain.slice(1) || hostname.endsWith(domain);
|
|
68931
|
+
});
|
|
68932
|
+
} catch (_) {
|
|
68933
|
+
return false;
|
|
68934
|
+
}
|
|
68935
|
+
}
|
|
68686
68936
|
|
|
68687
|
-
var _excluded = ["signal"];
|
|
68937
|
+
var _excluded$1 = ["signal"];
|
|
68688
68938
|
var pending = new Map();
|
|
68689
68939
|
var STORAGE_REQUEST_TIMEOUT_MS = 5000;
|
|
68690
68940
|
function requestId() {
|
|
68691
|
-
return
|
|
68941
|
+
return crypto.randomUUID();
|
|
68942
|
+
}
|
|
68943
|
+
|
|
68944
|
+
// The exact origin of the shell that framed us. Learned from the first inbound
|
|
68945
|
+
// message that passes validation (origin is copart + came from window.parent),
|
|
68946
|
+
// then pinned. Used as the targetOrigin for every outbound post() so app→shell
|
|
68947
|
+
// messages (incl. FETCH_REQUEST bodies) are never broadcast to '*'.
|
|
68948
|
+
//
|
|
68949
|
+
// If SHELL_ORIGIN is provided at build time we lock to it up front — there is
|
|
68950
|
+
// only one shell, so this is the tightest option and closes the "any
|
|
68951
|
+
// *.copart.com subdomain" residual entirely. Otherwise we capture-and-lock.
|
|
68952
|
+
var trustedParentOrigin = typeof process !== 'undefined' && process.env && process.env.SHELL_ORIGIN || null;
|
|
68953
|
+
|
|
68954
|
+
/**
|
|
68955
|
+
* Gate every inbound message. event.origin is set by the browser and cannot be
|
|
68956
|
+
* forged by the sender, so a non-copart parent (e.g. a malicious embedder) is
|
|
68957
|
+
* rejected here before it can lock the origin or be processed.
|
|
68958
|
+
* - must come from our direct parent window (single framer),
|
|
68959
|
+
* - must be a copart origin (or the pinned SHELL_ORIGIN if configured),
|
|
68960
|
+
* - once an origin is pinned, only that exact origin is accepted thereafter.
|
|
68961
|
+
*/
|
|
68962
|
+
function isTrustedMessage(event) {
|
|
68963
|
+
if (typeof window !== 'undefined' && event.source !== window.parent) return false;
|
|
68964
|
+
if (trustedParentOrigin) {
|
|
68965
|
+
// Already pinned (via SHELL_ORIGIN or a prior capture): exact match only.
|
|
68966
|
+
return event.origin === trustedParentOrigin;
|
|
68967
|
+
}
|
|
68968
|
+
if (!isAllowedOrigin(event.origin)) return false;
|
|
68969
|
+
// First valid message from a copart parent — pin it.
|
|
68970
|
+
trustedParentOrigin = event.origin;
|
|
68971
|
+
return true;
|
|
68692
68972
|
}
|
|
68693
68973
|
function post(eventType, eventProps) {
|
|
68694
68974
|
if (typeof window === 'undefined' || !window.parent) return;
|
|
68975
|
+
// Never fall back to '*': if we have not yet learned the shell origin, use the
|
|
68976
|
+
// '/' sentinel ("deliver only if same-origin as us") so nothing leaks to a
|
|
68977
|
+
// malicious framer. In practice an inbound message pins the origin before the
|
|
68978
|
+
// app sends anything.
|
|
68979
|
+
var targetOrigin = trustedParentOrigin || '/';
|
|
68695
68980
|
window.parent.postMessage({
|
|
68696
68981
|
eventType: eventType,
|
|
68697
68982
|
eventProps: eventProps || {}
|
|
68698
|
-
},
|
|
68983
|
+
}, targetOrigin);
|
|
68699
68984
|
}
|
|
68700
68985
|
function handleMessage(event) {
|
|
68986
|
+
if (!isTrustedMessage(event)) return;
|
|
68701
68987
|
var data = event.data;
|
|
68702
68988
|
if (!data || !data.eventType) return;
|
|
68703
68989
|
var _data$eventProps = data.eventProps,
|
|
@@ -68710,7 +68996,7 @@ function handleMessage(event) {
|
|
|
68710
68996
|
pendingResponseType = _pending$get.responseType;
|
|
68711
68997
|
pending.delete(id);
|
|
68712
68998
|
switch (data.eventType) {
|
|
68713
|
-
case
|
|
68999
|
+
case IFRAME_EVENTS.FETCH_RESPONSE:
|
|
68714
69000
|
if ('error' in eventProps) {
|
|
68715
69001
|
var _eventProps$error, _eventProps$error2, _eventProps$error3, _eventProps$error4, _eventProps$error5;
|
|
68716
69002
|
var err = new Error(((_eventProps$error = eventProps.error) === null || _eventProps$error === void 0 ? void 0 : _eventProps$error.message) || 'Fetch failed');
|
|
@@ -68724,12 +69010,7 @@ function handleMessage(event) {
|
|
|
68724
69010
|
var _eventProps$result;
|
|
68725
69011
|
var resultData = (_eventProps$result = eventProps.result) === null || _eventProps$result === void 0 ? void 0 : _eventProps$result.data;
|
|
68726
69012
|
if (pendingResponseType === 'arraybuffer') {
|
|
68727
|
-
if (resultData instanceof ArrayBuffer) {
|
|
68728
|
-
console.log('[iframe-bridge/transport] FETCH_RESPONSE binary OK', {
|
|
68729
|
-
requestId: id,
|
|
68730
|
-
byteLength: resultData.byteLength
|
|
68731
|
-
});
|
|
68732
|
-
} else {
|
|
69013
|
+
if (resultData instanceof ArrayBuffer) ; else {
|
|
68733
69014
|
// Shell returned non-binary for a request that expected arraybuffer.
|
|
68734
69015
|
// This means Step 2 (shell) has not been deployed yet, or the shell
|
|
68735
69016
|
// is not forwarding responseType to its own axios call.
|
|
@@ -68743,13 +69024,13 @@ function handleMessage(event) {
|
|
|
68743
69024
|
resolve(eventProps.result);
|
|
68744
69025
|
}
|
|
68745
69026
|
break;
|
|
68746
|
-
case
|
|
69027
|
+
case IFRAME_EVENTS.STORAGE_RESPONSE:
|
|
68747
69028
|
resolve(eventProps.result);
|
|
68748
69029
|
break;
|
|
68749
|
-
case
|
|
69030
|
+
case IFRAME_EVENTS.ACCESS_RESPONSE:
|
|
68750
69031
|
resolve(eventProps.result);
|
|
68751
69032
|
break;
|
|
68752
|
-
case
|
|
69033
|
+
case IFRAME_EVENTS.INIT_DATA:
|
|
68753
69034
|
resolve(eventProps.result);
|
|
68754
69035
|
break;
|
|
68755
69036
|
}
|
|
@@ -68759,13 +69040,10 @@ if (typeof window !== 'undefined') {
|
|
|
68759
69040
|
}
|
|
68760
69041
|
function sendFetchRequest(payload) {
|
|
68761
69042
|
var signal = payload.signal,
|
|
68762
|
-
restPayload = _objectWithoutProperties(payload, _excluded);
|
|
69043
|
+
restPayload = _objectWithoutProperties(payload, _excluded$1);
|
|
68763
69044
|
return new Promise(function (resolve, reject) {
|
|
68764
69045
|
// Reject immediately if the signal is already aborted before we even send
|
|
68765
69046
|
if (signal !== null && signal !== void 0 && signal.aborted) {
|
|
68766
|
-
console.log('[iframe-bridge/transport] FETCH_REQUEST aborted before send', {
|
|
68767
|
-
url: payload.url
|
|
68768
|
-
});
|
|
68769
69047
|
reject(new DOMException('Request aborted', 'AbortError'));
|
|
68770
69048
|
return;
|
|
68771
69049
|
}
|
|
@@ -68776,27 +69054,14 @@ function sendFetchRequest(payload) {
|
|
|
68776
69054
|
reject: reject,
|
|
68777
69055
|
responseType: payload.responseType
|
|
68778
69056
|
});
|
|
68779
|
-
if (payload.responseType || payload.timeout != null || payload.withCredentials != null) {
|
|
68780
|
-
console.log('[iframe-bridge/transport] sending FETCH_REQUEST with extended options', {
|
|
68781
|
-
requestId: id,
|
|
68782
|
-
url: payload.url,
|
|
68783
|
-
responseType: payload.responseType,
|
|
68784
|
-
timeout: payload.timeout,
|
|
68785
|
-
withCredentials: payload.withCredentials
|
|
68786
|
-
});
|
|
68787
|
-
}
|
|
68788
69057
|
|
|
68789
69058
|
// signal cannot be transferred through postMessage — handle abort locally
|
|
68790
69059
|
if (signal) {
|
|
68791
69060
|
var onAbort = function onAbort() {
|
|
68792
69061
|
if (pending.has(id)) {
|
|
68793
69062
|
pending.delete(id);
|
|
68794
|
-
console.log('[iframe-bridge/transport] FETCH_REQUEST aborted mid-flight', {
|
|
68795
|
-
requestId: id,
|
|
68796
|
-
url: payload.url
|
|
68797
|
-
});
|
|
68798
69063
|
// Notify the shell so it can cancel its own request if wired up
|
|
68799
|
-
post(
|
|
69064
|
+
post(IFRAME_EVENTS.CANCEL_REQUEST, {
|
|
68800
69065
|
requestId: id
|
|
68801
69066
|
});
|
|
68802
69067
|
reject(new DOMException('Request aborted', 'AbortError'));
|
|
@@ -68808,7 +69073,7 @@ function sendFetchRequest(payload) {
|
|
|
68808
69073
|
}
|
|
68809
69074
|
|
|
68810
69075
|
// signal is intentionally excluded from the message — it's a non-serialisable DOM object
|
|
68811
|
-
post(
|
|
69076
|
+
post(IFRAME_EVENTS.FETCH_REQUEST, _objectSpread2(_objectSpread2({}, restPayload), {}, {
|
|
68812
69077
|
requestId: id
|
|
68813
69078
|
}));
|
|
68814
69079
|
});
|
|
@@ -68838,7 +69103,7 @@ function sendStorageGet(payload) {
|
|
|
68838
69103
|
_resolve(undefined);
|
|
68839
69104
|
}
|
|
68840
69105
|
});
|
|
68841
|
-
post(
|
|
69106
|
+
post(IFRAME_EVENTS.STORAGE_GET, _objectSpread2(_objectSpread2({}, payload), {}, {
|
|
68842
69107
|
requestId: id
|
|
68843
69108
|
}));
|
|
68844
69109
|
});
|
|
@@ -68868,35 +69133,44 @@ function sendStorageSet(payload) {
|
|
|
68868
69133
|
_resolve2(undefined);
|
|
68869
69134
|
}
|
|
68870
69135
|
});
|
|
68871
|
-
post(
|
|
69136
|
+
post(IFRAME_EVENTS.STORAGE_SET, _objectSpread2(_objectSpread2({}, payload), {}, {
|
|
68872
69137
|
requestId: id
|
|
68873
69138
|
}));
|
|
68874
69139
|
});
|
|
68875
69140
|
}
|
|
68876
69141
|
function getInitData() {
|
|
68877
|
-
return new Promise(function (
|
|
69142
|
+
return new Promise(function (_resolve4) {
|
|
68878
69143
|
var id = requestId();
|
|
68879
69144
|
var timer = setTimeout(function () {
|
|
68880
69145
|
if (pending.has(id)) {
|
|
68881
69146
|
pending.delete(id);
|
|
68882
|
-
|
|
69147
|
+
_resolve4(null);
|
|
68883
69148
|
}
|
|
68884
69149
|
}, 5000);
|
|
68885
69150
|
pending.set(id, {
|
|
68886
69151
|
resolve: function resolve(result) {
|
|
68887
69152
|
clearTimeout(timer);
|
|
68888
|
-
|
|
69153
|
+
_resolve4(result);
|
|
68889
69154
|
},
|
|
68890
69155
|
reject: function reject() {
|
|
68891
69156
|
clearTimeout(timer);
|
|
68892
|
-
|
|
69157
|
+
_resolve4(null);
|
|
68893
69158
|
}
|
|
68894
69159
|
});
|
|
68895
|
-
post(
|
|
69160
|
+
post(IFRAME_EVENTS.GET_INIT_DATA, {
|
|
68896
69161
|
requestId: id
|
|
68897
69162
|
});
|
|
68898
69163
|
});
|
|
68899
69164
|
}
|
|
69165
|
+
|
|
69166
|
+
/**
|
|
69167
|
+
* The shell origin we are pinned to (learned from the handshake or SHELL_ORIGIN).
|
|
69168
|
+
* Null until the first valid inbound message arrives. Used to build absolute
|
|
69169
|
+
* shell URLs (e.g. AppLink opening a shell route in a new tab).
|
|
69170
|
+
*/
|
|
69171
|
+
function getShellOrigin() {
|
|
69172
|
+
return trustedParentOrigin;
|
|
69173
|
+
}
|
|
68900
69174
|
function postHistoryGo(delta) {
|
|
68901
69175
|
post(IFRAME_EVENTS.HISTORY_GO, {
|
|
68902
69176
|
delta: delta
|
|
@@ -68967,6 +69241,7 @@ function sendAppEnv(toolkitEnv) {
|
|
|
68967
69241
|
}
|
|
68968
69242
|
function addMessageListener(callback) {
|
|
68969
69243
|
var handler = function handler(event) {
|
|
69244
|
+
if (!isTrustedMessage(event)) return;
|
|
68970
69245
|
var data = event.data;
|
|
68971
69246
|
if (data && data.eventType) callback(data);
|
|
68972
69247
|
};
|
|
@@ -68989,7 +69264,8 @@ function getInitialUri() {
|
|
|
68989
69264
|
}
|
|
68990
69265
|
return new Promise(function (resolve) {
|
|
68991
69266
|
function onMessage(event) {
|
|
68992
|
-
if (event
|
|
69267
|
+
if (!isTrustedMessage(event)) return;
|
|
69268
|
+
if (event.data && event.data.eventType === IFRAME_EVENTS.LOAD_URI && event.data.eventProps) {
|
|
68993
69269
|
window.removeEventListener('message', onMessage);
|
|
68994
69270
|
clearTimeout(timer);
|
|
68995
69271
|
var _uri = event.data.eventProps.uri;
|
|
@@ -69013,9 +69289,13 @@ function setAppName(name) {
|
|
|
69013
69289
|
_appName = name;
|
|
69014
69290
|
}
|
|
69015
69291
|
function getAppName() {
|
|
69016
|
-
var _window$toolkitEnv;
|
|
69292
|
+
var _window$toolkitEnv, _process$env;
|
|
69017
69293
|
if (_appName) return _appName;
|
|
69018
|
-
|
|
69294
|
+
var envName = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.APP_NAME) || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.APP_NAME) || '';
|
|
69295
|
+
if (!envName) {
|
|
69296
|
+
console.error('[iframe-bridge] APP_NAME is not configured. Storage namespacing and app resolution will not work correctly.');
|
|
69297
|
+
}
|
|
69298
|
+
return envName;
|
|
69019
69299
|
}
|
|
69020
69300
|
|
|
69021
69301
|
/**
|
|
@@ -69023,7 +69303,7 @@ function getAppName() {
|
|
|
69023
69303
|
* Matches standalone toolkit: permissions are stored as `${appAuthName}:permissions`.
|
|
69024
69304
|
*/
|
|
69025
69305
|
function resolveAppAuthName(appName, getLocalItemFn) {
|
|
69026
|
-
var _window$toolkitEnv2, _process$
|
|
69306
|
+
var _window$toolkitEnv2, _process$env2;
|
|
69027
69307
|
if (!appName) return null;
|
|
69028
69308
|
var portalConfig = typeof getLocalItemFn === 'function' ? getLocalItemFn('opsportal-core:config') : null;
|
|
69029
69309
|
var appTiles = portalConfig && portalConfig.tiles || [];
|
|
@@ -69032,11 +69312,14 @@ function resolveAppAuthName(appName, getLocalItemFn) {
|
|
|
69032
69312
|
});
|
|
69033
69313
|
if (appData !== null && appData !== void 0 && appData.appAuthName) return appData.appAuthName;
|
|
69034
69314
|
if ((_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.APP_AUTH_NAME) return window.toolkitEnv.APP_AUTH_NAME;
|
|
69035
|
-
if (typeof process !== 'undefined' && (_process$
|
|
69315
|
+
if (typeof process !== 'undefined' && (_process$env2 = process.env) !== null && _process$env2 !== void 0 && _process$env2.APP_AUTH_NAME) {
|
|
69036
69316
|
return process.env.APP_AUTH_NAME;
|
|
69037
69317
|
}
|
|
69038
69318
|
return null;
|
|
69039
69319
|
}
|
|
69320
|
+
function nullishCoalesce(primary, fallback) {
|
|
69321
|
+
return primary !== null && primary !== undefined ? primary : fallback;
|
|
69322
|
+
}
|
|
69040
69323
|
function getByPath(obj, path) {
|
|
69041
69324
|
if (obj == null) return undefined;
|
|
69042
69325
|
var parts = path.split('.');
|
|
@@ -69073,34 +69356,21 @@ function setInitCache(initData) {
|
|
|
69073
69356
|
// Shell sends config/coreAppPermissions under shorthand keys; map to canonical keys bridge getters expect
|
|
69074
69357
|
if (initData.config != null && initData['opsportal-core:config'] == null) {
|
|
69075
69358
|
cache.local['opsportal-core:config'] = initData.config;
|
|
69076
|
-
console.log('[iframe-bridge/storage] setInitCache mapped config -> opsportal-core:config');
|
|
69077
69359
|
}
|
|
69078
69360
|
if (initData.coreAppPermissions != null && initData['ops_portal:permissions'] == null) {
|
|
69079
69361
|
cache.local['ops_portal:permissions'] = initData.coreAppPermissions;
|
|
69080
|
-
console.log('[iframe-bridge/storage] setInitCache mapped coreAppPermissions -> ops_portal:permissions', {
|
|
69081
|
-
count: Array.isArray(initData.coreAppPermissions) ? initData.coreAppPermissions.length : 'not-array'
|
|
69082
|
-
});
|
|
69083
69362
|
}
|
|
69084
69363
|
var appPermKeys = Object.keys(initData).filter(function (k) {
|
|
69085
69364
|
return k.endsWith(':permissions') && k !== 'ops_portal:permissions';
|
|
69086
69365
|
});
|
|
69087
69366
|
appPermKeys.forEach(function (k) {
|
|
69088
69367
|
cache.local[k] = initData[k];
|
|
69089
|
-
console.log('[iframe-bridge/storage] setInitCache mapped app permissions', {
|
|
69090
|
-
key: k,
|
|
69091
|
-
count: Array.isArray(initData[k]) ? initData[k].length : 'not-array'
|
|
69092
|
-
});
|
|
69093
69368
|
});
|
|
69094
69369
|
var appConfigKeys = Object.keys(initData).filter(function (k) {
|
|
69095
69370
|
return k.endsWith(':config') && k !== 'opsportal-core:config';
|
|
69096
69371
|
});
|
|
69097
69372
|
appConfigKeys.forEach(function (k) {
|
|
69098
|
-
var _initData$k;
|
|
69099
69373
|
cache.local[k] = initData[k];
|
|
69100
|
-
console.log('[iframe-bridge/storage] setInitCache mapped app config', {
|
|
69101
|
-
key: k,
|
|
69102
|
-
hasRunConfig: Boolean((_initData$k = initData[k]) === null || _initData$k === void 0 ? void 0 : _initData$k.runConfig)
|
|
69103
|
-
});
|
|
69104
69374
|
});
|
|
69105
69375
|
}
|
|
69106
69376
|
function setExtraLocal(key, value) {
|
|
@@ -69110,7 +69380,7 @@ function getInitDataForBootstrap() {
|
|
|
69110
69380
|
return getInitData();
|
|
69111
69381
|
}
|
|
69112
69382
|
function getLocalItem(key, path) {
|
|
69113
|
-
var value = cache.local[key]
|
|
69383
|
+
var value = nullishCoalesce(cache.local[key], cache[key]);
|
|
69114
69384
|
var out = path ? getByPath(value, path) : value;
|
|
69115
69385
|
if (out !== undefined) return out;
|
|
69116
69386
|
if (key === 'login') return cache.login;
|
|
@@ -69125,7 +69395,7 @@ function setLocalItem(key, value, path) {
|
|
|
69125
69395
|
path: path
|
|
69126
69396
|
});
|
|
69127
69397
|
if (path) {
|
|
69128
|
-
var existing = cache.local[key]
|
|
69398
|
+
var existing = nullishCoalesce(cache.local[key], nullishCoalesce(cache[key], {}));
|
|
69129
69399
|
cache.local[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
69130
69400
|
} else {
|
|
69131
69401
|
cache.local[key] = value;
|
|
@@ -69134,7 +69404,7 @@ function setLocalItem(key, value, path) {
|
|
|
69134
69404
|
}
|
|
69135
69405
|
}
|
|
69136
69406
|
function getSessionItem(key, path) {
|
|
69137
|
-
var value = cache.session[key]
|
|
69407
|
+
var value = nullishCoalesce(cache.session[key], cache[key]);
|
|
69138
69408
|
var out = path ? getByPath(value, path) : value;
|
|
69139
69409
|
if (out !== undefined) return out;
|
|
69140
69410
|
if (key === 'dashboard') return cache.dashboard;
|
|
@@ -69148,7 +69418,7 @@ function setSessionItem(key, value, path) {
|
|
|
69148
69418
|
path: path
|
|
69149
69419
|
});
|
|
69150
69420
|
if (path) {
|
|
69151
|
-
var existing = cache.session[key]
|
|
69421
|
+
var existing = nullishCoalesce(cache.session[key], nullishCoalesce(cache[key], {}));
|
|
69152
69422
|
cache.session[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
69153
69423
|
} else {
|
|
69154
69424
|
cache.session[key] = value;
|
|
@@ -69190,14 +69460,14 @@ function applyStorageChanged() {
|
|
|
69190
69460
|
if (op === 'set' && key) {
|
|
69191
69461
|
if (scope === 'session') {
|
|
69192
69462
|
if (path) {
|
|
69193
|
-
var existing = cache.session[key]
|
|
69463
|
+
var existing = nullishCoalesce(cache.session[key], {});
|
|
69194
69464
|
cache.session[key] = setByPath(_objectSpread2({}, existing), path, value);
|
|
69195
69465
|
} else {
|
|
69196
69466
|
cache.session[key] = value;
|
|
69197
69467
|
if (key === 'dashboard') cache.dashboard = value;
|
|
69198
69468
|
}
|
|
69199
69469
|
} else if (path) {
|
|
69200
|
-
var _existing = cache.local[key]
|
|
69470
|
+
var _existing = nullishCoalesce(cache.local[key], {});
|
|
69201
69471
|
cache.local[key] = setByPath(_objectSpread2({}, _existing), path, value);
|
|
69202
69472
|
} else {
|
|
69203
69473
|
cache.local[key] = value;
|
|
@@ -69218,7 +69488,7 @@ function removeSessionItemFromCache(key) {
|
|
|
69218
69488
|
function getItem$1(key) {
|
|
69219
69489
|
var APP_NAME = getAppName();
|
|
69220
69490
|
var namespaced = "".concat(APP_NAME, ":").concat(key);
|
|
69221
|
-
return cache.local[namespaced]
|
|
69491
|
+
return nullishCoalesce(cache.local[namespaced], cache[key]);
|
|
69222
69492
|
}
|
|
69223
69493
|
function setItem(key, value) {
|
|
69224
69494
|
var APP_NAME = getAppName();
|
|
@@ -69253,7 +69523,7 @@ function setAppContext() {
|
|
|
69253
69523
|
if (!appAuthName) throw new Error('appAuthName not found');
|
|
69254
69524
|
setSessionItem("".concat(appAuthName, ":miHelpBotContext"), context);
|
|
69255
69525
|
} catch (e) {
|
|
69256
|
-
console.
|
|
69526
|
+
console.error('[iframe-bridge/storage] setAppContext error:', e);
|
|
69257
69527
|
}
|
|
69258
69528
|
}
|
|
69259
69529
|
function clearStorage() {
|
|
@@ -69286,7 +69556,7 @@ var storage$1 = {
|
|
|
69286
69556
|
var appAuthName = appData ? appData.appAuthName : (_window$toolkitEnv6 = window.toolkitEnv) !== null && _window$toolkitEnv6 !== void 0 && _window$toolkitEnv6.APP_AUTH_NAME ? window.toolkitEnv.APP_AUTH_NAME : process.env.APP_AUTH_NAME;
|
|
69287
69557
|
return appAuthName ? getSessionItem("".concat(appAuthName, ":miHelpBotContext")) : {};
|
|
69288
69558
|
} catch (e) {
|
|
69289
|
-
console.
|
|
69559
|
+
console.error('[iframe-bridge/storage] appContext getter error:', e);
|
|
69290
69560
|
return '';
|
|
69291
69561
|
}
|
|
69292
69562
|
},
|
|
@@ -69496,15 +69766,6 @@ function request(config) {
|
|
|
69496
69766
|
timeout = finalConfig.timeout,
|
|
69497
69767
|
withCredentials = finalConfig.withCredentials,
|
|
69498
69768
|
signal = finalConfig.signal;
|
|
69499
|
-
if (responseType || timeout != null || withCredentials != null || signal) {
|
|
69500
|
-
console.log('[iframe-bridge/fetcher] request with extended options', {
|
|
69501
|
-
url: url,
|
|
69502
|
-
responseType: responseType,
|
|
69503
|
-
timeout: timeout,
|
|
69504
|
-
withCredentials: withCredentials,
|
|
69505
|
-
hasSignal: Boolean(signal)
|
|
69506
|
-
});
|
|
69507
|
-
}
|
|
69508
69769
|
return sendFetchRequest({
|
|
69509
69770
|
method: (method || 'get').toLowerCase(),
|
|
69510
69771
|
url: url,
|
|
@@ -69517,13 +69778,6 @@ function request(config) {
|
|
|
69517
69778
|
signal: signal
|
|
69518
69779
|
});
|
|
69519
69780
|
}).then(function (result) {
|
|
69520
|
-
if (result.data instanceof ArrayBuffer) {
|
|
69521
|
-
console.log('[iframe-bridge/fetcher] binary response received', {
|
|
69522
|
-
url: config.url,
|
|
69523
|
-
byteLength: result.data.byteLength,
|
|
69524
|
-
type: 'ArrayBuffer'
|
|
69525
|
-
});
|
|
69526
|
-
}
|
|
69527
69781
|
return applyResponseInterceptors({
|
|
69528
69782
|
data: result.data,
|
|
69529
69783
|
status: result.status,
|
|
@@ -69687,14 +69941,10 @@ Object.assign(fetcher, {
|
|
|
69687
69941
|
return _regenerator().w(function (_context3) {
|
|
69688
69942
|
while (1) switch (_context3.p = _context3.n) {
|
|
69689
69943
|
case 0:
|
|
69690
|
-
|
|
69691
|
-
appName: appName,
|
|
69692
|
-
useAppScopes: useAppScopes
|
|
69693
|
-
});
|
|
69694
|
-
_context3.p = 1;
|
|
69944
|
+
_context3.p = 0;
|
|
69695
69945
|
permissions = [];
|
|
69696
69946
|
if (!useAppScopes) {
|
|
69697
|
-
_context3.n =
|
|
69947
|
+
_context3.n = 1;
|
|
69698
69948
|
break;
|
|
69699
69949
|
}
|
|
69700
69950
|
userAppScopes = Array.isArray(storage$1.userAppScopes) ? storage$1.userAppScopes : [];
|
|
@@ -69702,10 +69952,6 @@ Object.assign(fetcher, {
|
|
|
69702
69952
|
appEntry = Array.isArray(allAppScopesAndFunctions) ? allAppScopesAndFunctions.find(function (s) {
|
|
69703
69953
|
return s.appName === appName;
|
|
69704
69954
|
}) : null;
|
|
69705
|
-
console.log('[iframe-bridge/fetcher] getPermissions (useAppScopes)', {
|
|
69706
|
-
appEntryFound: Boolean(appEntry),
|
|
69707
|
-
userAppScopesCount: userAppScopes.length
|
|
69708
|
-
});
|
|
69709
69955
|
if (appEntry) {
|
|
69710
69956
|
appFunctionsMap = {};
|
|
69711
69957
|
(_appEntry$scopes = appEntry.scopes) === null || _appEntry$scopes === void 0 ? void 0 : _appEntry$scopes.forEach(function (scope) {
|
|
@@ -69727,25 +69973,21 @@ Object.assign(fetcher, {
|
|
|
69727
69973
|
});
|
|
69728
69974
|
permissions = Object.values(appFunctionsMap);
|
|
69729
69975
|
}
|
|
69730
|
-
_context3.n =
|
|
69976
|
+
_context3.n = 3;
|
|
69731
69977
|
break;
|
|
69732
|
-
case
|
|
69978
|
+
case 1:
|
|
69733
69979
|
config = storage$1.getLocalItem('opsportal-core:config') || storage$1.getLocalItem('config');
|
|
69734
69980
|
endpoint = config === null || config === void 0 ? void 0 : (_config$endpoints = config.endpoints) === null || _config$endpoints === void 0 ? void 0 : _config$endpoints.g2AppPermissions;
|
|
69735
69981
|
url = endpoint ? "".concat(endpoint).concat(appName) : "/api/permissions/".concat(appName);
|
|
69736
69982
|
country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
69737
|
-
|
|
69738
|
-
url: url,
|
|
69739
|
-
country: country
|
|
69740
|
-
});
|
|
69741
|
-
_context3.n = 3;
|
|
69983
|
+
_context3.n = 2;
|
|
69742
69984
|
return fetcher.get(url, {
|
|
69743
69985
|
headers: {
|
|
69744
69986
|
country: country,
|
|
69745
69987
|
source: 'OPS_PORTAL'
|
|
69746
69988
|
}
|
|
69747
69989
|
});
|
|
69748
|
-
case
|
|
69990
|
+
case 2:
|
|
69749
69991
|
response = _context3.v;
|
|
69750
69992
|
appDetails = (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$applic = _response$data.applications) === null || _response$data$applic === void 0 ? void 0 : _response$data$applic.find(function (app) {
|
|
69751
69993
|
return app.name === appName;
|
|
@@ -69753,15 +69995,11 @@ Object.assign(fetcher, {
|
|
|
69753
69995
|
if (appDetails) {
|
|
69754
69996
|
permissions = appDetails.applicationFunctions;
|
|
69755
69997
|
}
|
|
69756
|
-
case
|
|
69757
|
-
console.log('[iframe-bridge/fetcher] getPermissions stored', {
|
|
69758
|
-
appName: appName,
|
|
69759
|
-
count: permissions.length
|
|
69760
|
-
});
|
|
69998
|
+
case 3:
|
|
69761
69999
|
storage$1.setLocalItem("".concat(appName, ":permissions"), permissions);
|
|
69762
70000
|
return _context3.a(2, permissions);
|
|
69763
|
-
case
|
|
69764
|
-
_context3.p =
|
|
70001
|
+
case 4:
|
|
70002
|
+
_context3.p = 4;
|
|
69765
70003
|
_t = _context3.v;
|
|
69766
70004
|
console.warn('[iframe-bridge/fetcher] getPermissions failed', {
|
|
69767
70005
|
appName: appName,
|
|
@@ -69769,7 +70007,7 @@ Object.assign(fetcher, {
|
|
|
69769
70007
|
});
|
|
69770
70008
|
return _context3.a(2, []);
|
|
69771
70009
|
}
|
|
69772
|
-
}, _callee3, null, [[
|
|
70010
|
+
}, _callee3, null, [[0, 4]]);
|
|
69773
70011
|
}));
|
|
69774
70012
|
function getPermissions(_x2, _x3) {
|
|
69775
70013
|
return _getPermissions.apply(this, arguments);
|
|
@@ -70191,7 +70429,7 @@ function CrumbProvider(_ref) {
|
|
|
70191
70429
|
React.useEffect(function () {
|
|
70192
70430
|
var remove = addMessageListener(function (data) {
|
|
70193
70431
|
var _data$eventProps;
|
|
70194
|
-
if (data.eventType ===
|
|
70432
|
+
if (data.eventType === IFRAME_EVENTS.CRUMB_CLICKED && ((_data$eventProps = data.eventProps) === null || _data$eventProps === void 0 ? void 0 : _data$eventProps.path) != null && navigateRef) {
|
|
70195
70433
|
navigateRef(data.eventProps.path);
|
|
70196
70434
|
}
|
|
70197
70435
|
});
|
|
@@ -70298,6 +70536,283 @@ function Crumb(_ref) {
|
|
|
70298
70536
|
return null;
|
|
70299
70537
|
}
|
|
70300
70538
|
|
|
70539
|
+
/**
|
|
70540
|
+
* Shared navigation classifier for embedded apps.
|
|
70541
|
+
*
|
|
70542
|
+
* Both AppLink (the opt-in component) and the global navigation guard (the
|
|
70543
|
+
* catch-all for raw <a>/window.open/forms) use this so they agree on what is
|
|
70544
|
+
* "internal" (a shell route), "external" (a foreign site), or something we
|
|
70545
|
+
* should leave to the browser.
|
|
70546
|
+
*/
|
|
70547
|
+
|
|
70548
|
+
// Schemes that are not frame navigations we manage — let the browser handle.
|
|
70549
|
+
var SPECIAL_SCHEME = /^(mailto:|tel:|sms:|callto:|blob:|data:|javascript:|about:)/i;
|
|
70550
|
+
|
|
70551
|
+
/**
|
|
70552
|
+
* @param {string} href
|
|
70553
|
+
* @returns {{kind:'internal'|'external'|'special'|'hash'|'ignore', shellPath?:string, absolute?:string, unresolved?:boolean}}
|
|
70554
|
+
* - internal: same origin as the shell → should be driven through the shell router
|
|
70555
|
+
* - external: a different origin → must open in a new tab, never in-frame
|
|
70556
|
+
* - special/hash/ignore: leave to native browser behavior
|
|
70557
|
+
*/
|
|
70558
|
+
function classifyHref(href) {
|
|
70559
|
+
if (href == null || href === '' || typeof href !== 'string') return {
|
|
70560
|
+
kind: 'ignore'
|
|
70561
|
+
};
|
|
70562
|
+
if (SPECIAL_SCHEME.test(href)) return {
|
|
70563
|
+
kind: 'special'
|
|
70564
|
+
};
|
|
70565
|
+
if (href.startsWith('#')) return {
|
|
70566
|
+
kind: 'hash'
|
|
70567
|
+
};
|
|
70568
|
+
var shellOrigin = getShellOrigin();
|
|
70569
|
+
var appOrigin = typeof window !== 'undefined' ? window.location.origin : undefined;
|
|
70570
|
+
var base = shellOrigin || appOrigin;
|
|
70571
|
+
var parsed;
|
|
70572
|
+
try {
|
|
70573
|
+
parsed = new URL(href, base);
|
|
70574
|
+
} catch (_) {
|
|
70575
|
+
return {
|
|
70576
|
+
kind: 'ignore'
|
|
70577
|
+
};
|
|
70578
|
+
}
|
|
70579
|
+
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
|
70580
|
+
return {
|
|
70581
|
+
kind: 'special'
|
|
70582
|
+
};
|
|
70583
|
+
}
|
|
70584
|
+
var shellPath = "".concat(parsed.pathname).concat(parsed.search).concat(parsed.hash);
|
|
70585
|
+
if (shellOrigin) {
|
|
70586
|
+
return parsed.origin === shellOrigin ? {
|
|
70587
|
+
kind: 'internal',
|
|
70588
|
+
shellPath: shellPath,
|
|
70589
|
+
absolute: shellOrigin + shellPath
|
|
70590
|
+
} : {
|
|
70591
|
+
kind: 'external',
|
|
70592
|
+
absolute: parsed.href
|
|
70593
|
+
};
|
|
70594
|
+
}
|
|
70595
|
+
|
|
70596
|
+
// Handshake not complete yet (shell origin unknown). Best effort: a URL on the
|
|
70597
|
+
// app's own origin (which is what a relative path resolves to) is treated as
|
|
70598
|
+
// internal-but-unresolved; the shell path is still correct to route.
|
|
70599
|
+
if (appOrigin && parsed.origin === appOrigin) {
|
|
70600
|
+
return {
|
|
70601
|
+
kind: 'internal',
|
|
70602
|
+
shellPath: shellPath,
|
|
70603
|
+
absolute: parsed.origin + shellPath,
|
|
70604
|
+
unresolved: true
|
|
70605
|
+
};
|
|
70606
|
+
}
|
|
70607
|
+
return {
|
|
70608
|
+
kind: 'external',
|
|
70609
|
+
absolute: parsed.href
|
|
70610
|
+
};
|
|
70611
|
+
}
|
|
70612
|
+
function isModifiedClick(event) {
|
|
70613
|
+
return event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
|
|
70614
|
+
}
|
|
70615
|
+
|
|
70616
|
+
var _excluded = ["href", "target", "rel", "children", "onClick"];
|
|
70617
|
+
|
|
70618
|
+
/**
|
|
70619
|
+
* AppLink — a drop-in replacement for a plain <a> inside an iframed app.
|
|
70620
|
+
*
|
|
70621
|
+
* Why it exists: an app is rendered inside the shell's iframe. A normal
|
|
70622
|
+
* <a href="..."> click navigates the *iframe itself*, which is wrong in two ways:
|
|
70623
|
+
* 1. Internal/shell links → the iframe full-reloads (and can even render the
|
|
70624
|
+
* shell nested inside the iframe — "shell-in-shell") and the shell URL bar
|
|
70625
|
+
* desyncs, breaking deep-linking and Back.
|
|
70626
|
+
* 2. External links → an arbitrary (possibly malicious) site gets framed
|
|
70627
|
+
* inside our portal chrome.
|
|
70628
|
+
*
|
|
70629
|
+
* AppLink is the opt-in "authored correctly" path; for raw <a>/window.open the
|
|
70630
|
+
* app did NOT convert, installNavigationGuard() is the global catch-all. Both
|
|
70631
|
+
* share classifyHref() so they behave identically.
|
|
70632
|
+
*
|
|
70633
|
+
* Behavior:
|
|
70634
|
+
* - Relative / same-shell-origin href → shell router navigation (no reload).
|
|
70635
|
+
* target="_blank" opens the absolute shell URL in a new tab.
|
|
70636
|
+
* - External href → target defaults to "_blank" + rel="noopener noreferrer".
|
|
70637
|
+
* - mailto:/tel:/hash/etc. and modified/middle clicks → native behavior.
|
|
70638
|
+
*
|
|
70639
|
+
* All other anchor props (className, style, aria-*, onClick, …) are forwarded.
|
|
70640
|
+
*/
|
|
70641
|
+
function AppLink(_ref) {
|
|
70642
|
+
var href = _ref.href,
|
|
70643
|
+
target = _ref.target,
|
|
70644
|
+
rel = _ref.rel,
|
|
70645
|
+
children = _ref.children,
|
|
70646
|
+
onClick = _ref.onClick,
|
|
70647
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
70648
|
+
var result = classifyHref(href);
|
|
70649
|
+
var isInternal = result.kind === 'internal';
|
|
70650
|
+
var isExternal = result.kind === 'external';
|
|
70651
|
+
var shellOrigin = getShellOrigin();
|
|
70652
|
+
var handleClick = function handleClick(event) {
|
|
70653
|
+
if (onClick) onClick(event);
|
|
70654
|
+
if (event.defaultPrevented) return;
|
|
70655
|
+
if (event.button !== 0) return;
|
|
70656
|
+
if (isModifiedClick(event)) return;
|
|
70657
|
+
if (isInternal) {
|
|
70658
|
+
event.preventDefault();
|
|
70659
|
+
if (target === '_blank') {
|
|
70660
|
+
window.open(result.absolute, '_blank', 'noopener,noreferrer');
|
|
70661
|
+
} else {
|
|
70662
|
+
postUpdateUri(result.shellPath, true);
|
|
70663
|
+
}
|
|
70664
|
+
return;
|
|
70665
|
+
}
|
|
70666
|
+
// External: let the resolved target/rel below force a new tab (never in-frame).
|
|
70667
|
+
};
|
|
70668
|
+
var resolvedTarget = isExternal ? target || '_blank' : target;
|
|
70669
|
+
var resolvedRel = resolvedTarget === '_blank' ? rel || 'noopener noreferrer' : rel;
|
|
70670
|
+
|
|
70671
|
+
// href shown on the anchor: absolute shell URL for internal (so hover/copy/
|
|
70672
|
+
// open-in-new-tab work), original href otherwise.
|
|
70673
|
+
var anchorHref = isInternal && shellOrigin ? result.absolute : href;
|
|
70674
|
+
return /*#__PURE__*/React__default["default"].createElement("a", _extends$1({
|
|
70675
|
+
href: anchorHref,
|
|
70676
|
+
target: resolvedTarget,
|
|
70677
|
+
rel: resolvedRel,
|
|
70678
|
+
onClick: handleClick
|
|
70679
|
+
}, rest), children);
|
|
70680
|
+
}
|
|
70681
|
+
|
|
70682
|
+
/**
|
|
70683
|
+
* installNavigationGuard — a global, app-agnostic catch-all that keeps an
|
|
70684
|
+
* embedded app's frame from navigating itself to the wrong place, regardless of
|
|
70685
|
+
* how the app wrote the navigation. AppLink is the opt-in, "authored correctly"
|
|
70686
|
+
* path; this guard covers the code the app did NOT write with AppLink:
|
|
70687
|
+
*
|
|
70688
|
+
* 1. Raw <a href> clicks (any anchor, added anytime) — capture-phase listener.
|
|
70689
|
+
* 2. window.open(url, '_self'/'_top'/'_parent') — wrapped.
|
|
70690
|
+
* 3. <form> submits with a navigating action — capture-phase submit listener.
|
|
70691
|
+
*
|
|
70692
|
+
* Policy (shared with AppLink via classifyHref):
|
|
70693
|
+
* - internal (same origin as shell) → drive the shell router (postUpdateUri),
|
|
70694
|
+
* no iframe reload, shell URL stays in sync. New-tab intents open the
|
|
70695
|
+
* absolute shell URL.
|
|
70696
|
+
* - external (foreign origin) → open in a new tab (noopener), never in-frame.
|
|
70697
|
+
* - special/hash → left to the browser.
|
|
70698
|
+
*
|
|
70699
|
+
* Call once, after bootstrap. Idempotent. Returns an uninstall function.
|
|
70700
|
+
*
|
|
70701
|
+
* NOTE: this is defense-in-depth, not a security boundary. See LIMITATIONS at
|
|
70702
|
+
* the bottom for the vectors it cannot cover (location.assign, meta-refresh,
|
|
70703
|
+
* server redirects), which must be handled by CSP + the shell heartbeat.
|
|
70704
|
+
*/
|
|
70705
|
+
|
|
70706
|
+
var installed = false;
|
|
70707
|
+
function installNavigationGuard() {
|
|
70708
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
70709
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') return function () {};
|
|
70710
|
+
if (installed) return function () {};
|
|
70711
|
+
installed = true;
|
|
70712
|
+
var onBlockedNavigation = options.onBlockedNavigation;
|
|
70713
|
+
var routeInternal = function routeInternal(shellPath, newTab) {
|
|
70714
|
+
if (newTab) {
|
|
70715
|
+
var shellOrigin = getShellOrigin();
|
|
70716
|
+
window.open((shellOrigin || '') + shellPath, '_blank', 'noopener,noreferrer');
|
|
70717
|
+
} else {
|
|
70718
|
+
postUpdateUri(shellPath, true);
|
|
70719
|
+
}
|
|
70720
|
+
if (onBlockedNavigation) onBlockedNavigation({
|
|
70721
|
+
type: 'internal',
|
|
70722
|
+
shellPath: shellPath,
|
|
70723
|
+
newTab: newTab
|
|
70724
|
+
});
|
|
70725
|
+
};
|
|
70726
|
+
var openExternal = function openExternal(absolute) {
|
|
70727
|
+
window.open(absolute, '_blank', 'noopener,noreferrer');
|
|
70728
|
+
if (onBlockedNavigation) onBlockedNavigation({
|
|
70729
|
+
type: 'external',
|
|
70730
|
+
absolute: absolute
|
|
70731
|
+
});
|
|
70732
|
+
};
|
|
70733
|
+
|
|
70734
|
+
// --- 1. Anchor clicks -----------------------------------------------------
|
|
70735
|
+
var onClick = function onClick(event) {
|
|
70736
|
+
if (event.defaultPrevented || event.button !== 0) return;
|
|
70737
|
+
var anchor = event.target && event.target.closest && event.target.closest('a[href]');
|
|
70738
|
+
if (!anchor) return;
|
|
70739
|
+
// Respect an explicit new-tab/native target the browser will handle safely.
|
|
70740
|
+
var target = anchor.getAttribute('target');
|
|
70741
|
+
var href = anchor.getAttribute('href');
|
|
70742
|
+
var result = classifyHref(href);
|
|
70743
|
+
if (result.kind === 'special' || result.kind === 'hash' || result.kind === 'ignore') return;
|
|
70744
|
+
|
|
70745
|
+
// Modifier / middle click on an internal link: let the browser open the real
|
|
70746
|
+
// URL (anchor href is already absolute-to-app; harmless). For external it's
|
|
70747
|
+
// fine too. We only take over the *plain* click.
|
|
70748
|
+
if (isModifiedClick(event)) return;
|
|
70749
|
+
if (result.kind === 'internal') {
|
|
70750
|
+
event.preventDefault();
|
|
70751
|
+
routeInternal(result.shellPath, target === '_blank');
|
|
70752
|
+
return;
|
|
70753
|
+
}
|
|
70754
|
+
if (result.kind === 'external') {
|
|
70755
|
+
// Force new tab even if the app omitted target — never load foreign in-frame.
|
|
70756
|
+
event.preventDefault();
|
|
70757
|
+
openExternal(result.absolute);
|
|
70758
|
+
}
|
|
70759
|
+
};
|
|
70760
|
+
document.addEventListener('click', onClick, true);
|
|
70761
|
+
|
|
70762
|
+
// --- 2. window.open('_self'/'_top'/'_parent') -----------------------------
|
|
70763
|
+
var nativeOpen = window.open;
|
|
70764
|
+
var wrappedOpen = function wrappedOpen(url, name, features) {
|
|
70765
|
+
// Named/new-window targets are real popups — allow natively.
|
|
70766
|
+
var selfNav = name === '_self' || name === '_top' || name === '_parent';
|
|
70767
|
+
if (url != null && selfNav) {
|
|
70768
|
+
var result = classifyHref(String(url));
|
|
70769
|
+
if (result.kind === 'internal') {
|
|
70770
|
+
routeInternal(result.shellPath, false);
|
|
70771
|
+
return null;
|
|
70772
|
+
}
|
|
70773
|
+
if (result.kind === 'external') {
|
|
70774
|
+
return nativeOpen.call(window, result.absolute, '_blank', 'noopener,noreferrer');
|
|
70775
|
+
}
|
|
70776
|
+
}
|
|
70777
|
+
return nativeOpen.call(window, url, name, features);
|
|
70778
|
+
};
|
|
70779
|
+
try {
|
|
70780
|
+
window.open = wrappedOpen;
|
|
70781
|
+
} catch (_) {/* some environments freeze window.open */}
|
|
70782
|
+
|
|
70783
|
+
// --- 3. Form submits ------------------------------------------------------
|
|
70784
|
+
var onSubmit = function onSubmit(event) {
|
|
70785
|
+
if (event.defaultPrevented) return;
|
|
70786
|
+
var form = event.target;
|
|
70787
|
+
if (!form || form.tagName !== 'FORM') return;
|
|
70788
|
+
var action = form.getAttribute('action');
|
|
70789
|
+
// No action → submits to current URL (in-app); let it be. GET/POST both
|
|
70790
|
+
// cause a frame navigation though, so classify the action when present.
|
|
70791
|
+
if (!action) return;
|
|
70792
|
+
var result = classifyHref(action);
|
|
70793
|
+
if (result.kind === 'external') {
|
|
70794
|
+
// Never let a form post navigate the frame to a foreign origin.
|
|
70795
|
+
event.preventDefault();
|
|
70796
|
+
if (onBlockedNavigation) onBlockedNavigation({
|
|
70797
|
+
type: 'external-form-blocked',
|
|
70798
|
+
action: result.absolute
|
|
70799
|
+
});
|
|
70800
|
+
// Intentionally do NOT auto-resubmit externally — a cross-origin form POST
|
|
70801
|
+
// to a new tab is not generally safe/possible. Surface via callback.
|
|
70802
|
+
}
|
|
70803
|
+
// internal form navigation is left to the app's own router/handling.
|
|
70804
|
+
};
|
|
70805
|
+
document.addEventListener('submit', onSubmit, true);
|
|
70806
|
+
return function uninstall() {
|
|
70807
|
+
document.removeEventListener('click', onClick, true);
|
|
70808
|
+
document.removeEventListener('submit', onSubmit, true);
|
|
70809
|
+
try {
|
|
70810
|
+
window.open = nativeOpen;
|
|
70811
|
+
} catch (_) {}
|
|
70812
|
+
installed = false;
|
|
70813
|
+
};
|
|
70814
|
+
}
|
|
70815
|
+
|
|
70301
70816
|
var iframeFacade = {
|
|
70302
70817
|
AppFrame: AppFrame,
|
|
70303
70818
|
CallLogger: CallLogger,
|
|
@@ -70309,6 +70824,8 @@ var iframeFacade = {
|
|
|
70309
70824
|
Crumb: Crumb,
|
|
70310
70825
|
CrumbProvider: CrumbProvider,
|
|
70311
70826
|
useCrumbContext: useCrumbContext,
|
|
70827
|
+
AppLink: AppLink,
|
|
70828
|
+
installNavigationGuard: installNavigationGuard,
|
|
70312
70829
|
bridge: {
|
|
70313
70830
|
postUpdateUri: postUpdateUri,
|
|
70314
70831
|
postUpdateCrumbs: postUpdateCrumbs,
|
|
@@ -70326,6 +70843,7 @@ var iframeFacade = {
|
|
|
70326
70843
|
resolveAppAuthName: resolveAppAuthName,
|
|
70327
70844
|
getInitDataForBootstrap: getInitDataForBootstrap,
|
|
70328
70845
|
sendStorageGet: sendStorageGet,
|
|
70846
|
+
getShellOrigin: getShellOrigin,
|
|
70329
70847
|
IFRAME_EVENTS: IFRAME_EVENTS
|
|
70330
70848
|
}
|
|
70331
70849
|
};
|
|
@@ -70340,7 +70858,8 @@ function registerEarlyLoadUriListener() {
|
|
|
70340
70858
|
window.__IFRAME_EARLY_LOAD_URI_LISTENER_REGISTERED = true;
|
|
70341
70859
|
window.__IFRAME_EARLY_LOAD_URI = null;
|
|
70342
70860
|
window.addEventListener('message', function (event) {
|
|
70343
|
-
if (event.
|
|
70861
|
+
if (!isAllowedOrigin(event.origin)) return;
|
|
70862
|
+
if (event.data && event.data.eventType === IFRAME_EVENTS.LOAD_URI && event.data.eventProps) {
|
|
70344
70863
|
window.__IFRAME_EARLY_LOAD_URI = event.data.eventProps.uri || '/';
|
|
70345
70864
|
}
|
|
70346
70865
|
});
|
|
@@ -70399,7 +70918,6 @@ function _hydrateAppConfig() {
|
|
|
70399
70918
|
_context.n = 4;
|
|
70400
70919
|
break;
|
|
70401
70920
|
}
|
|
70402
|
-
console.log('[Iframe] fetching app config from', configFallbackUri);
|
|
70403
70921
|
_context.n = 3;
|
|
70404
70922
|
return fetcher.getConfig(configFallbackUri);
|
|
70405
70923
|
case 3:
|
|
@@ -70493,12 +71011,12 @@ function bootstrapIframeApp(_x3) {
|
|
|
70493
71011
|
}
|
|
70494
71012
|
function _bootstrapIframeApp() {
|
|
70495
71013
|
_bootstrapIframeApp = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee4(options) {
|
|
70496
|
-
var _ref4, _ref4$appName, appName, permissionKeysOption, rootSelector, onInitCache, render, _ref4$standaloneError, standaloneErrorMessage, _ref4$fetchConfigFrom, fetchConfigFromShell, _ref4$configFallbackU, configFallbackUri, validateAppConfig, _ref4$permissionsOnly, permissionsOnlyIfArray, _ref4$autoSendAppEnv, autoSendAppEnv, toolkitEnv, _ref4$mihelpAgentProp, mihelpAgentProps, rootNode, bridge, fetcher, storage, getInitialUri, getInitData, setInitCache, setExtraLocal, sendStorageGet, setAppName, sendAppEnv, resolveAppAuthName, _yield$Promise$all, _yield$Promise$all2, initialUri, initData, getCachedLocalItem, appAuthName, permissionKeys, tasks, _t;
|
|
71014
|
+
var _ref4, _ref4$appName, appName, permissionKeysOption, rootSelector, onInitCache, render, _ref4$standaloneError, standaloneErrorMessage, _ref4$fetchConfigFrom, fetchConfigFromShell, _ref4$configFallbackU, configFallbackUri, validateAppConfig, _ref4$permissionsOnly, permissionsOnlyIfArray, _ref4$autoSendAppEnv, autoSendAppEnv, toolkitEnv, _ref4$mihelpAgentProp, mihelpAgentProps, _ref4$installNavGuard, installNavGuard, rootNode, bridge, fetcher, storage, getInitialUri, getInitData, setInitCache, setExtraLocal, sendStorageGet, setAppName, sendAppEnv, resolveAppAuthName, _yield$Promise$all, _yield$Promise$all2, initialUri, initData, getCachedLocalItem, appAuthName, permissionKeys, tasks, _t;
|
|
70497
71015
|
return _regenerator().w(function (_context4) {
|
|
70498
71016
|
while (1) switch (_context4.p = _context4.n) {
|
|
70499
71017
|
case 0:
|
|
70500
71018
|
registerEarlyLoadUriListener();
|
|
70501
|
-
_ref4 = options || {}, _ref4$appName = _ref4.appName, appName = _ref4$appName === void 0 ? process.env.APP_NAME : _ref4$appName, permissionKeysOption = _ref4.permissionKeys, rootSelector = _ref4.rootSelector, onInitCache = _ref4.onInitCache, render = _ref4.render, _ref4$standaloneError = _ref4.standaloneErrorMessage, standaloneErrorMessage = _ref4$standaloneError === void 0 ? 'This application must be opened from the parent portal.' : _ref4$standaloneError, _ref4$fetchConfigFrom = _ref4.fetchConfigFromShell, fetchConfigFromShell = _ref4$fetchConfigFrom === void 0 ? true : _ref4$fetchConfigFrom, _ref4$configFallbackU = _ref4.configFallbackUri, configFallbackUri = _ref4$configFallbackU === void 0 ? process.env.CONFIG_URI : _ref4$configFallbackU, validateAppConfig = _ref4.validateAppConfig, _ref4$permissionsOnly = _ref4.permissionsOnlyIfArray, permissionsOnlyIfArray = _ref4$permissionsOnly === void 0 ? true : _ref4$permissionsOnly, _ref4$autoSendAppEnv = _ref4.autoSendAppEnv, autoSendAppEnv = _ref4$autoSendAppEnv === void 0 ? true : _ref4$autoSendAppEnv, toolkitEnv = _ref4.toolkitEnv, _ref4$mihelpAgentProp = _ref4.mihelpAgentProps, mihelpAgentProps = _ref4$mihelpAgentProp === void 0 ? null : _ref4$mihelpAgentProp;
|
|
71019
|
+
_ref4 = options || {}, _ref4$appName = _ref4.appName, appName = _ref4$appName === void 0 ? process.env.APP_NAME : _ref4$appName, permissionKeysOption = _ref4.permissionKeys, rootSelector = _ref4.rootSelector, onInitCache = _ref4.onInitCache, render = _ref4.render, _ref4$standaloneError = _ref4.standaloneErrorMessage, standaloneErrorMessage = _ref4$standaloneError === void 0 ? 'This application must be opened from the parent portal.' : _ref4$standaloneError, _ref4$fetchConfigFrom = _ref4.fetchConfigFromShell, fetchConfigFromShell = _ref4$fetchConfigFrom === void 0 ? true : _ref4$fetchConfigFrom, _ref4$configFallbackU = _ref4.configFallbackUri, configFallbackUri = _ref4$configFallbackU === void 0 ? process.env.CONFIG_URI : _ref4$configFallbackU, validateAppConfig = _ref4.validateAppConfig, _ref4$permissionsOnly = _ref4.permissionsOnlyIfArray, permissionsOnlyIfArray = _ref4$permissionsOnly === void 0 ? true : _ref4$permissionsOnly, _ref4$autoSendAppEnv = _ref4.autoSendAppEnv, autoSendAppEnv = _ref4$autoSendAppEnv === void 0 ? true : _ref4$autoSendAppEnv, toolkitEnv = _ref4.toolkitEnv, _ref4$mihelpAgentProp = _ref4.mihelpAgentProps, mihelpAgentProps = _ref4$mihelpAgentProp === void 0 ? null : _ref4$mihelpAgentProp, _ref4$installNavGuard = _ref4.installNavGuard, installNavGuard = _ref4$installNavGuard === void 0 ? true : _ref4$installNavGuard;
|
|
70502
71020
|
if (!(typeof render !== 'function')) {
|
|
70503
71021
|
_context4.n = 1;
|
|
70504
71022
|
break;
|
|
@@ -70520,6 +71038,13 @@ function _bootstrapIframeApp() {
|
|
|
70520
71038
|
renderStandaloneError(rootNode, standaloneErrorMessage);
|
|
70521
71039
|
return _context4.a(2);
|
|
70522
71040
|
case 3:
|
|
71041
|
+
// Global catch-all so raw <a>/window.open('_self')/forms the app did not write
|
|
71042
|
+
// with AppLink still route through the shell (internal) or a new tab (external)
|
|
71043
|
+
// instead of navigating this iframe to the wrong place. Opt out with
|
|
71044
|
+
// installNavGuard: false.
|
|
71045
|
+
if (installNavGuard) {
|
|
71046
|
+
installNavigationGuard();
|
|
71047
|
+
}
|
|
70523
71048
|
bridge = iframeFacade.bridge, fetcher = iframeFacade.fetcher, storage = iframeFacade.storage;
|
|
70524
71049
|
getInitialUri = bridge.getInitialUri, getInitData = bridge.getInitData, setInitCache = bridge.setInitCache, setExtraLocal = bridge.setExtraLocal, sendStorageGet = bridge.sendStorageGet, setAppName = bridge.setAppName, sendAppEnv = bridge.sendAppEnv, resolveAppAuthName = bridge.resolveAppAuthName;
|
|
70525
71050
|
_context4.n = 4;
|
|
@@ -70533,22 +71058,29 @@ function _bootstrapIframeApp() {
|
|
|
70533
71058
|
if (autoSendAppEnv && typeof sendAppEnv === 'function') {
|
|
70534
71059
|
sendAppEnv(toolkitEnv, mihelpAgentProps);
|
|
70535
71060
|
}
|
|
70536
|
-
if (initData) {
|
|
70537
|
-
|
|
70538
|
-
|
|
70539
|
-
} else {
|
|
70540
|
-
console.warn('[Iframe] no initData from shell');
|
|
71061
|
+
if (!initData) {
|
|
71062
|
+
_context4.n = 5;
|
|
71063
|
+
break;
|
|
70541
71064
|
}
|
|
71065
|
+
setInitCache(initData);
|
|
71066
|
+
if (onInitCache) onInitCache(initData);
|
|
71067
|
+
_context4.n = 6;
|
|
71068
|
+
break;
|
|
71069
|
+
case 5:
|
|
71070
|
+
console.error('[Iframe] failed to get initData from shell (handshake timeout)');
|
|
71071
|
+
renderStandaloneError(rootNode, 'Failed to connect to the portal. Please refresh.');
|
|
71072
|
+
return _context4.a(2);
|
|
71073
|
+
case 6:
|
|
70542
71074
|
getCachedLocalItem = function getCachedLocalItem(key) {
|
|
70543
71075
|
return storage.getLocalItem(key);
|
|
70544
71076
|
};
|
|
70545
71077
|
appAuthName = typeof resolveAppAuthName === 'function' ? resolveAppAuthName(appName, getCachedLocalItem) : null;
|
|
70546
71078
|
permissionKeys = permissionKeysOption !== undefined ? permissionKeysOption : appAuthName ? "".concat(appAuthName, ":permissions") : null;
|
|
70547
71079
|
if (!(fetchConfigFromShell && appName)) {
|
|
70548
|
-
_context4.n =
|
|
71080
|
+
_context4.n = 10;
|
|
70549
71081
|
break;
|
|
70550
71082
|
}
|
|
70551
|
-
_context4.p =
|
|
71083
|
+
_context4.p = 7;
|
|
70552
71084
|
tasks = [hydrateAppConfig({
|
|
70553
71085
|
appName: appName,
|
|
70554
71086
|
getCachedLocalItem: getCachedLocalItem,
|
|
@@ -70567,21 +71099,21 @@ function _bootstrapIframeApp() {
|
|
|
70567
71099
|
permissionsOnlyIfArray: permissionsOnlyIfArray
|
|
70568
71100
|
}));
|
|
70569
71101
|
}
|
|
70570
|
-
_context4.n = 6;
|
|
70571
|
-
return Promise.all(tasks);
|
|
70572
|
-
case 6:
|
|
70573
71102
|
_context4.n = 8;
|
|
71103
|
+
return Promise.all(tasks);
|
|
71104
|
+
case 8:
|
|
71105
|
+
_context4.n = 10;
|
|
70574
71106
|
break;
|
|
70575
|
-
case
|
|
70576
|
-
_context4.p =
|
|
71107
|
+
case 9:
|
|
71108
|
+
_context4.p = 9;
|
|
70577
71109
|
_t = _context4.v;
|
|
70578
71110
|
console.warn('[Iframe] failed to fetch app config/permissions from shell:', _t);
|
|
70579
|
-
case
|
|
71111
|
+
case 10:
|
|
70580
71112
|
render(initialUri, rootNode);
|
|
70581
|
-
case
|
|
71113
|
+
case 11:
|
|
70582
71114
|
return _context4.a(2);
|
|
70583
71115
|
}
|
|
70584
|
-
}, _callee4, null, [[
|
|
71116
|
+
}, _callee4, null, [[7, 9]]);
|
|
70585
71117
|
}));
|
|
70586
71118
|
return _bootstrapIframeApp.apply(this, arguments);
|
|
70587
71119
|
}
|
|
@@ -70855,8 +71387,8 @@ function IframeAppShell(_ref) {
|
|
|
70855
71387
|
var appAuthName = resolveAppAuthName(getAppName(), function (key) {
|
|
70856
71388
|
return storage$1.getLocalItem(key);
|
|
70857
71389
|
});
|
|
70858
|
-
var key = permissionKey || (appAuthName ? "".concat(appAuthName, ":permissions") :
|
|
70859
|
-
var ready = Array.isArray(storage$1.getLocalItem(key));
|
|
71390
|
+
var key = permissionKey || (appAuthName ? "".concat(appAuthName, ":permissions") : null);
|
|
71391
|
+
var ready = !key || Array.isArray(storage$1.getLocalItem(key));
|
|
70860
71392
|
React.useEffect(function () {
|
|
70861
71393
|
if (ready && onPermissionsReady) onPermissionsReady();
|
|
70862
71394
|
}, [ready, onPermissionsReady]);
|
|
@@ -82452,6 +82984,7 @@ var index_es = /*#__PURE__*/Object.freeze({
|
|
|
82452
82984
|
});
|
|
82453
82985
|
|
|
82454
82986
|
exports.AppFrame = AppFrame;
|
|
82987
|
+
exports.AppLink = AppLink;
|
|
82455
82988
|
exports.AutoRefresh = AutoRefresh;
|
|
82456
82989
|
exports.CallLogger = CallLogger;
|
|
82457
82990
|
exports.ContextualHelp = ContextualHelp;
|
|
@@ -82463,6 +82996,7 @@ exports.bootstrapIframeApp = bootstrapIframeApp;
|
|
|
82463
82996
|
exports.buildNavCountEntry = buildNavCountEntry;
|
|
82464
82997
|
exports.fetcher = fetcher$1;
|
|
82465
82998
|
exports.iframeFacade = iframeFacade;
|
|
82999
|
+
exports.installNavigationGuard = installNavigationGuard;
|
|
82466
83000
|
exports.normalizeIframePath = normalizeIframePath;
|
|
82467
83001
|
exports.postHistoryGo = postHistoryGo;
|
|
82468
83002
|
exports.storage = storage$2;
|