Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
[52000] Fix | Delete
each(['Width', 'Height'], function (name) {
[52001] Fix | Delete
domUtils['doc' + name] = function (refWin) {
[52002] Fix | Delete
var d = refWin.document;
[52003] Fix | Delete
return Math.max(
[52004] Fix | Delete
// firefox chrome documentElement.scrollHeight< body.scrollHeight
[52005] Fix | Delete
// ie standard mode : documentElement.scrollHeight> body.scrollHeight
[52006] Fix | Delete
d.documentElement['scroll' + name],
[52007] Fix | Delete
// quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
[52008] Fix | Delete
d.body['scroll' + name], domUtils['viewport' + name](d));
[52009] Fix | Delete
};
[52010] Fix | Delete
[52011] Fix | Delete
domUtils['viewport' + name] = function (win) {
[52012] Fix | Delete
// pc browser includes scrollbar in window.innerWidth
[52013] Fix | Delete
var prop = 'client' + name;
[52014] Fix | Delete
var doc = win.document;
[52015] Fix | Delete
var body = doc.body;
[52016] Fix | Delete
var documentElement = doc.documentElement;
[52017] Fix | Delete
var documentElementProp = documentElement[prop];
[52018] Fix | Delete
// 标准模式取 documentElement
[52019] Fix | Delete
// backcompat 取 body
[52020] Fix | Delete
return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;
[52021] Fix | Delete
};
[52022] Fix | Delete
});
[52023] Fix | Delete
[52024] Fix | Delete
/*
[52025] Fix | Delete
得到元素的大小信息
[52026] Fix | Delete
@param elem
[52027] Fix | Delete
@param name
[52028] Fix | Delete
@param {String} [extra] 'padding' : (css width) + padding
[52029] Fix | Delete
'border' : (css width) + padding + border
[52030] Fix | Delete
'margin' : (css width) + padding + border + margin
[52031] Fix | Delete
*/
[52032] Fix | Delete
function getWH(elem, name, extra) {
[52033] Fix | Delete
if (isWindow(elem)) {
[52034] Fix | Delete
return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
[52035] Fix | Delete
} else if (elem.nodeType === 9) {
[52036] Fix | Delete
return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
[52037] Fix | Delete
}
[52038] Fix | Delete
var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
[52039] Fix | Delete
var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;
[52040] Fix | Delete
var computedStyle = getComputedStyleX(elem);
[52041] Fix | Delete
var isBorderBox = isBorderBoxFn(elem, computedStyle);
[52042] Fix | Delete
var cssBoxValue = 0;
[52043] Fix | Delete
if (borderBoxValue == null || borderBoxValue <= 0) {
[52044] Fix | Delete
borderBoxValue = undefined;
[52045] Fix | Delete
// Fall back to computed then un computed css if necessary
[52046] Fix | Delete
cssBoxValue = getComputedStyleX(elem, name);
[52047] Fix | Delete
if (cssBoxValue == null || Number(cssBoxValue) < 0) {
[52048] Fix | Delete
cssBoxValue = elem.style[name] || 0;
[52049] Fix | Delete
}
[52050] Fix | Delete
// Normalize '', auto, and prepare for extra
[52051] Fix | Delete
cssBoxValue = parseFloat(cssBoxValue) || 0;
[52052] Fix | Delete
}
[52053] Fix | Delete
if (extra === undefined) {
[52054] Fix | Delete
extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
[52055] Fix | Delete
}
[52056] Fix | Delete
var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
[52057] Fix | Delete
var val = borderBoxValue || cssBoxValue;
[52058] Fix | Delete
if (extra === CONTENT_INDEX) {
[52059] Fix | Delete
if (borderBoxValueOrIsBorderBox) {
[52060] Fix | Delete
return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);
[52061] Fix | Delete
}
[52062] Fix | Delete
return cssBoxValue;
[52063] Fix | Delete
}
[52064] Fix | Delete
if (borderBoxValueOrIsBorderBox) {
[52065] Fix | Delete
var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);
[52066] Fix | Delete
return val + (extra === BORDER_INDEX ? 0 : padding);
[52067] Fix | Delete
}
[52068] Fix | Delete
return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);
[52069] Fix | Delete
}
[52070] Fix | Delete
[52071] Fix | Delete
var cssShow = {
[52072] Fix | Delete
position: 'absolute',
[52073] Fix | Delete
visibility: 'hidden',
[52074] Fix | Delete
display: 'block'
[52075] Fix | Delete
};
[52076] Fix | Delete
[52077] Fix | Delete
// fix #119 : https://github.com/kissyteam/kissy/issues/119
[52078] Fix | Delete
function getWHIgnoreDisplay(elem) {
[52079] Fix | Delete
var val = undefined;
[52080] Fix | Delete
var args = arguments;
[52081] Fix | Delete
// in case elem is window
[52082] Fix | Delete
// elem.offsetWidth === undefined
[52083] Fix | Delete
if (elem.offsetWidth !== 0) {
[52084] Fix | Delete
val = getWH.apply(undefined, args);
[52085] Fix | Delete
} else {
[52086] Fix | Delete
swap(elem, cssShow, function () {
[52087] Fix | Delete
val = getWH.apply(undefined, args);
[52088] Fix | Delete
});
[52089] Fix | Delete
}
[52090] Fix | Delete
return val;
[52091] Fix | Delete
}
[52092] Fix | Delete
[52093] Fix | Delete
function css(el, name, v) {
[52094] Fix | Delete
var value = v;
[52095] Fix | Delete
if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
[52096] Fix | Delete
for (var i in name) {
[52097] Fix | Delete
if (name.hasOwnProperty(i)) {
[52098] Fix | Delete
css(el, i, name[i]);
[52099] Fix | Delete
}
[52100] Fix | Delete
}
[52101] Fix | Delete
return undefined;
[52102] Fix | Delete
}
[52103] Fix | Delete
if (typeof value !== 'undefined') {
[52104] Fix | Delete
if (typeof value === 'number') {
[52105] Fix | Delete
value += 'px';
[52106] Fix | Delete
}
[52107] Fix | Delete
el.style[name] = value;
[52108] Fix | Delete
return undefined;
[52109] Fix | Delete
}
[52110] Fix | Delete
return getComputedStyleX(el, name);
[52111] Fix | Delete
}
[52112] Fix | Delete
[52113] Fix | Delete
each(['width', 'height'], function (name) {
[52114] Fix | Delete
var first = name.charAt(0).toUpperCase() + name.slice(1);
[52115] Fix | Delete
domUtils['outer' + first] = function (el, includeMargin) {
[52116] Fix | Delete
return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
[52117] Fix | Delete
};
[52118] Fix | Delete
var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
[52119] Fix | Delete
[52120] Fix | Delete
domUtils[name] = function (elem, val) {
[52121] Fix | Delete
if (val !== undefined) {
[52122] Fix | Delete
if (elem) {
[52123] Fix | Delete
var computedStyle = getComputedStyleX(elem);
[52124] Fix | Delete
var isBorderBox = isBorderBoxFn(elem);
[52125] Fix | Delete
if (isBorderBox) {
[52126] Fix | Delete
val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);
[52127] Fix | Delete
}
[52128] Fix | Delete
return css(elem, name, val);
[52129] Fix | Delete
}
[52130] Fix | Delete
return undefined;
[52131] Fix | Delete
}
[52132] Fix | Delete
return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
[52133] Fix | Delete
};
[52134] Fix | Delete
});
[52135] Fix | Delete
[52136] Fix | Delete
// 设置 elem 相对 elem.ownerDocument 的坐标
[52137] Fix | Delete
function setOffset(elem, offset) {
[52138] Fix | Delete
// set position first, in-case top/left are set even on static elem
[52139] Fix | Delete
if (css(elem, 'position') === 'static') {
[52140] Fix | Delete
elem.style.position = 'relative';
[52141] Fix | Delete
}
[52142] Fix | Delete
[52143] Fix | Delete
var old = getOffset(elem);
[52144] Fix | Delete
var ret = {};
[52145] Fix | Delete
var current = undefined;
[52146] Fix | Delete
var key = undefined;
[52147] Fix | Delete
[52148] Fix | Delete
for (key in offset) {
[52149] Fix | Delete
if (offset.hasOwnProperty(key)) {
[52150] Fix | Delete
current = parseFloat(css(elem, key)) || 0;
[52151] Fix | Delete
ret[key] = current + offset[key] - old[key];
[52152] Fix | Delete
}
[52153] Fix | Delete
}
[52154] Fix | Delete
css(elem, ret);
[52155] Fix | Delete
}
[52156] Fix | Delete
[52157] Fix | Delete
module.exports = _extends({
[52158] Fix | Delete
getWindow: function getWindow(node) {
[52159] Fix | Delete
var doc = node.ownerDocument || node;
[52160] Fix | Delete
return doc.defaultView || doc.parentWindow;
[52161] Fix | Delete
},
[52162] Fix | Delete
offset: function offset(el, value) {
[52163] Fix | Delete
if (typeof value !== 'undefined') {
[52164] Fix | Delete
setOffset(el, value);
[52165] Fix | Delete
} else {
[52166] Fix | Delete
return getOffset(el);
[52167] Fix | Delete
}
[52168] Fix | Delete
},
[52169] Fix | Delete
[52170] Fix | Delete
isWindow: isWindow,
[52171] Fix | Delete
each: each,
[52172] Fix | Delete
css: css,
[52173] Fix | Delete
clone: function clone(obj) {
[52174] Fix | Delete
var ret = {};
[52175] Fix | Delete
for (var i in obj) {
[52176] Fix | Delete
if (obj.hasOwnProperty(i)) {
[52177] Fix | Delete
ret[i] = obj[i];
[52178] Fix | Delete
}
[52179] Fix | Delete
}
[52180] Fix | Delete
var overflow = obj.overflow;
[52181] Fix | Delete
if (overflow) {
[52182] Fix | Delete
for (var i in obj) {
[52183] Fix | Delete
if (obj.hasOwnProperty(i)) {
[52184] Fix | Delete
ret.overflow[i] = obj.overflow[i];
[52185] Fix | Delete
}
[52186] Fix | Delete
}
[52187] Fix | Delete
}
[52188] Fix | Delete
return ret;
[52189] Fix | Delete
},
[52190] Fix | Delete
scrollLeft: function scrollLeft(w, v) {
[52191] Fix | Delete
if (isWindow(w)) {
[52192] Fix | Delete
if (v === undefined) {
[52193] Fix | Delete
return getScrollLeft(w);
[52194] Fix | Delete
}
[52195] Fix | Delete
window.scrollTo(v, getScrollTop(w));
[52196] Fix | Delete
} else {
[52197] Fix | Delete
if (v === undefined) {
[52198] Fix | Delete
return w.scrollLeft;
[52199] Fix | Delete
}
[52200] Fix | Delete
w.scrollLeft = v;
[52201] Fix | Delete
}
[52202] Fix | Delete
},
[52203] Fix | Delete
scrollTop: function scrollTop(w, v) {
[52204] Fix | Delete
if (isWindow(w)) {
[52205] Fix | Delete
if (v === undefined) {
[52206] Fix | Delete
return getScrollTop(w);
[52207] Fix | Delete
}
[52208] Fix | Delete
window.scrollTo(getScrollLeft(w), v);
[52209] Fix | Delete
} else {
[52210] Fix | Delete
if (v === undefined) {
[52211] Fix | Delete
return w.scrollTop;
[52212] Fix | Delete
}
[52213] Fix | Delete
w.scrollTop = v;
[52214] Fix | Delete
}
[52215] Fix | Delete
},
[52216] Fix | Delete
[52217] Fix | Delete
viewportWidth: 0,
[52218] Fix | Delete
viewportHeight: 0
[52219] Fix | Delete
}, domUtils);
[52220] Fix | Delete
[52221] Fix | Delete
/***/ }),
[52222] Fix | Delete
[52223] Fix | Delete
/***/ "jenk":
[52224] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[52225] Fix | Delete
[52226] Fix | Delete
"use strict";
[52227] Fix | Delete
[52228] Fix | Delete
[52229] Fix | Delete
Object.defineProperty(exports, "__esModule", {
[52230] Fix | Delete
value: true
[52231] Fix | Delete
});
[52232] Fix | Delete
exports['default'] = toISOMonthString;
[52233] Fix | Delete
[52234] Fix | Delete
var _moment = __webpack_require__("wy2R");
[52235] Fix | Delete
[52236] Fix | Delete
var _moment2 = _interopRequireDefault(_moment);
[52237] Fix | Delete
[52238] Fix | Delete
var _toMomentObject = __webpack_require__("WmS1");
[52239] Fix | Delete
[52240] Fix | Delete
var _toMomentObject2 = _interopRequireDefault(_toMomentObject);
[52241] Fix | Delete
[52242] Fix | Delete
var _constants = __webpack_require__("Fv1B");
[52243] Fix | Delete
[52244] Fix | Delete
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
[52245] Fix | Delete
[52246] Fix | Delete
function toISOMonthString(date, currentFormat) {
[52247] Fix | Delete
var dateObj = _moment2['default'].isMoment(date) ? date : (0, _toMomentObject2['default'])(date, currentFormat);
[52248] Fix | Delete
if (!dateObj) return null;
[52249] Fix | Delete
[52250] Fix | Delete
return dateObj.format(_constants.ISO_MONTH_FORMAT);
[52251] Fix | Delete
}
[52252] Fix | Delete
[52253] Fix | Delete
/***/ }),
[52254] Fix | Delete
[52255] Fix | Delete
/***/ "k8OV":
[52256] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[52257] Fix | Delete
[52258] Fix | Delete
"use strict";
[52259] Fix | Delete
/* unused harmony export createScrollLockComponent */
[52260] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1OyB");
[52261] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("vuIU");
[52262] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Ji7U");
[52263] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("md7G");
[52264] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("foSv");
[52265] Fix | Delete
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("GRId");
[52266] Fix | Delete
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
[52267] Fix | Delete
[52268] Fix | Delete
[52269] Fix | Delete
[52270] Fix | Delete
[52271] Fix | Delete
[52272] Fix | Delete
[52273] Fix | Delete
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(this, result); }; }
[52274] Fix | Delete
[52275] Fix | Delete
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
[52276] Fix | Delete
[52277] Fix | Delete
/**
[52278] Fix | Delete
* WordPress dependencies
[52279] Fix | Delete
*/
[52280] Fix | Delete
[52281] Fix | Delete
/**
[52282] Fix | Delete
* Creates a ScrollLock component bound to the specified document.
[52283] Fix | Delete
*
[52284] Fix | Delete
* This function creates a ScrollLock component for the specified document
[52285] Fix | Delete
* and is exposed so we can create an isolated component for unit testing.
[52286] Fix | Delete
*
[52287] Fix | Delete
* @param {Object} args Keyword args.
[52288] Fix | Delete
* @param {HTMLDocument} args.htmlDocument The document to lock the scroll for.
[52289] Fix | Delete
* @param {string} args.className The name of the class used to lock scrolling.
[52290] Fix | Delete
* @return {WPComponent} The bound ScrollLock component.
[52291] Fix | Delete
*/
[52292] Fix | Delete
[52293] Fix | Delete
function createScrollLockComponent() {
[52294] Fix | Delete
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
[52295] Fix | Delete
_ref$htmlDocument = _ref.htmlDocument,
[52296] Fix | Delete
htmlDocument = _ref$htmlDocument === void 0 ? document : _ref$htmlDocument,
[52297] Fix | Delete
_ref$className = _ref.className,
[52298] Fix | Delete
className = _ref$className === void 0 ? 'lockscroll' : _ref$className;
[52299] Fix | Delete
[52300] Fix | Delete
var lockCounter = 0;
[52301] Fix | Delete
/*
[52302] Fix | Delete
* Setting `overflow: hidden` on html and body elements resets body scroll in iOS.
[52303] Fix | Delete
* Save scroll top so we can restore it after locking scroll.
[52304] Fix | Delete
*
[52305] Fix | Delete
* NOTE: It would be cleaner and possibly safer to find a localized solution such
[52306] Fix | Delete
* as preventing default on certain touchmove events.
[52307] Fix | Delete
*/
[52308] Fix | Delete
[52309] Fix | Delete
var previousScrollTop = 0;
[52310] Fix | Delete
/**
[52311] Fix | Delete
* Locks and unlocks scroll depending on the boolean argument.
[52312] Fix | Delete
*
[52313] Fix | Delete
* @param {boolean} locked Whether or not scroll should be locked.
[52314] Fix | Delete
*/
[52315] Fix | Delete
[52316] Fix | Delete
function setLocked(locked) {
[52317] Fix | Delete
var scrollingElement = htmlDocument.scrollingElement || htmlDocument.body;
[52318] Fix | Delete
[52319] Fix | Delete
if (locked) {
[52320] Fix | Delete
previousScrollTop = scrollingElement.scrollTop;
[52321] Fix | Delete
}
[52322] Fix | Delete
[52323] Fix | Delete
var methodName = locked ? 'add' : 'remove';
[52324] Fix | Delete
scrollingElement.classList[methodName](className); // Adding the class to the document element seems to be necessary in iOS.
[52325] Fix | Delete
[52326] Fix | Delete
htmlDocument.documentElement.classList[methodName](className);
[52327] Fix | Delete
[52328] Fix | Delete
if (!locked) {
[52329] Fix | Delete
scrollingElement.scrollTop = previousScrollTop;
[52330] Fix | Delete
}
[52331] Fix | Delete
}
[52332] Fix | Delete
/**
[52333] Fix | Delete
* Requests scroll lock.
[52334] Fix | Delete
*
[52335] Fix | Delete
* This function tracks requests for scroll lock. It locks scroll on the first
[52336] Fix | Delete
* request and counts each request so `releaseLock` can unlock scroll when
[52337] Fix | Delete
* all requests have been released.
[52338] Fix | Delete
*/
[52339] Fix | Delete
[52340] Fix | Delete
[52341] Fix | Delete
function requestLock() {
[52342] Fix | Delete
if (lockCounter === 0) {
[52343] Fix | Delete
setLocked(true);
[52344] Fix | Delete
}
[52345] Fix | Delete
[52346] Fix | Delete
++lockCounter;
[52347] Fix | Delete
}
[52348] Fix | Delete
/**
[52349] Fix | Delete
* Releases a request for scroll lock.
[52350] Fix | Delete
*
[52351] Fix | Delete
* This function tracks released requests for scroll lock. When all requests
[52352] Fix | Delete
* have been released, it unlocks scroll.
[52353] Fix | Delete
*/
[52354] Fix | Delete
[52355] Fix | Delete
[52356] Fix | Delete
function releaseLock() {
[52357] Fix | Delete
if (lockCounter === 1) {
[52358] Fix | Delete
setLocked(false);
[52359] Fix | Delete
}
[52360] Fix | Delete
[52361] Fix | Delete
--lockCounter;
[52362] Fix | Delete
}
[52363] Fix | Delete
[52364] Fix | Delete
return /*#__PURE__*/function (_Component) {
[52365] Fix | Delete
Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ScrollLock, _Component);
[52366] Fix | Delete
[52367] Fix | Delete
var _super = _createSuper(ScrollLock);
[52368] Fix | Delete
[52369] Fix | Delete
function ScrollLock() {
[52370] Fix | Delete
Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, ScrollLock);
[52371] Fix | Delete
[52372] Fix | Delete
return _super.apply(this, arguments);
[52373] Fix | Delete
}
[52374] Fix | Delete
[52375] Fix | Delete
Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(ScrollLock, [{
[52376] Fix | Delete
key: "componentDidMount",
[52377] Fix | Delete
[52378] Fix | Delete
/**
[52379] Fix | Delete
* Requests scroll lock on mount.
[52380] Fix | Delete
*/
[52381] Fix | Delete
value: function componentDidMount() {
[52382] Fix | Delete
requestLock();
[52383] Fix | Delete
}
[52384] Fix | Delete
/**
[52385] Fix | Delete
* Releases scroll lock before unmount.
[52386] Fix | Delete
*/
[52387] Fix | Delete
[52388] Fix | Delete
}, {
[52389] Fix | Delete
key: "componentWillUnmount",
[52390] Fix | Delete
value: function componentWillUnmount() {
[52391] Fix | Delete
releaseLock();
[52392] Fix | Delete
}
[52393] Fix | Delete
/**
[52394] Fix | Delete
* Render nothing as this component is merely a way to declare scroll lock.
[52395] Fix | Delete
*
[52396] Fix | Delete
* @return {null} Render nothing by returning `null`.
[52397] Fix | Delete
*/
[52398] Fix | Delete
[52399] Fix | Delete
}, {
[52400] Fix | Delete
key: "render",
[52401] Fix | Delete
value: function render() {
[52402] Fix | Delete
return null;
[52403] Fix | Delete
}
[52404] Fix | Delete
}]);
[52405] Fix | Delete
[52406] Fix | Delete
return ScrollLock;
[52407] Fix | Delete
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]);
[52408] Fix | Delete
}
[52409] Fix | Delete
/* harmony default export */ __webpack_exports__["a"] = (createScrollLockComponent());
[52410] Fix | Delete
[52411] Fix | Delete
[52412] Fix | Delete
/***/ }),
[52413] Fix | Delete
[52414] Fix | Delete
/***/ "kA6J":
[52415] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[52416] Fix | Delete
[52417] Fix | Delete
"use strict";
[52418] Fix | Delete
/* unused harmony export Button */
[52419] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14");
[52420] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Ff2n");
[52421] Fix | Delete
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("GRId");
[52422] Fix | Delete
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
[52423] Fix | Delete
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("TSYQ");
[52424] Fix | Delete
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
[52425] Fix | Delete
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("YLtl");
[52426] Fix | Delete
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
[52427] Fix | Delete
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("NMb1");
[52428] Fix | Delete
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__);
[52429] Fix | Delete
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("W/NR");
[52430] Fix | Delete
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("9VDH");
[52431] Fix | Delete
/* harmony import */ var _visually_hidden__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ldlY");
[52432] Fix | Delete
[52433] Fix | Delete
[52434] Fix | Delete
[52435] Fix | Delete
[52436] Fix | Delete
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
[52437] Fix | Delete
[52438] Fix | Delete
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
[52439] Fix | Delete
[52440] Fix | Delete
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
[52441] Fix | Delete
[52442] Fix | Delete
/**
[52443] Fix | Delete
* External dependencies
[52444] Fix | Delete
*/
[52445] Fix | Delete
[52446] Fix | Delete
[52447] Fix | Delete
/**
[52448] Fix | Delete
* WordPress dependencies
[52449] Fix | Delete
*/
[52450] Fix | Delete
[52451] Fix | Delete
[52452] Fix | Delete
[52453] Fix | Delete
/**
[52454] Fix | Delete
* Internal dependencies
[52455] Fix | Delete
*/
[52456] Fix | Delete
[52457] Fix | Delete
[52458] Fix | Delete
[52459] Fix | Delete
[52460] Fix | Delete
var disabledEventsOnDisabledButton = ['onMouseDown', 'onClick'];
[52461] Fix | Delete
function Button(props, ref) {
[52462] Fix | Delete
var href = props.href,
[52463] Fix | Delete
target = props.target,
[52464] Fix | Delete
isPrimary = props.isPrimary,
[52465] Fix | Delete
isSmall = props.isSmall,
[52466] Fix | Delete
isTertiary = props.isTertiary,
[52467] Fix | Delete
isPressed = props.isPressed,
[52468] Fix | Delete
isBusy = props.isBusy,
[52469] Fix | Delete
isDefault = props.isDefault,
[52470] Fix | Delete
isSecondary = props.isSecondary,
[52471] Fix | Delete
isLink = props.isLink,
[52472] Fix | Delete
isDestructive = props.isDestructive,
[52473] Fix | Delete
className = props.className,
[52474] Fix | Delete
disabled = props.disabled,
[52475] Fix | Delete
icon = props.icon,
[52476] Fix | Delete
_props$iconPosition = props.iconPosition,
[52477] Fix | Delete
iconPosition = _props$iconPosition === void 0 ? 'left' : _props$iconPosition,
[52478] Fix | Delete
iconSize = props.iconSize,
[52479] Fix | Delete
showTooltip = props.showTooltip,
[52480] Fix | Delete
tooltipPosition = props.tooltipPosition,
[52481] Fix | Delete
shortcut = props.shortcut,
[52482] Fix | Delete
label = props.label,
[52483] Fix | Delete
children = props.children,
[52484] Fix | Delete
text = props.text,
[52485] Fix | Delete
isFocusable = props.__experimentalIsFocusable,
[52486] Fix | Delete
describedBy = props.describedBy,
[52487] Fix | Delete
additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ["href", "target", "isPrimary", "isSmall", "isTertiary", "isPressed", "isBusy", "isDefault", "isSecondary", "isLink", "isDestructive", "className", "disabled", "icon", "iconPosition", "iconSize", "showTooltip", "tooltipPosition", "shortcut", "label", "children", "text", "__experimentalIsFocusable", "describedBy"]);
[52488] Fix | Delete
[52489] Fix | Delete
if (isDefault) {
[52490] Fix | Delete
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default()('Button isDefault prop', {
[52491] Fix | Delete
alternative: 'isSecondary'
[52492] Fix | Delete
});
[52493] Fix | Delete
}
[52494] Fix | Delete
[52495] Fix | Delete
var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('components-button', className, {
[52496] Fix | Delete
'is-secondary': isDefault || isSecondary,
[52497] Fix | Delete
'is-primary': isPrimary,
[52498] Fix | Delete
'is-small': isSmall,
[52499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function