You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2021/02/23 09:19:52 UTC

[myfaces-tobago] branch master updated: chore: rebuild themes after dependency updates

This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 12605bf  chore: rebuild themes after dependency updates
12605bf is described below

commit 12605bf17f55642688a32ab528d1f1920e084d9a
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Tue Feb 23 10:19:01 2021 +0100

    chore: rebuild themes after dependency updates
---
 .../tobago-theme-standard/npm/dist/js/tobago.js    | 147 ++++++++++++---------
 .../npm/dist/js/tobago.js.map                      |   2 +-
 2 files changed, 84 insertions(+), 65 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js
index 5291dd1..4665b2b 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js
@@ -3055,6 +3055,11 @@
 
 
     function isShadowRoot(node) {
+      // IE 11 has no ShadowRoot
+      if (typeof ShadowRoot === 'undefined') {
+        return false;
+      }
+
       var OwnElement = getWindow(node).ShadowRoot;
       return node instanceof OwnElement || node instanceof ShadowRoot;
     }
@@ -3103,6 +3108,7 @@
         reference: {}
       };
       Object.assign(state.elements.popper.style, initialStyles.popper);
+      state.styles = initialStyles;
 
       if (state.elements.arrow) {
         Object.assign(state.elements.arrow.style, initialStyles.arrow);
@@ -3202,9 +3208,8 @@
         // $FlowFixMe[incompatible-return]
         // $FlowFixMe[prop-missing]
         element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
-        element.parentNode || // DOM Element detected
-        // $FlowFixMe[incompatible-return]: need a better way to handle this...
-        element.host || // ShadowRoot detected
+        element.parentNode || ( // DOM Element detected
+        isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
         // $FlowFixMe[incompatible-call]: HTMLElement is a Node
         getDocumentElement(element) // fallback
 
@@ -3217,29 +3222,21 @@
         return null;
       }
 
-      var offsetParent = element.offsetParent;
-
-      if (offsetParent) {
-        var html = getDocumentElement(offsetParent);
-
-        if (getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && getComputedStyle$1(html).position !== 'static') {
-          return html;
-        }
-      }
-
-      return offsetParent;
+      return element.offsetParent;
     } // `.offsetParent` reports `null` for fixed elements, while absolute elements
     // return the containing block
 
 
     function getContainingBlock(element) {
+      var isFirefox = navigator.userAgent.toLowerCase().includes('firefox');
       var currentNode = getParentNode(element);
 
       while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
         var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that
         // create a containing block.
+        // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
 
-        if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {
+        if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
           return currentNode;
         } else {
           currentNode = currentNode.parentNode;
@@ -3259,7 +3256,7 @@
         offsetParent = getTrueOffsetParent(offsetParent);
       }
 
-      if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static') {
+      if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {
         return window;
       }
 
@@ -3270,8 +3267,12 @@
       return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
     }
 
-    function within(min, value, max) {
-      return Math.max(min, Math.min(value, max));
+    var max = Math.max;
+    var min = Math.min;
+    var round = Math.round;
+
+    function within(min$1, value, max$1) {
+      return max(min$1, min(value, max$1));
     }
 
     function getFreshSideObject() {
@@ -3284,7 +3285,7 @@
     }
 
     function mergePaddingObject(paddingObject) {
-      return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject);
+      return Object.assign({}, getFreshSideObject(), paddingObject);
     }
 
     function expandToHashMap(value, keys) {
@@ -3357,6 +3358,9 @@
         return;
       }
 
+      padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
+        placement: state.placement
+      })) : padding;
       state.elements.arrow = arrowElement;
       state.modifiersData[name + "#persistent"] = {
         padding: mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements))
@@ -3374,7 +3378,6 @@
       requiresIfExists: ['preventOverflow']
     };
 
-    var round = Math.round;
     var unsetSides = {
       top: 'auto',
       right: 'auto',
@@ -3421,23 +3424,32 @@
 
       if (adaptive) {
         var offsetParent = getOffsetParent(popper);
+        var heightProp = 'clientHeight';
+        var widthProp = 'clientWidth';
 
         if (offsetParent === getWindow(popper)) {
           offsetParent = getDocumentElement(popper);
+
+          if (getComputedStyle$1(offsetParent).position !== 'static') {
+            heightProp = 'scrollHeight';
+            widthProp = 'scrollWidth';
+          }
         } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
 
         /*:: offsetParent = (offsetParent: Element); */
 
 
         if (placement === top) {
-          sideY = bottom;
-          y -= offsetParent.clientHeight - popperRect.height;
+          sideY = bottom; // $FlowFixMe[prop-missing]
+
+          y -= offsetParent[heightProp] - popperRect.height;
           y *= gpuAcceleration ? 1 : -1;
         }
 
         if (placement === left) {
-          sideX = right;
-          x -= offsetParent.clientWidth - popperRect.width;
+          sideX = right; // $FlowFixMe[prop-missing]
+
+          x -= offsetParent[widthProp] - popperRect.width;
           x *= gpuAcceleration ? 1 : -1;
         }
       }
@@ -3449,10 +3461,10 @@
       if (gpuAcceleration) {
         var _Object$assign;
 
-        return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
+        return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
       }
 
-      return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
+      return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
     }
 
     function computeStyles(_ref4) {
@@ -3473,7 +3485,7 @@
       };
 
       if (state.modifiersData.popperOffsets != null) {
-        state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {
+        state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
           offsets: state.modifiersData.popperOffsets,
           position: state.options.strategy,
           adaptive: adaptive,
@@ -3482,7 +3494,7 @@
       }
 
       if (state.modifiersData.arrow != null) {
-        state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {
+        state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
           offsets: state.modifiersData.arrow,
           position: 'absolute',
           adaptive: false,
@@ -3490,7 +3502,7 @@
         })));
       }
 
-      state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {
+      state.attributes.popper = Object.assign({}, state.attributes.popper, {
         'data-popper-placement': state.placement
       });
     } // eslint-disable-next-line import/no-unused-modules
@@ -3650,16 +3662,18 @@
     // of the `<html>` and `<body>` rect bounds if horizontally scrollable
 
     function getDocumentRect(element) {
+      var _element$ownerDocumen;
+
       var html = getDocumentElement(element);
       var winScroll = getWindowScroll(element);
-      var body = element.ownerDocument.body;
-      var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
-      var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
+      var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
+      var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
+      var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
       var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
       var y = -winScroll.scrollTop;
 
       if (getComputedStyle$1(body || html).direction === 'rtl') {
-        x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;
+        x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
       }
 
       return {
@@ -3701,12 +3715,14 @@
     */
 
     function listScrollParents(element, list) {
+      var _element$ownerDocumen;
+
       if (list === void 0) {
         list = [];
       }
 
       var scrollParent = getScrollParent(element);
-      var isBody = scrollParent === element.ownerDocument.body;
+      var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
       var win = getWindow(scrollParent);
       var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
       var updatedList = list.concat(target);
@@ -3715,7 +3731,7 @@
     }
 
     function rectToClientRect(rect) {
-      return Object.assign(Object.assign({}, rect), {}, {
+      return Object.assign({}, rect, {
         left: rect.x,
         top: rect.y,
         right: rect.x + rect.width,
@@ -3766,10 +3782,10 @@
       var firstClippingParent = clippingParents[0];
       var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
         var rect = getClientRectFromMixedType(element, clippingParent);
-        accRect.top = Math.max(rect.top, accRect.top);
-        accRect.right = Math.min(rect.right, accRect.right);
-        accRect.bottom = Math.min(rect.bottom, accRect.bottom);
-        accRect.left = Math.max(rect.left, accRect.left);
+        accRect.top = max(rect.top, accRect.top);
+        accRect.right = min(rect.right, accRect.right);
+        accRect.bottom = min(rect.bottom, accRect.bottom);
+        accRect.left = max(rect.left, accRect.left);
         return accRect;
       }, getClientRectFromMixedType(element, firstClippingParent));
       clippingRect.width = clippingRect.right - clippingRect.left;
@@ -3879,7 +3895,7 @@
         strategy: 'absolute',
         placement: placement
       });
-      var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets));
+      var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
       var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
       // 0 or negative = within the clipping rect
 
@@ -4130,7 +4146,7 @@
         isReferenceHidden: isReferenceHidden,
         hasPopperEscaped: hasPopperEscaped
       };
-      state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {
+      state.attributes.popper = Object.assign({}, state.attributes.popper, {
         'data-popper-reference-hidden': isReferenceHidden,
         'data-popper-escaped': hasPopperEscaped
       });
@@ -4149,7 +4165,7 @@
       var basePlacement = getBasePlacement(placement);
       var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
 
-      var _ref = typeof offset === 'function' ? offset(Object.assign(Object.assign({}, rects), {}, {
+      var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
         placement: placement
       })) : offset,
           skidding = _ref[0],
@@ -4255,7 +4271,7 @@
       var popperOffsets = state.modifiersData.popperOffsets;
       var referenceRect = state.rects.reference;
       var popperRect = state.rects.popper;
-      var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign(Object.assign({}, state.rects), {}, {
+      var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
         placement: state.placement
       })) : tetherOffset;
       var data = {
@@ -4267,13 +4283,13 @@
         return;
       }
 
-      if (checkMainAxis) {
+      if (checkMainAxis || checkAltAxis) {
         var mainSide = mainAxis === 'y' ? top : left;
         var altSide = mainAxis === 'y' ? bottom : right;
         var len = mainAxis === 'y' ? 'height' : 'width';
         var offset = popperOffsets[mainAxis];
-        var min = popperOffsets[mainAxis] + overflow[mainSide];
-        var max = popperOffsets[mainAxis] - overflow[altSide];
+        var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
+        var max$1 = popperOffsets[mainAxis] - overflow[altSide];
         var additive = tether ? -popperRect[len] / 2 : 0;
         var minLen = variation === start ? referenceRect[len] : popperRect[len];
         var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
@@ -4300,26 +4316,29 @@
         var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
         var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
         var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
-        var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max);
-        popperOffsets[mainAxis] = preventedOffset;
-        data[mainAxis] = preventedOffset - offset;
-      }
 
-      if (checkAltAxis) {
-        var _mainSide = mainAxis === 'x' ? top : left;
+        if (checkMainAxis) {
+          var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
+          popperOffsets[mainAxis] = preventedOffset;
+          data[mainAxis] = preventedOffset - offset;
+        }
+
+        if (checkAltAxis) {
+          var _mainSide = mainAxis === 'x' ? top : left;
 
-        var _altSide = mainAxis === 'x' ? bottom : right;
+          var _altSide = mainAxis === 'x' ? bottom : right;
 
-        var _offset = popperOffsets[altAxis];
+          var _offset = popperOffsets[altAxis];
 
-        var _min = _offset + overflow[_mainSide];
+          var _min = _offset + overflow[_mainSide];
 
-        var _max = _offset - overflow[_altSide];
+          var _max = _offset - overflow[_altSide];
 
-        var _preventedOffset = within(_min, _offset, _max);
+          var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
 
-        popperOffsets[altAxis] = _preventedOffset;
-        data[altAxis] = _preventedOffset - _offset;
+          popperOffsets[altAxis] = _preventedOffset;
+          data[altAxis] = _preventedOffset - _offset;
+        }
       }
 
       state.modifiersData[name] = data;
@@ -4453,9 +4472,9 @@
     function mergeByName(modifiers) {
       var merged = modifiers.reduce(function (merged, current) {
         var existing = merged[current.name];
-        merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, {
-          options: Object.assign(Object.assign({}, existing.options), current.options),
-          data: Object.assign(Object.assign({}, existing.data), current.data)
+        merged[current.name] = existing ? Object.assign({}, existing, current, {
+          options: Object.assign({}, existing.options, current.options),
+          data: Object.assign({}, existing.data, current.data)
         }) : current;
         return merged;
       }, {}); // IE11 does not support Object.values
@@ -4499,7 +4518,7 @@
         var state = {
           placement: 'bottom',
           orderedModifiers: [],
-          options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions),
+          options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
           modifiersData: {},
           elements: {
             reference: reference,
@@ -4514,7 +4533,7 @@
           state: state,
           setOptions: function setOptions(options) {
             cleanupModifierEffects();
-            state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options);
+            state.options = Object.assign({}, defaultOptions, state.options, options);
             state.scrollParents = {
               reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
               popper: listScrollParents(popper)
diff --git a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map
index 3f5c87e..51685d2 100644
--- a/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map
+++ b/tobago-theme/tobago-theme-standard/npm/dist/js/tobago.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago.js","sources":["tobago-listener.js","tobago-utils.js","tobago-bar.js","tobago-dropdown.js","../../node_modules/vanillajs-datepicker/js/lib/utils.js","../../node_modules/vanillajs-datepicker/js/lib/date.js","../../node_modules/vanillajs-datepicker/js/lib/date-format.js","../../node_modules/vanillajs-datepicker/js/lib/event.js","../../node_modules/vanillajs-datepicker/js/i18n/base-locales.js","../../node_modules/vanillajs-datepicker/js/options/defaultOptions.js" [...]
\ No newline at end of file
+{"version":3,"file":"tobago.js","sources":["tobago-listener.js","tobago-utils.js","tobago-bar.js","tobago-dropdown.js","../../node_modules/vanillajs-datepicker/js/lib/utils.js","../../node_modules/vanillajs-datepicker/js/lib/date.js","../../node_modules/vanillajs-datepicker/js/lib/date-format.js","../../node_modules/vanillajs-datepicker/js/lib/event.js","../../node_modules/vanillajs-datepicker/js/i18n/base-locales.js","../../node_modules/vanillajs-datepicker/js/options/defaultOptions.js" [...]
\ No newline at end of file