@copart/ops-tool-kit 1.8.1-alpha.34 → 1.8.1-alpha.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ops-tool-kit.js +52 -36
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -33,7 +33,7 @@ var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
|
33
33
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
34
34
|
|
|
35
35
|
const name$f = "@copart/ops-tool-kit";
|
|
36
|
-
const version$5 = "1.8.1-alpha.
|
|
36
|
+
const version$5 = "1.8.1-alpha.36";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -29079,7 +29079,7 @@ function (_React$Component) {
|
|
|
29079
29079
|
return SettingsView;
|
|
29080
29080
|
}(React__default["default"].Component);
|
|
29081
29081
|
|
|
29082
|
-
var css_248z$6 = ".utilities_ops-announcements_Banner--appBarContentBox {\r\n word-break: break-all;\r\n white-space: pre-wrap;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContent {\r\n padding: 0px 5px;\r\n font-size: 13px;\r\n width: 95%;\r\n display: flex;\r\n align-items: end;\r\n grid-gap: 20px;\r\n gap: 20px\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n width: 90%;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n font-weight: 600;\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n color: #201F1E;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox a{\r\n text-decoration: underline;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 3;\r\n overflow: hidden;\r\n width: 95%;\r\n font-weight: 600;\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n font-size: 12px;\r\n margin-bottom: 5px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox i{\r\n font-size: 16px !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i{\r\n position: relative;\r\n right: -4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer {\r\n display: flex;\r\n flex-direction: row;\r\n padding: 10px 10px;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n min-height: 40px;\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer i{\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer i{\r\n font-size: 16px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\r\n flex-direction: column;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--arrowTipContainer {\r\n width: 0px;\r\n height: 0px;\r\n border-left: 8px solid transparent;\r\n border-right: 8px solid transparent;\r\n border-bottom: 13px solid white;\r\n position: absolute;\r\n top: 51px;\r\n right: 50px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper {\r\n padding: 0px 5px;\r\n font-size: 12px;\r\n flex: 1 1 0%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 4px;\r\n gap: 4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--feedUrl i {\r\n font-size: 14px;\r\n cursor: pointer;\r\n color: #1d5ab9;\r\n left: 2px;\r\n position: relative;\r\n top: 2px;\r\n margin-right: 3px;\r\n}";
|
|
29082
|
+
var css_248z$6 = ".utilities_ops-announcements_Banner--appBarContentBox {\r\n word-break: break-all;\r\n white-space: pre-wrap;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContent {\r\n padding: 0px 5px;\r\n font-size: 13px;\r\n width: 95%;\r\n display: flex;\r\n align-items: end;\r\n grid-gap: 20px;\r\n gap: 20px\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n width: 90%;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationInfoBox b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n font-weight: 600;\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n color: #201F1E;\r\n cursor: default;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationBarContentBox a{\r\n text-decoration: underline;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--tabNotificationBarContentBox {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 3;\r\n overflow: hidden;\r\n width: 95%;\r\n font-weight: 600;\r\n /* autoprefixer: off */\r\n -webkit-box-orient: vertical;\r\n /* autoprefixer: on */\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox {\r\n display: flex;\r\n color: #6c7a89;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n font-size: 12px;\r\n margin-bottom: 5px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationInfoBox i{\r\n font-size: 16px !important;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer .utilities_ops-announcements_Banner--notificationLeftBtn i{\r\n position: relative;\r\n right: -4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer {\r\n display: flex;\r\n flex-direction: row;\r\n padding: 10px 10px;\r\n grid-gap: 5px;\r\n gap: 5px;\r\n min-height: 40px;\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer i{\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--navBtnContainer i{\r\n font-size: 16px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--notificationContainer.utilities_ops-announcements_Banner--tabNotificationBar {\r\n flex-direction: column;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--arrowTipContainer {\r\n width: 0px;\r\n height: 0px;\r\n border-left: 8px solid transparent;\r\n border-right: 8px solid transparent;\r\n border-bottom: 13px solid white;\r\n position: absolute;\r\n top: 51px;\r\n right: 50px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper {\r\n padding: 0px 5px;\r\n font-size: 12px;\r\n flex: 1 1 0%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 4px;\r\n gap: 4px;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--appBarContentWrapper b{\r\n color: #171717;\r\n}\r\n\r\n.utilities_ops-announcements_Banner--feedUrl i {\r\n font-size: 14px;\r\n cursor: pointer;\r\n color: #1d5ab9;\r\n left: 2px;\r\n position: relative;\r\n top: 2px;\r\n margin-right: 3px;\r\n}\r\n";
|
|
29083
29083
|
styleInject(css_248z$6);
|
|
29084
29084
|
|
|
29085
29085
|
var _nodeResolve_empty = {};
|
|
@@ -35414,6 +35414,8 @@ var notificationKeysMapper = {
|
|
|
35414
35414
|
|
|
35415
35415
|
var renameKeys = function renameKeys(keysMap) {
|
|
35416
35416
|
return function (obj) {
|
|
35417
|
+
obj.isFirebase = true;
|
|
35418
|
+
obj.uuid = parseInt(obj.uuid);
|
|
35417
35419
|
return reduce$1(function (acc, key) {
|
|
35418
35420
|
return assoc$1(keysMap[key] || key, obj[key], acc);
|
|
35419
35421
|
}, {}, keys$1(obj));
|
|
@@ -35580,10 +35582,11 @@ var Banner = function Banner(props) {
|
|
|
35580
35582
|
content = notification.content,
|
|
35581
35583
|
sourceApplication = notification.sourceApplication,
|
|
35582
35584
|
categoryDescription = notification.categoryDescription,
|
|
35583
|
-
feedUrl = notification.feedUrl
|
|
35585
|
+
feedUrl = notification.feedUrl,
|
|
35586
|
+
notificationId = notification.notificationId;
|
|
35584
35587
|
var contentBarRef = React__default["default"].useRef(null);
|
|
35585
35588
|
|
|
35586
|
-
var _React$useState = React__default["default"].useState(
|
|
35589
|
+
var _React$useState = React__default["default"].useState(false),
|
|
35587
35590
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35588
35591
|
isContentOverFlow = _React$useState2[0],
|
|
35589
35592
|
setIsContentOverFlow = _React$useState2[1];
|
|
@@ -35597,11 +35600,12 @@ var Banner = function Banner(props) {
|
|
|
35597
35600
|
width = _useWindowSize.width;
|
|
35598
35601
|
|
|
35599
35602
|
React__default["default"].useEffect(function () {
|
|
35603
|
+
setIsContentOverFlow(false);
|
|
35600
35604
|
setExpanded(false);
|
|
35601
35605
|
setTimeout(function () {
|
|
35602
35606
|
contentBarRef.current && setIsContentOverFlow(contentBarRef.current.offsetHeight < contentBarRef.current.scrollHeight);
|
|
35603
35607
|
}, 30);
|
|
35604
|
-
}, [current]);
|
|
35608
|
+
}, [current, notificationId]);
|
|
35605
35609
|
var startTime = timeZoneType === "Recipient TimeZone" || timeZoneType === "RPTZ" ? startsAt : moment.utc(startsAt).local().format("YYYY-MM-DD HH:mm:ss");
|
|
35606
35610
|
var timeDiff = getTimeDiff(startTime);
|
|
35607
35611
|
|
|
@@ -35639,6 +35643,9 @@ var Banner = function Banner(props) {
|
|
|
35639
35643
|
WebkitLineClamp: 'unset'
|
|
35640
35644
|
})
|
|
35641
35645
|
}, React__default["default"].createElement("span", {
|
|
35646
|
+
onClick: function onClick() {
|
|
35647
|
+
return setExpanded(!expanded);
|
|
35648
|
+
},
|
|
35642
35649
|
dangerouslySetInnerHTML: {
|
|
35643
35650
|
__html: SanitizeNotificationContent(content)
|
|
35644
35651
|
}
|
|
@@ -35649,14 +35656,10 @@ var Banner = function Banner(props) {
|
|
|
35649
35656
|
}, React__default["default"].createElement(coreComponents.Icon, {
|
|
35650
35657
|
name: "open_in_new",
|
|
35651
35658
|
variant: "material"
|
|
35652
|
-
})))), action && ActionComponent && React__default["default"].createElement(
|
|
35653
|
-
style: {
|
|
35654
|
-
minWidth: '20%'
|
|
35655
|
-
}
|
|
35656
|
-
}, React__default["default"].createElement(ActionComponent, {
|
|
35659
|
+
})))), action && ActionComponent && React__default["default"].createElement(ActionComponent, {
|
|
35657
35660
|
notification: notification,
|
|
35658
35661
|
saveActionComponentState: saveActionComponentState
|
|
35659
|
-
}))
|
|
35662
|
+
})), isContentOverFlow && React__default["default"].createElement("div", {
|
|
35660
35663
|
style: {
|
|
35661
35664
|
cursor: 'pointer'
|
|
35662
35665
|
},
|
|
@@ -39943,6 +39946,7 @@ var getFirebaseConfig = function getFirebaseConfig() {
|
|
|
39943
39946
|
function attachHandlers(firebase, updateNotifications, updateAllFirebaseNotificationsList) {
|
|
39944
39947
|
var today = getTodayDate();
|
|
39945
39948
|
firebase.database().ref().child('ops-news').orderByChild('ends_at').startAt(today).on('value', function (snapshot) {
|
|
39949
|
+
console.log("@@@snapshot.val()=", snapshot.val());
|
|
39946
39950
|
compose(updateNotifications, filterNotificationsFireBase, mapNotifications, values$1)(snapshot.val());
|
|
39947
39951
|
compose(updateAllFirebaseNotificationsList, mapNotifications, values$1)(snapshot.val());
|
|
39948
39952
|
});
|
|
@@ -39952,12 +39956,9 @@ var getFireBaseNotifications = function getFireBaseNotifications(updateNotificat
|
|
|
39952
39956
|
var firebaseConfig = getFirebaseConfig(); // connect(firebaseConfig)
|
|
39953
39957
|
|
|
39954
39958
|
var firebase;
|
|
39955
|
-
console.log("***before firebase import");
|
|
39956
39959
|
Promise.resolve().then(function () { return index_esm$1; }).then(function (module) {
|
|
39957
|
-
console.log("***after firebase app import");
|
|
39958
39960
|
firebase = module.default;
|
|
39959
39961
|
Promise.resolve().then(function () { return index_esm; }).then(function (module) {
|
|
39960
|
-
console.log("***after firebase DB import");
|
|
39961
39962
|
firebase.initializeApp(firebaseConfig);
|
|
39962
39963
|
attachHandlers(firebase, updateNotifications, updateAllFirebaseNotificationsList);
|
|
39963
39964
|
});
|
|
@@ -40245,37 +40246,35 @@ var AppBar = function AppBar(_ref) {
|
|
|
40245
40246
|
});
|
|
40246
40247
|
};
|
|
40247
40248
|
|
|
40248
|
-
var
|
|
40249
|
+
var filterOut = function filterOut(notifications, notificationToRemove) {
|
|
40250
|
+
var currentNotifications = clone$1(notifications);
|
|
40251
|
+
var filteredNotifications = currentNotifications.filter(function (notification) {
|
|
40252
|
+
return notification.notificationId !== notificationToRemove.notificationId;
|
|
40253
|
+
});
|
|
40254
|
+
return filteredNotifications;
|
|
40255
|
+
};
|
|
40256
|
+
|
|
40257
|
+
var removeNotification = function removeNotification(notificationToRemove) {
|
|
40249
40258
|
setNotifications(function (notifications) {
|
|
40250
|
-
|
|
40251
|
-
var filteredNotifications = currentNotifications.filter(function (notification) {
|
|
40252
|
-
return notification.notificationId !== newNotification.notificationId;
|
|
40253
|
-
});
|
|
40254
|
-
return filteredNotifications;
|
|
40259
|
+
return filterOut(notifications, notificationToRemove);
|
|
40255
40260
|
});
|
|
40256
40261
|
setListOfAllNotifications(function (notifications) {
|
|
40257
|
-
|
|
40258
|
-
|
|
40259
|
-
|
|
40260
|
-
|
|
40261
|
-
return filteredNotifications;
|
|
40262
|
+
return filterOut(notifications, notificationToRemove);
|
|
40263
|
+
});
|
|
40264
|
+
setListOfAllFirebaseNotifications(function (notifications) {
|
|
40265
|
+
return filterOut(notifications, notificationToRemove);
|
|
40262
40266
|
});
|
|
40263
40267
|
};
|
|
40264
40268
|
|
|
40265
40269
|
var updateAllNotificationsList = function updateAllNotificationsList(newNotifications, isSolr) {
|
|
40266
|
-
console.log("$$$isSolr=", isSolr);
|
|
40267
|
-
|
|
40268
40270
|
if (isSolr) {
|
|
40269
|
-
console.log("$$$ in solr notif");
|
|
40270
40271
|
setListOfAllNotifications(function (notifications) {
|
|
40271
40272
|
return filterDuplicateAndSave(notifications, newNotifications);
|
|
40272
40273
|
});
|
|
40273
40274
|
return;
|
|
40274
40275
|
}
|
|
40275
40276
|
|
|
40276
|
-
console.log("$$$newNotifications=", newNotifications);
|
|
40277
40277
|
var check = filterNotifications(newNotifications);
|
|
40278
|
-
console.log("$$$check=", check);
|
|
40279
40278
|
|
|
40280
40279
|
var newNotification = _objectSpread2({}, newNotifications[0]);
|
|
40281
40280
|
|
|
@@ -40284,13 +40283,11 @@ var AppBar = function AppBar(_ref) {
|
|
|
40284
40283
|
var currentDate = new Date();
|
|
40285
40284
|
|
|
40286
40285
|
if (!check.length) {
|
|
40287
|
-
console.log("$$$ in if 1");
|
|
40288
40286
|
removeNotification(newNotification);
|
|
40289
40287
|
} // test for delete, update, new & future notification..
|
|
40290
40288
|
|
|
40291
40289
|
|
|
40292
40290
|
if (new Date(startTime) > currentDate && (newNotification === null || newNotification === void 0 ? void 0 : newNotification.status) === 'A') {
|
|
40293
|
-
console.log("$$$ in if 2");
|
|
40294
40291
|
setListOfAllNotifications(function (notifications) {
|
|
40295
40292
|
return filterDuplicateAndSave(notifications, newNotifications);
|
|
40296
40293
|
});
|
|
@@ -40298,9 +40295,26 @@ var AppBar = function AppBar(_ref) {
|
|
|
40298
40295
|
};
|
|
40299
40296
|
|
|
40300
40297
|
var updateAllFirebaseNotificationsList = function updateAllFirebaseNotificationsList(newNotifications) {
|
|
40301
|
-
|
|
40302
|
-
|
|
40303
|
-
|
|
40298
|
+
var check = filterNotificationsFireBase(newNotifications);
|
|
40299
|
+
|
|
40300
|
+
if (check.length !== newNotifications.length) {
|
|
40301
|
+
var filteredOutNotifications = newNotifications.filter(function (n) {
|
|
40302
|
+
return !check.some(function (x) {
|
|
40303
|
+
return x.id === n.id;
|
|
40304
|
+
});
|
|
40305
|
+
});
|
|
40306
|
+
filteredOutNotifications.forEach(function (notification) {
|
|
40307
|
+
removeNotification(notification);
|
|
40308
|
+
var startTime = moment.utc(notification.startsAt).local().format("YYYY-MM-DD HH:mm:ss");
|
|
40309
|
+
var currentDate = new Date();
|
|
40310
|
+
|
|
40311
|
+
if (new Date(startTime) > currentDate) {
|
|
40312
|
+
setListOfAllFirebaseNotifications(function (notifications) {
|
|
40313
|
+
return filterDuplicateAndSave(notifications, newNotifications);
|
|
40314
|
+
});
|
|
40315
|
+
}
|
|
40316
|
+
});
|
|
40317
|
+
}
|
|
40304
40318
|
};
|
|
40305
40319
|
|
|
40306
40320
|
var filterDuplicateAndSave = function filterDuplicateAndSave(notifications, newNotifications) {
|
|
@@ -40311,7 +40325,9 @@ var AppBar = function AppBar(_ref) {
|
|
|
40311
40325
|
var filteredNotifications = notifications.filter(function (notification) {
|
|
40312
40326
|
var _notification$action, _notification$action$;
|
|
40313
40327
|
|
|
40314
|
-
if (notification === null || notification === void 0 ? void 0 : (_notification$action = notification.action) === null || _notification$action === void 0 ? void 0 : (_notification$action$ = _notification$action.componentState) === null || _notification$action$ === void 0 ? void 0 : _notification$action$.completed) {
|
|
40328
|
+
if ((notification === null || notification === void 0 ? void 0 : (_notification$action = notification.action) === null || _notification$action === void 0 ? void 0 : (_notification$action$ = _notification$action.componentState) === null || _notification$action$ === void 0 ? void 0 : _notification$action$.completed) || notificationIds.includes(notification.notificationId) && !notification.isFirebase && newNotifications.find(function (n) {
|
|
40329
|
+
return n.notificationId === notification.notificationId;
|
|
40330
|
+
}).isFirebase) {
|
|
40315
40331
|
actionCompletedNotificationIds.push(notification.notificationId);
|
|
40316
40332
|
return true;
|
|
40317
40333
|
}
|