@copart/ops-tool-kit 1.12.13 → 1.13.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md ADDED
@@ -0,0 +1,54 @@
1
+ ### 1.12.10
2
+
3
+ - Added support for user status visibility by app via `storage.coreConfig?.checkUserStatusByApp` flag and `showUserStatus` property in app tile configurations.
4
+
5
+ ### 1.12.9
6
+
7
+ - Added support for hiding user status functionality via `storage.coreConfig?.hideUserStatus` config flag. When enabled, user status data is not loaded and status indicators are not displayed in LogOutMenu and ProfileDetails components.
8
+
9
+ ### 1.12.8
10
+
11
+ - Added user availability status circle indicator to LogOutMenu component (similar to Teams availability status display).
12
+ - Enhanced ProfileDetails to automatically add missing currentUserStatus to availableStatuses with color #BC2F32 and disabled flag when status is not in the available list.
13
+ - Status circle indicator only displays when status system is active (availableStatuses has items).
14
+
15
+ ### 0.5.44
16
+
17
+ - Fixed missing yardNumber in AppBar.
18
+
19
+ ### 0.5.43
20
+
21
+ - Added support for Seller tile.
22
+
23
+ ### 0.5.42
24
+
25
+ - Fixed issues with "Home" breadcrumb rendering when logged out.
26
+ - Removed unused files and functions, cleaned storage utility.
27
+
28
+ ### 0.5.1
29
+
30
+ - Changes to fetcher.extend to unblock ProQuote.
31
+
32
+ ### 0.5.0
33
+
34
+ - Added feedback logic to fetcher.
35
+
36
+ ### 0.4.0
37
+
38
+ - Added fetcher handling for `invalid
39
+
40
+ ### 0.3.16
41
+
42
+ - Updated solr handling in fetcher.
43
+
44
+ ### 0.3.15
45
+
46
+ - Fixed breadcrumb styling.
47
+
48
+ ### 0.3.12
49
+
50
+ - Fixed Home breadcrumb.
51
+
52
+ ### 0.0.53
53
+
54
+ - Added getters for convenience.
@@ -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.12.13";
50
+ const version$3 = "1.13.0-beta.1";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -9340,55 +9340,76 @@ var ConfigFetcher = /*#__PURE__*/function (_React$Component) {
9340
9340
  _defineProperty$2(_this, "state", {
9341
9341
  gotConfig: false
9342
9342
  });
9343
+ _defineProperty$2(_this, "_fetchVersion", 0);
9344
+ _defineProperty$2(_this, "fetchConfig", /*#__PURE__*/_asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee() {
9345
+ var _window$toolkitEnv, _window$toolkitEnv2, _window$toolkitEnv3;
9346
+ var fetchVersion, isCoreApp, configUri, config;
9347
+ return _regenerator().w(function (_context) {
9348
+ while (1) switch (_context.n) {
9349
+ case 0:
9350
+ fetchVersion = ++_this._fetchVersion;
9351
+ isCoreApp = (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
9352
+ if (!(isCoreApp && (isCoreRoute || isAuthRoute) && !storage$1.isAuthenticated)) {
9353
+ _context.n = 1;
9354
+ break;
9355
+ }
9356
+ return _context.a(2, _this.setState({
9357
+ gotConfig: true
9358
+ }));
9359
+ case 1:
9360
+ configUri = (_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.CONFIG_URI ? window.toolkitEnv.CONFIG_URI : process.env.CONFIG_URI;
9361
+ console.log('[ConfigFetcher] fetching config from:', configUri, 'APP_NAME:', (_window$toolkitEnv3 = window.toolkitEnv) === null || _window$toolkitEnv3 === void 0 ? void 0 : _window$toolkitEnv3.APP_NAME);
9362
+ _context.n = 2;
9363
+ return fetcher.getConfig(configUri);
9364
+ case 2:
9365
+ config = _context.v;
9366
+ if (!(_this._fetchVersion !== fetchVersion)) {
9367
+ _context.n = 3;
9368
+ break;
9369
+ }
9370
+ return _context.a(2);
9371
+ case 3:
9372
+ storage$1.setItem('config', config);
9373
+ if (config.instanaKey) {
9374
+ window.setUpInstana(config.instanaKey, isCoreApp);
9375
+ }
9376
+ _this.setState({
9377
+ gotConfig: true
9378
+ });
9379
+ case 4:
9380
+ return _context.a(2);
9381
+ }
9382
+ }, _callee);
9383
+ })));
9343
9384
  return _this;
9344
9385
  }
9345
9386
  _inherits$2(ConfigFetcher, _React$Component);
9346
9387
  return _createClass$2(ConfigFetcher, [{
9347
9388
  key: "componentDidMount",
9348
9389
  value: function () {
9349
- var _componentDidMount = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee() {
9350
- var _window$toolkitEnv, _window$toolkitEnv2;
9351
- var isCoreApp, configUri, config;
9352
- return _regenerator().w(function (_context) {
9353
- while (1) switch (_context.n) {
9390
+ var _componentDidMount = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee2() {
9391
+ return _regenerator().w(function (_context2) {
9392
+ while (1) switch (_context2.n) {
9354
9393
  case 0:
9355
- // If it is the core app and we are on a core route or auth route
9356
- // and the user is not authenticated, don't fetch config.
9357
- isCoreApp = (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
9358
- if (!(isCoreApp && (isCoreRoute || isAuthRoute) && !storage$1.isAuthenticated)) {
9359
- _context.n = 1;
9360
- break;
9361
- }
9362
- return _context.a(2, this.setState(function (state) {
9363
- return {
9364
- gotConfig: true
9365
- };
9366
- }));
9394
+ _context2.n = 1;
9395
+ return this.fetchConfig();
9367
9396
  case 1:
9368
- configUri = (_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.CONFIG_URI ? window.toolkitEnv.CONFIG_URI : process.env.CONFIG_URI;
9369
- _context.n = 2;
9370
- return fetcher.getConfig(configUri);
9397
+ window.addEventListener('toolkitenv-changed', this.fetchConfig);
9371
9398
  case 2:
9372
- config = _context.v;
9373
- storage$1.setItem('config', config);
9374
- if (config.instanaKey) {
9375
- window.setUpInstana(config.instanaKey, isCoreApp);
9376
- }
9377
- this.setState(function (state) {
9378
- return {
9379
- gotConfig: true
9380
- };
9381
- });
9382
- case 3:
9383
- return _context.a(2);
9399
+ return _context2.a(2);
9384
9400
  }
9385
- }, _callee, this);
9401
+ }, _callee2, this);
9386
9402
  }));
9387
9403
  function componentDidMount() {
9388
9404
  return _componentDidMount.apply(this, arguments);
9389
9405
  }
9390
9406
  return componentDidMount;
9391
9407
  }()
9408
+ }, {
9409
+ key: "componentWillUnmount",
9410
+ value: function componentWillUnmount() {
9411
+ window.removeEventListener('toolkitenv-changed', this.fetchConfig);
9412
+ }
9392
9413
  }, {
9393
9414
  key: "render",
9394
9415
  value: function render() {