@copart/ops-tool-kit 1.13.7-alpha.0 → 1.13.7
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/changelog.md +3 -2
- package/dist/ops-tool-kit.js +35 -7
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
###
|
|
1
|
+
### 1.13.7
|
|
2
2
|
|
|
3
|
-
File and Blob uploads from an iframe app survive `Origin-Agent-Cluster`. The iframe reads the bytes and the shell builds a file it owns, so Chrome no longer fails the upload with `net::ERR_ACCESS_DENIED`.
|
|
3
|
+
File and Blob uploads from an iframe app survive `Origin-Agent-Cluster`. The iframe reads the bytes and the shell builds a file it owns, so Chrome no longer fails the upload with `net::ERR_ACCESS_DENIED`. A user status socket message updates the signed-in user's apps and whether they can change them.
|
|
4
4
|
|
|
5
5
|
- A `File` or `Blob` inside `FormData` is sent as bytes (`kind: 'formFile'`). The shell rebuilds a `File` and appends it with the original filename.
|
|
6
6
|
- A `File` or `Blob` passed as the request body is sent the same way (`bodyType: 'blob'`).
|
|
7
7
|
- A `Blob` response, including an error body, is read in the shell and rebuilt in the iframe. `responseType: 'arraybuffer'` is unchanged.
|
|
8
|
+
- A `USER_STATUS_UPDATE` message applies `userAvailability`, and applies `appNames` when `selfManaged` is true. When `selfManaged` is omitted, it is treated as false and the apps selector stays locked.
|
|
8
9
|
|
|
9
10
|
### 1.13.6
|
|
10
11
|
|
package/dist/ops-tool-kit.js
CHANGED
|
@@ -49,7 +49,7 @@ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
|
49
49
|
var ReactRouterDOM__namespace = /*#__PURE__*/_interopNamespace(ReactRouterDOM);
|
|
50
50
|
|
|
51
51
|
const name$1 = "@copart/ops-tool-kit";
|
|
52
|
-
const version$3 = "1.13.7
|
|
52
|
+
const version$3 = "1.13.7";
|
|
53
53
|
const main$1 = "dist/ops-tool-kit.js";
|
|
54
54
|
const style = "dist/ops-tool-kit.css";
|
|
55
55
|
const files = [
|
|
@@ -22512,13 +22512,15 @@ var ProfileDetails = function ProfileDetails(_ref3) {
|
|
|
22512
22512
|
currentTileName = _ref3$currentTileName === void 0 ? '' : _ref3$currentTileName,
|
|
22513
22513
|
onUserStatusUpdate = _ref3.onUserStatusUpdate,
|
|
22514
22514
|
_ref3$selfManaged = _ref3.selfManaged,
|
|
22515
|
-
selfManaged = _ref3$selfManaged === void 0 ?
|
|
22515
|
+
selfManaged = _ref3$selfManaged === void 0 ? false : _ref3$selfManaged;
|
|
22516
22516
|
var _useState1 = React.useState(null),
|
|
22517
22517
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
22518
22518
|
draftAppNames = _useState10[0],
|
|
22519
22519
|
setDraftAppNames = _useState10[1];
|
|
22520
22520
|
var appsHidden = isUserStatusAppsHidden();
|
|
22521
22521
|
var showApps = !appsHidden && Array.isArray(statusApps) && statusApps.length > 0;
|
|
22522
|
+
// Socket omits selfManaged when it is false. Only an explicit true unlocks app selection.
|
|
22523
|
+
var canManageApps = selfManaged === true;
|
|
22522
22524
|
var activeAppNames = draftAppNames == null ? selectedAppNames : draftAppNames;
|
|
22523
22525
|
var currentApp = findStatusAppForTile(statusApps, currentTileName);
|
|
22524
22526
|
var statusLocked = showApps && Boolean(currentTileName) && !isStatusAppSelected(currentApp, activeAppNames);
|
|
@@ -22672,7 +22674,7 @@ var ProfileDetails = function ProfileDetails(_ref3) {
|
|
|
22672
22674
|
selectedAppNames: selectedAppNames,
|
|
22673
22675
|
onApply: handleAppsApply,
|
|
22674
22676
|
onDraftChange: setDraftAppNames,
|
|
22675
|
-
disabled:
|
|
22677
|
+
disabled: !canManageApps
|
|
22676
22678
|
})), showStatus && showApps && selectedApps.length > 0 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22677
22679
|
className: "utilities_ops-app-frame_AppBarComponent_Settings_ProfileDetails_ProfileDetails--appTagsRow"
|
|
22678
22680
|
}, /*#__PURE__*/React__default["default"].createElement(StatusAppsHint, null), /*#__PURE__*/React__default["default"].createElement(SelectedAppChips, {
|
|
@@ -31129,7 +31131,12 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
|
|
|
31129
31131
|
return;
|
|
31130
31132
|
}
|
|
31131
31133
|
if (updateUserStatus && messageData.userAvailability) {
|
|
31132
|
-
|
|
31134
|
+
// selfManaged and appNames are omitted when the user is not self-managed.
|
|
31135
|
+
updateUserStatus({
|
|
31136
|
+
userAvailability: messageData.userAvailability,
|
|
31137
|
+
selfManaged: messageData.selfManaged === true,
|
|
31138
|
+
appNames: Array.isArray(messageData.appNames) ? messageData.appNames : undefined
|
|
31139
|
+
});
|
|
31133
31140
|
}
|
|
31134
31141
|
return;
|
|
31135
31142
|
}
|
|
@@ -31810,6 +31817,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
31810
31817
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
31811
31818
|
selfManaged = _useState26[0],
|
|
31812
31819
|
setSelfManaged = _useState26[1];
|
|
31820
|
+
var statusAppsRef = React.useRef(statusApps);
|
|
31813
31821
|
var _useState27 = React.useState(false),
|
|
31814
31822
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
31815
31823
|
showSystemOfflineDialog = _useState28[0],
|
|
@@ -31820,6 +31828,9 @@ var AppBar = function AppBar(_ref) {
|
|
|
31820
31828
|
React.useEffect(function () {
|
|
31821
31829
|
notificationsRef.current = notifications;
|
|
31822
31830
|
}, [notifications]);
|
|
31831
|
+
React.useEffect(function () {
|
|
31832
|
+
statusAppsRef.current = statusApps;
|
|
31833
|
+
}, [statusApps]);
|
|
31823
31834
|
var updateNotifications = function updateNotifications(newNotifications) {
|
|
31824
31835
|
if (newNotifications.length) {
|
|
31825
31836
|
setNotifications(function (notifications) {
|
|
@@ -31956,9 +31967,26 @@ var AppBar = function AppBar(_ref) {
|
|
|
31956
31967
|
return _ref5.apply(this, arguments);
|
|
31957
31968
|
};
|
|
31958
31969
|
}();
|
|
31959
|
-
var updateUserStatusFromWebSocket = function updateUserStatusFromWebSocket(
|
|
31960
|
-
|
|
31961
|
-
|
|
31970
|
+
var updateUserStatusFromWebSocket = function updateUserStatusFromWebSocket(payload) {
|
|
31971
|
+
var newStatus = typeof payload === 'string' ? payload : payload === null || payload === void 0 ? void 0 : payload.userAvailability;
|
|
31972
|
+
if (newStatus) {
|
|
31973
|
+
setCurrentUserStatus(newStatus);
|
|
31974
|
+
storage$2.setLocalItem('dashboard', newStatus, 'userAvailability');
|
|
31975
|
+
}
|
|
31976
|
+
if (!payload || typeof payload === 'string') return;
|
|
31977
|
+
|
|
31978
|
+
// Key is omitted when the user is not self-managed.
|
|
31979
|
+
setSelfManaged(payload.selfManaged === true);
|
|
31980
|
+
if (!isUserStatusAppsHidden() && Array.isArray(payload.appNames)) {
|
|
31981
|
+
var apps = statusAppsRef.current || [];
|
|
31982
|
+
var resolved = [];
|
|
31983
|
+
payload.appNames.forEach(function (name) {
|
|
31984
|
+
var match = findStatusAppForTile(apps, name);
|
|
31985
|
+
var code = (match === null || match === void 0 ? void 0 : match.code) || name;
|
|
31986
|
+
if (code && !resolved.includes(code)) resolved.push(code);
|
|
31987
|
+
});
|
|
31988
|
+
setSelectedAppNames(resolved);
|
|
31989
|
+
}
|
|
31962
31990
|
};
|
|
31963
31991
|
React.useEffect(function () {
|
|
31964
31992
|
if (isSystemMarkedOffline(currentUserStatus) && !isUserStatusHidden()) {
|