@copart/ops-tool-kit 1.10.1 → 1.10.2-alpha.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.
@@ -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.10.1";
36
+ const version$5 = "1.10.2-alpha.1";
37
37
  const main$1 = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -6490,9 +6490,14 @@ var findAppData = function findAppData(tiles) {
6490
6490
  var _window$toolkitEnv;
6491
6491
 
6492
6492
  var appName = ((_window$toolkitEnv = window.toolkitEnv) === null || _window$toolkitEnv === void 0 ? void 0 : _window$toolkitEnv.APP_NAME) ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
6493
+
6494
+ if (window.location.pathname.includes('embedded')) {
6495
+ appName = window.location.pathname;
6496
+ }
6497
+
6493
6498
  var matchingTiles = tiles.filter(function (tile) {
6494
6499
  if (tile.appName) {
6495
- return tile.appName === appName;
6500
+ return tile.appName === 'embedded' ? tile.path === appName : tile.appName === appName;
6496
6501
  } else {
6497
6502
  return tile.path === "/".concat(appName);
6498
6503
  }
@@ -41637,8 +41642,8 @@ var generateQuery = function generateQuery(yardNumber, email) {
41637
41642
  var EndDateTs = moment(new Date()).local().format('YYYY-MM-DDTHH:mm:ss[Z]');
41638
41643
  var startDateTsUTC = moment.utc(new Date()).add(1, 'days').format('YYYY-MM-DDTHH:mm:ss[Z]');
41639
41644
  var EndDateTsUTC = moment.utc(new Date()).format('YYYY-MM-DDTHH:mm:ss[Z]');
41640
- var countryCodes = window.location.hostname.includes('.com') ? '"USA", "CAN"' : '"ARE", "OMN", "BHR", "IRL", "GBR"';
41641
- return "fq=(facilities:".concat(yardNumber, " OR user_details:\"").concat(email, "\" OR group_user_details:\"").concat(email, "\" OR applications:\"").concat(encodeURIComponent(getCurrentApp()), "\")&fq=((start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTsUTC, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]) OR (!start_date_timezone:\"UTC\" AND !end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTs, " TO *]) OR (!start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]))&fq=(operating_country_a3_code:(").concat(countryCodes, ") OR destination_type:(\"groups\",\"users\"))&fq=status:A&rows=10000&q=*:*");
41645
+ window.location.hostname.includes('.com') ? '"USA", "CAN"' : '"ARE", "OMN", "BHR", "IRL", "GBR"';
41646
+ return "fq=(facilities:".concat(yardNumber, " OR user_details:\"").concat(email, "\" OR group_user_details:\"").concat(email, "\" OR applications:\"").concat(encodeURIComponent(getCurrentApp()), "\")&fq=((start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTsUTC, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]) OR (!start_date_timezone:\"UTC\" AND !end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTs, " TO *]) OR (!start_date_timezone:\"UTC\" AND end_date_timezone:\"UTC\" AND start_date_ts_utc:[* TO ").concat(startDateTs, "] AND end_date_ts_utc:[").concat(EndDateTsUTC, " TO *]))&fq=status:A&rows=10000&q=*:*");
41642
41647
  };
41643
41648
 
41644
41649
  var generateTargets = function generateTargets(notification) {
@@ -41996,10 +42001,10 @@ var AppBar = function AppBar(_ref) {
41996
42001
  setShowMihelpTooltip = _useState10[1];
41997
42002
 
41998
42003
  var tileData = findAppData(coreAppConfig.tiles || []) || {};
41999
- var mihelpAppPath = !isCoreRoute ? tileData.mihelpAppPath : null;
42004
+ var mihelpAppPath = isCoreRoute && !window.location.pathname.includes('embedded') ? null : tileData.mihelpAppPath;
42000
42005
  var isMihelpEnabled;
42001
42006
 
42002
- if (isCoreRoute) {
42007
+ if (isCoreRoute && !window.location.pathname.includes('embedded')) {
42003
42008
  isMihelpEnabled = coreAppConfig.enableMiHelp;
42004
42009
  } else {
42005
42010
  isMihelpEnabled = Boolean(mihelpAppPath);
@@ -43526,7 +43531,8 @@ const arrow = options => ({
43526
43531
  placement,
43527
43532
  rects,
43528
43533
  platform,
43529
- elements
43534
+ elements,
43535
+ middlewareData
43530
43536
  } = state; // Since `element` is required, we don't Partial<> the type.
43531
43537
 
43532
43538
  const {
@@ -43572,17 +43578,21 @@ const arrow = options => ({
43572
43578
  const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
43573
43579
  const offset = clamp(min$1, center, max); // If the reference is small enough that the arrow's padding causes it to
43574
43580
  // to point to nothing for an aligned placement, adjust the offset of the
43575
- // floating element itself. This stops `shift()` from taking action, but can
43576
- // be worked around by calling it again after the `arrow()` if desired.
43581
+ // floating element itself. To ensure `shift()` continues to take action,
43582
+ // a single reset is performed when this is true.
43577
43583
 
43578
- const shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
43579
- const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
43584
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
43585
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
43580
43586
  return {
43581
- [axis]: coords[axis] - alignmentOffset,
43587
+ [axis]: coords[axis] + alignmentOffset,
43582
43588
  data: {
43583
43589
  [axis]: offset,
43584
- centerOffset: center - offset + alignmentOffset
43585
- }
43590
+ centerOffset: center - offset - alignmentOffset,
43591
+ ...(shouldAddOffset && {
43592
+ alignmentOffset
43593
+ })
43594
+ },
43595
+ reset: shouldAddOffset
43586
43596
  };
43587
43597
  }
43588
43598
 
@@ -43605,7 +43615,7 @@ const flip = function (options) {
43605
43615
  options,
43606
43616
 
43607
43617
  async fn(state) {
43608
- var _middlewareData$flip;
43618
+ var _middlewareData$arrow, _middlewareData$flip;
43609
43619
 
43610
43620
  const {
43611
43621
  placement,
@@ -43623,7 +43633,15 @@ const flip = function (options) {
43623
43633
  fallbackAxisSideDirection = 'none',
43624
43634
  flipAlignment = true,
43625
43635
  ...detectOverflowOptions
43626
- } = evaluate(options, state);
43636
+ } = evaluate(options, state); // If a reset by the arrow was caused due to an alignment offset being
43637
+ // added, we should skip any logic now since `flip()` has already done its
43638
+ // work.
43639
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
43640
+
43641
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
43642
+ return {};
43643
+ }
43644
+
43627
43645
  const side = getSide(placement);
43628
43646
  const isBasePlacement = getSide(initialPlacement) === initialPlacement;
43629
43647
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
@@ -44000,22 +44018,26 @@ function getNearestOverflowAncestor(node) {
44000
44018
  return getNearestOverflowAncestor(parentNode);
44001
44019
  }
44002
44020
 
44003
- function getOverflowAncestors(node, list) {
44021
+ function getOverflowAncestors(node, list, traverseIframes) {
44004
44022
  var _node$ownerDocument2;
44005
44023
 
44006
44024
  if (list === void 0) {
44007
44025
  list = [];
44008
44026
  }
44009
44027
 
44028
+ if (traverseIframes === void 0) {
44029
+ traverseIframes = true;
44030
+ }
44031
+
44010
44032
  const scrollableAncestor = getNearestOverflowAncestor(node);
44011
44033
  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
44012
44034
  const win = getWindow(scrollableAncestor);
44013
44035
 
44014
44036
  if (isBody) {
44015
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
44037
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
44016
44038
  }
44017
44039
 
44018
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
44040
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
44019
44041
  }
44020
44042
 
44021
44043
  function getCssDimensions(element) {
@@ -44322,7 +44344,7 @@ function getClippingElementAncestors(element, cache) {
44322
44344
  return cachedResult;
44323
44345
  }
44324
44346
 
44325
- let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
44347
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
44326
44348
  let currentContainingBlockComputedStyle = null;
44327
44349
  const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
44328
44350
  let currentNode = elementIsFixed ? getParentNode(element) : element; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block