Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: components.js
[65000] Fix | Delete
[65001] Fix | Delete
[65002] Fix | Delete
function UnforwardedRadioGroup({
[65003] Fix | Delete
label,
[65004] Fix | Delete
checked,
[65005] Fix | Delete
defaultChecked,
[65006] Fix | Delete
disabled,
[65007] Fix | Delete
onChange,
[65008] Fix | Delete
children,
[65009] Fix | Delete
...props
[65010] Fix | Delete
}, ref) {
[65011] Fix | Delete
const radioStore = useRadioStore({
[65012] Fix | Delete
value: checked,
[65013] Fix | Delete
defaultValue: defaultChecked,
[65014] Fix | Delete
setValue: newValue => {
[65015] Fix | Delete
onChange?.(newValue !== null && newValue !== void 0 ? newValue : undefined);
[65016] Fix | Delete
}
[65017] Fix | Delete
});
[65018] Fix | Delete
const contextValue = (0,external_wp_element_namespaceObject.useMemo)(() => ({
[65019] Fix | Delete
store: radioStore,
[65020] Fix | Delete
disabled
[65021] Fix | Delete
}), [radioStore, disabled]);
[65022] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RadioGroupContext.Provider, {
[65023] Fix | Delete
value: contextValue,
[65024] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RadioGroup, {
[65025] Fix | Delete
store: radioStore,
[65026] Fix | Delete
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(button_group, {
[65027] Fix | Delete
children: children
[65028] Fix | Delete
}),
[65029] Fix | Delete
"aria-label": label,
[65030] Fix | Delete
ref: ref,
[65031] Fix | Delete
...props
[65032] Fix | Delete
})
[65033] Fix | Delete
});
[65034] Fix | Delete
}
[65035] Fix | Delete
[65036] Fix | Delete
/**
[65037] Fix | Delete
* @deprecated Use `RadioControl` or `ToggleGroupControl` instead.
[65038] Fix | Delete
*/
[65039] Fix | Delete
const radio_group_RadioGroup = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedRadioGroup);
[65040] Fix | Delete
/* harmony default export */ const radio_group = (radio_group_RadioGroup);
[65041] Fix | Delete
[65042] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/radio-control/index.js
[65043] Fix | Delete
/**
[65044] Fix | Delete
* External dependencies
[65045] Fix | Delete
*/
[65046] Fix | Delete
[65047] Fix | Delete
/**
[65048] Fix | Delete
* WordPress dependencies
[65049] Fix | Delete
*/
[65050] Fix | Delete
[65051] Fix | Delete
[65052] Fix | Delete
/**
[65053] Fix | Delete
* Internal dependencies
[65054] Fix | Delete
*/
[65055] Fix | Delete
[65056] Fix | Delete
[65057] Fix | Delete
[65058] Fix | Delete
/**
[65059] Fix | Delete
* Render a user interface to select the user type using radio inputs.
[65060] Fix | Delete
*
[65061] Fix | Delete
* ```jsx
[65062] Fix | Delete
* import { RadioControl } from '@wordpress/components';
[65063] Fix | Delete
* import { useState } from '@wordpress/element';
[65064] Fix | Delete
*
[65065] Fix | Delete
* const MyRadioControl = () => {
[65066] Fix | Delete
* const [ option, setOption ] = useState( 'a' );
[65067] Fix | Delete
*
[65068] Fix | Delete
* return (
[65069] Fix | Delete
* <RadioControl
[65070] Fix | Delete
* label="User type"
[65071] Fix | Delete
* help="The type of the current user"
[65072] Fix | Delete
* selected={ option }
[65073] Fix | Delete
* options={ [
[65074] Fix | Delete
* { label: 'Author', value: 'a' },
[65075] Fix | Delete
* { label: 'Editor', value: 'e' },
[65076] Fix | Delete
* ] }
[65077] Fix | Delete
* onChange={ ( value ) => setOption( value ) }
[65078] Fix | Delete
* />
[65079] Fix | Delete
* );
[65080] Fix | Delete
* };
[65081] Fix | Delete
* ```
[65082] Fix | Delete
*/
[65083] Fix | Delete
[65084] Fix | Delete
[65085] Fix | Delete
function RadioControl(props) {
[65086] Fix | Delete
const {
[65087] Fix | Delete
label,
[65088] Fix | Delete
className,
[65089] Fix | Delete
selected,
[65090] Fix | Delete
help,
[65091] Fix | Delete
onChange,
[65092] Fix | Delete
hideLabelFromVision,
[65093] Fix | Delete
options = [],
[65094] Fix | Delete
...additionalProps
[65095] Fix | Delete
} = props;
[65096] Fix | Delete
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(RadioControl);
[65097] Fix | Delete
const id = `inspector-radio-control-${instanceId}`;
[65098] Fix | Delete
const onChangeValue = event => onChange(event.target.value);
[65099] Fix | Delete
if (!options?.length) {
[65100] Fix | Delete
return null;
[65101] Fix | Delete
}
[65102] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(base_control, {
[65103] Fix | Delete
__nextHasNoMarginBottom: true,
[65104] Fix | Delete
label: label,
[65105] Fix | Delete
id: id,
[65106] Fix | Delete
hideLabelFromVision: hideLabelFromVision,
[65107] Fix | Delete
help: help,
[65108] Fix | Delete
className: dist_clsx(className, 'components-radio-control'),
[65109] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(v_stack_component, {
[65110] Fix | Delete
spacing: 1,
[65111] Fix | Delete
children: options.map((option, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[65112] Fix | Delete
className: "components-radio-control__option",
[65113] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
[65114] Fix | Delete
id: `${id}-${index}`,
[65115] Fix | Delete
className: "components-radio-control__input",
[65116] Fix | Delete
type: "radio",
[65117] Fix | Delete
name: id,
[65118] Fix | Delete
value: option.value,
[65119] Fix | Delete
onChange: onChangeValue,
[65120] Fix | Delete
checked: option.value === selected,
[65121] Fix | Delete
"aria-describedby": !!help ? `${id}__help` : undefined,
[65122] Fix | Delete
...additionalProps
[65123] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("label", {
[65124] Fix | Delete
className: "components-radio-control__label",
[65125] Fix | Delete
htmlFor: `${id}-${index}`,
[65126] Fix | Delete
children: option.label
[65127] Fix | Delete
})]
[65128] Fix | Delete
}, `${id}-${index}`))
[65129] Fix | Delete
})
[65130] Fix | Delete
});
[65131] Fix | Delete
}
[65132] Fix | Delete
/* harmony default export */ const radio_control = (RadioControl);
[65133] Fix | Delete
[65134] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/re-resizable/lib/resizer.js
[65135] Fix | Delete
var resizer_extends = (undefined && undefined.__extends) || (function () {
[65136] Fix | Delete
var extendStatics = function (d, b) {
[65137] Fix | Delete
extendStatics = Object.setPrototypeOf ||
[65138] Fix | Delete
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
[65139] Fix | Delete
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
[65140] Fix | Delete
return extendStatics(d, b);
[65141] Fix | Delete
};
[65142] Fix | Delete
return function (d, b) {
[65143] Fix | Delete
extendStatics(d, b);
[65144] Fix | Delete
function __() { this.constructor = d; }
[65145] Fix | Delete
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
[65146] Fix | Delete
};
[65147] Fix | Delete
})();
[65148] Fix | Delete
var resizer_assign = (undefined && undefined.__assign) || function () {
[65149] Fix | Delete
resizer_assign = Object.assign || function(t) {
[65150] Fix | Delete
for (var s, i = 1, n = arguments.length; i < n; i++) {
[65151] Fix | Delete
s = arguments[i];
[65152] Fix | Delete
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
[65153] Fix | Delete
t[p] = s[p];
[65154] Fix | Delete
}
[65155] Fix | Delete
return t;
[65156] Fix | Delete
};
[65157] Fix | Delete
return resizer_assign.apply(this, arguments);
[65158] Fix | Delete
};
[65159] Fix | Delete
[65160] Fix | Delete
var rowSizeBase = {
[65161] Fix | Delete
width: '100%',
[65162] Fix | Delete
height: '10px',
[65163] Fix | Delete
top: '0px',
[65164] Fix | Delete
left: '0px',
[65165] Fix | Delete
cursor: 'row-resize',
[65166] Fix | Delete
};
[65167] Fix | Delete
var colSizeBase = {
[65168] Fix | Delete
width: '10px',
[65169] Fix | Delete
height: '100%',
[65170] Fix | Delete
top: '0px',
[65171] Fix | Delete
left: '0px',
[65172] Fix | Delete
cursor: 'col-resize',
[65173] Fix | Delete
};
[65174] Fix | Delete
var edgeBase = {
[65175] Fix | Delete
width: '20px',
[65176] Fix | Delete
height: '20px',
[65177] Fix | Delete
position: 'absolute',
[65178] Fix | Delete
};
[65179] Fix | Delete
var resizer_styles = {
[65180] Fix | Delete
top: resizer_assign(resizer_assign({}, rowSizeBase), { top: '-5px' }),
[65181] Fix | Delete
right: resizer_assign(resizer_assign({}, colSizeBase), { left: undefined, right: '-5px' }),
[65182] Fix | Delete
bottom: resizer_assign(resizer_assign({}, rowSizeBase), { top: undefined, bottom: '-5px' }),
[65183] Fix | Delete
left: resizer_assign(resizer_assign({}, colSizeBase), { left: '-5px' }),
[65184] Fix | Delete
topRight: resizer_assign(resizer_assign({}, edgeBase), { right: '-10px', top: '-10px', cursor: 'ne-resize' }),
[65185] Fix | Delete
bottomRight: resizer_assign(resizer_assign({}, edgeBase), { right: '-10px', bottom: '-10px', cursor: 'se-resize' }),
[65186] Fix | Delete
bottomLeft: resizer_assign(resizer_assign({}, edgeBase), { left: '-10px', bottom: '-10px', cursor: 'sw-resize' }),
[65187] Fix | Delete
topLeft: resizer_assign(resizer_assign({}, edgeBase), { left: '-10px', top: '-10px', cursor: 'nw-resize' }),
[65188] Fix | Delete
};
[65189] Fix | Delete
var Resizer = /** @class */ (function (_super) {
[65190] Fix | Delete
resizer_extends(Resizer, _super);
[65191] Fix | Delete
function Resizer() {
[65192] Fix | Delete
var _this = _super !== null && _super.apply(this, arguments) || this;
[65193] Fix | Delete
_this.onMouseDown = function (e) {
[65194] Fix | Delete
_this.props.onResizeStart(e, _this.props.direction);
[65195] Fix | Delete
};
[65196] Fix | Delete
_this.onTouchStart = function (e) {
[65197] Fix | Delete
_this.props.onResizeStart(e, _this.props.direction);
[65198] Fix | Delete
};
[65199] Fix | Delete
return _this;
[65200] Fix | Delete
}
[65201] Fix | Delete
Resizer.prototype.render = function () {
[65202] Fix | Delete
return (external_React_.createElement("div", { className: this.props.className || '', style: resizer_assign(resizer_assign({ position: 'absolute', userSelect: 'none' }, resizer_styles[this.props.direction]), (this.props.replaceStyles || {})), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children));
[65203] Fix | Delete
};
[65204] Fix | Delete
return Resizer;
[65205] Fix | Delete
}(external_React_.PureComponent));
[65206] Fix | Delete
[65207] Fix | Delete
[65208] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/re-resizable/lib/index.js
[65209] Fix | Delete
var lib_extends = (undefined && undefined.__extends) || (function () {
[65210] Fix | Delete
var extendStatics = function (d, b) {
[65211] Fix | Delete
extendStatics = Object.setPrototypeOf ||
[65212] Fix | Delete
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
[65213] Fix | Delete
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
[65214] Fix | Delete
return extendStatics(d, b);
[65215] Fix | Delete
};
[65216] Fix | Delete
return function (d, b) {
[65217] Fix | Delete
extendStatics(d, b);
[65218] Fix | Delete
function __() { this.constructor = d; }
[65219] Fix | Delete
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
[65220] Fix | Delete
};
[65221] Fix | Delete
})();
[65222] Fix | Delete
var lib_assign = (undefined && undefined.__assign) || function () {
[65223] Fix | Delete
lib_assign = Object.assign || function(t) {
[65224] Fix | Delete
for (var s, i = 1, n = arguments.length; i < n; i++) {
[65225] Fix | Delete
s = arguments[i];
[65226] Fix | Delete
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
[65227] Fix | Delete
t[p] = s[p];
[65228] Fix | Delete
}
[65229] Fix | Delete
return t;
[65230] Fix | Delete
};
[65231] Fix | Delete
return lib_assign.apply(this, arguments);
[65232] Fix | Delete
};
[65233] Fix | Delete
[65234] Fix | Delete
[65235] Fix | Delete
[65236] Fix | Delete
var DEFAULT_SIZE = {
[65237] Fix | Delete
width: 'auto',
[65238] Fix | Delete
height: 'auto',
[65239] Fix | Delete
};
[65240] Fix | Delete
var lib_clamp = function (n, min, max) { return Math.max(Math.min(n, max), min); };
[65241] Fix | Delete
var snap = function (n, size) { return Math.round(n / size) * size; };
[65242] Fix | Delete
var hasDirection = function (dir, target) {
[65243] Fix | Delete
return new RegExp(dir, 'i').test(target);
[65244] Fix | Delete
};
[65245] Fix | Delete
// INFO: In case of window is a Proxy and does not porxy Events correctly, use isTouchEvent & isMouseEvent to distinguish event type instead of `instanceof`.
[65246] Fix | Delete
var isTouchEvent = function (event) {
[65247] Fix | Delete
return Boolean(event.touches && event.touches.length);
[65248] Fix | Delete
};
[65249] Fix | Delete
var isMouseEvent = function (event) {
[65250] Fix | Delete
return Boolean((event.clientX || event.clientX === 0) &&
[65251] Fix | Delete
(event.clientY || event.clientY === 0));
[65252] Fix | Delete
};
[65253] Fix | Delete
var findClosestSnap = function (n, snapArray, snapGap) {
[65254] Fix | Delete
if (snapGap === void 0) { snapGap = 0; }
[65255] Fix | Delete
var closestGapIndex = snapArray.reduce(function (prev, curr, index) { return (Math.abs(curr - n) < Math.abs(snapArray[prev] - n) ? index : prev); }, 0);
[65256] Fix | Delete
var gap = Math.abs(snapArray[closestGapIndex] - n);
[65257] Fix | Delete
return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n;
[65258] Fix | Delete
};
[65259] Fix | Delete
var getStringSize = function (n) {
[65260] Fix | Delete
n = n.toString();
[65261] Fix | Delete
if (n === 'auto') {
[65262] Fix | Delete
return n;
[65263] Fix | Delete
}
[65264] Fix | Delete
if (n.endsWith('px')) {
[65265] Fix | Delete
return n;
[65266] Fix | Delete
}
[65267] Fix | Delete
if (n.endsWith('%')) {
[65268] Fix | Delete
return n;
[65269] Fix | Delete
}
[65270] Fix | Delete
if (n.endsWith('vh')) {
[65271] Fix | Delete
return n;
[65272] Fix | Delete
}
[65273] Fix | Delete
if (n.endsWith('vw')) {
[65274] Fix | Delete
return n;
[65275] Fix | Delete
}
[65276] Fix | Delete
if (n.endsWith('vmax')) {
[65277] Fix | Delete
return n;
[65278] Fix | Delete
}
[65279] Fix | Delete
if (n.endsWith('vmin')) {
[65280] Fix | Delete
return n;
[65281] Fix | Delete
}
[65282] Fix | Delete
return n + "px";
[65283] Fix | Delete
};
[65284] Fix | Delete
var getPixelSize = function (size, parentSize, innerWidth, innerHeight) {
[65285] Fix | Delete
if (size && typeof size === 'string') {
[65286] Fix | Delete
if (size.endsWith('px')) {
[65287] Fix | Delete
return Number(size.replace('px', ''));
[65288] Fix | Delete
}
[65289] Fix | Delete
if (size.endsWith('%')) {
[65290] Fix | Delete
var ratio = Number(size.replace('%', '')) / 100;
[65291] Fix | Delete
return parentSize * ratio;
[65292] Fix | Delete
}
[65293] Fix | Delete
if (size.endsWith('vw')) {
[65294] Fix | Delete
var ratio = Number(size.replace('vw', '')) / 100;
[65295] Fix | Delete
return innerWidth * ratio;
[65296] Fix | Delete
}
[65297] Fix | Delete
if (size.endsWith('vh')) {
[65298] Fix | Delete
var ratio = Number(size.replace('vh', '')) / 100;
[65299] Fix | Delete
return innerHeight * ratio;
[65300] Fix | Delete
}
[65301] Fix | Delete
}
[65302] Fix | Delete
return size;
[65303] Fix | Delete
};
[65304] Fix | Delete
var calculateNewMax = function (parentSize, innerWidth, innerHeight, maxWidth, maxHeight, minWidth, minHeight) {
[65305] Fix | Delete
maxWidth = getPixelSize(maxWidth, parentSize.width, innerWidth, innerHeight);
[65306] Fix | Delete
maxHeight = getPixelSize(maxHeight, parentSize.height, innerWidth, innerHeight);
[65307] Fix | Delete
minWidth = getPixelSize(minWidth, parentSize.width, innerWidth, innerHeight);
[65308] Fix | Delete
minHeight = getPixelSize(minHeight, parentSize.height, innerWidth, innerHeight);
[65309] Fix | Delete
return {
[65310] Fix | Delete
maxWidth: typeof maxWidth === 'undefined' ? undefined : Number(maxWidth),
[65311] Fix | Delete
maxHeight: typeof maxHeight === 'undefined' ? undefined : Number(maxHeight),
[65312] Fix | Delete
minWidth: typeof minWidth === 'undefined' ? undefined : Number(minWidth),
[65313] Fix | Delete
minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),
[65314] Fix | Delete
};
[65315] Fix | Delete
};
[65316] Fix | Delete
var definedProps = [
[65317] Fix | Delete
'as',
[65318] Fix | Delete
'style',
[65319] Fix | Delete
'className',
[65320] Fix | Delete
'grid',
[65321] Fix | Delete
'snap',
[65322] Fix | Delete
'bounds',
[65323] Fix | Delete
'boundsByDirection',
[65324] Fix | Delete
'size',
[65325] Fix | Delete
'defaultSize',
[65326] Fix | Delete
'minWidth',
[65327] Fix | Delete
'minHeight',
[65328] Fix | Delete
'maxWidth',
[65329] Fix | Delete
'maxHeight',
[65330] Fix | Delete
'lockAspectRatio',
[65331] Fix | Delete
'lockAspectRatioExtraWidth',
[65332] Fix | Delete
'lockAspectRatioExtraHeight',
[65333] Fix | Delete
'enable',
[65334] Fix | Delete
'handleStyles',
[65335] Fix | Delete
'handleClasses',
[65336] Fix | Delete
'handleWrapperStyle',
[65337] Fix | Delete
'handleWrapperClass',
[65338] Fix | Delete
'children',
[65339] Fix | Delete
'onResizeStart',
[65340] Fix | Delete
'onResize',
[65341] Fix | Delete
'onResizeStop',
[65342] Fix | Delete
'handleComponent',
[65343] Fix | Delete
'scale',
[65344] Fix | Delete
'resizeRatio',
[65345] Fix | Delete
'snapGap',
[65346] Fix | Delete
];
[65347] Fix | Delete
// HACK: This class is used to calculate % size.
[65348] Fix | Delete
var baseClassName = '__resizable_base__';
[65349] Fix | Delete
var Resizable = /** @class */ (function (_super) {
[65350] Fix | Delete
lib_extends(Resizable, _super);
[65351] Fix | Delete
function Resizable(props) {
[65352] Fix | Delete
var _this = _super.call(this, props) || this;
[65353] Fix | Delete
_this.ratio = 1;
[65354] Fix | Delete
_this.resizable = null;
[65355] Fix | Delete
// For parent boundary
[65356] Fix | Delete
_this.parentLeft = 0;
[65357] Fix | Delete
_this.parentTop = 0;
[65358] Fix | Delete
// For boundary
[65359] Fix | Delete
_this.resizableLeft = 0;
[65360] Fix | Delete
_this.resizableRight = 0;
[65361] Fix | Delete
_this.resizableTop = 0;
[65362] Fix | Delete
_this.resizableBottom = 0;
[65363] Fix | Delete
// For target boundary
[65364] Fix | Delete
_this.targetLeft = 0;
[65365] Fix | Delete
_this.targetTop = 0;
[65366] Fix | Delete
_this.appendBase = function () {
[65367] Fix | Delete
if (!_this.resizable || !_this.window) {
[65368] Fix | Delete
return null;
[65369] Fix | Delete
}
[65370] Fix | Delete
var parent = _this.parentNode;
[65371] Fix | Delete
if (!parent) {
[65372] Fix | Delete
return null;
[65373] Fix | Delete
}
[65374] Fix | Delete
var element = _this.window.document.createElement('div');
[65375] Fix | Delete
element.style.width = '100%';
[65376] Fix | Delete
element.style.height = '100%';
[65377] Fix | Delete
element.style.position = 'absolute';
[65378] Fix | Delete
element.style.transform = 'scale(0, 0)';
[65379] Fix | Delete
element.style.left = '0';
[65380] Fix | Delete
element.style.flex = '0 0 100%';
[65381] Fix | Delete
if (element.classList) {
[65382] Fix | Delete
element.classList.add(baseClassName);
[65383] Fix | Delete
}
[65384] Fix | Delete
else {
[65385] Fix | Delete
element.className += baseClassName;
[65386] Fix | Delete
}
[65387] Fix | Delete
parent.appendChild(element);
[65388] Fix | Delete
return element;
[65389] Fix | Delete
};
[65390] Fix | Delete
_this.removeBase = function (base) {
[65391] Fix | Delete
var parent = _this.parentNode;
[65392] Fix | Delete
if (!parent) {
[65393] Fix | Delete
return;
[65394] Fix | Delete
}
[65395] Fix | Delete
parent.removeChild(base);
[65396] Fix | Delete
};
[65397] Fix | Delete
_this.ref = function (c) {
[65398] Fix | Delete
if (c) {
[65399] Fix | Delete
_this.resizable = c;
[65400] Fix | Delete
}
[65401] Fix | Delete
};
[65402] Fix | Delete
_this.state = {
[65403] Fix | Delete
isResizing: false,
[65404] Fix | Delete
width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'
[65405] Fix | Delete
? 'auto'
[65406] Fix | Delete
: _this.propsSize && _this.propsSize.width,
[65407] Fix | Delete
height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'
[65408] Fix | Delete
? 'auto'
[65409] Fix | Delete
: _this.propsSize && _this.propsSize.height,
[65410] Fix | Delete
direction: 'right',
[65411] Fix | Delete
original: {
[65412] Fix | Delete
x: 0,
[65413] Fix | Delete
y: 0,
[65414] Fix | Delete
width: 0,
[65415] Fix | Delete
height: 0,
[65416] Fix | Delete
},
[65417] Fix | Delete
backgroundStyle: {
[65418] Fix | Delete
height: '100%',
[65419] Fix | Delete
width: '100%',
[65420] Fix | Delete
backgroundColor: 'rgba(0,0,0,0)',
[65421] Fix | Delete
cursor: 'auto',
[65422] Fix | Delete
opacity: 0,
[65423] Fix | Delete
position: 'fixed',
[65424] Fix | Delete
zIndex: 9999,
[65425] Fix | Delete
top: '0',
[65426] Fix | Delete
left: '0',
[65427] Fix | Delete
bottom: '0',
[65428] Fix | Delete
right: '0',
[65429] Fix | Delete
},
[65430] Fix | Delete
flexBasis: undefined,
[65431] Fix | Delete
};
[65432] Fix | Delete
_this.onResizeStart = _this.onResizeStart.bind(_this);
[65433] Fix | Delete
_this.onMouseMove = _this.onMouseMove.bind(_this);
[65434] Fix | Delete
_this.onMouseUp = _this.onMouseUp.bind(_this);
[65435] Fix | Delete
return _this;
[65436] Fix | Delete
}
[65437] Fix | Delete
Object.defineProperty(Resizable.prototype, "parentNode", {
[65438] Fix | Delete
get: function () {
[65439] Fix | Delete
if (!this.resizable) {
[65440] Fix | Delete
return null;
[65441] Fix | Delete
}
[65442] Fix | Delete
return this.resizable.parentNode;
[65443] Fix | Delete
},
[65444] Fix | Delete
enumerable: false,
[65445] Fix | Delete
configurable: true
[65446] Fix | Delete
});
[65447] Fix | Delete
Object.defineProperty(Resizable.prototype, "window", {
[65448] Fix | Delete
get: function () {
[65449] Fix | Delete
if (!this.resizable) {
[65450] Fix | Delete
return null;
[65451] Fix | Delete
}
[65452] Fix | Delete
if (!this.resizable.ownerDocument) {
[65453] Fix | Delete
return null;
[65454] Fix | Delete
}
[65455] Fix | Delete
return this.resizable.ownerDocument.defaultView;
[65456] Fix | Delete
},
[65457] Fix | Delete
enumerable: false,
[65458] Fix | Delete
configurable: true
[65459] Fix | Delete
});
[65460] Fix | Delete
Object.defineProperty(Resizable.prototype, "propsSize", {
[65461] Fix | Delete
get: function () {
[65462] Fix | Delete
return this.props.size || this.props.defaultSize || DEFAULT_SIZE;
[65463] Fix | Delete
},
[65464] Fix | Delete
enumerable: false,
[65465] Fix | Delete
configurable: true
[65466] Fix | Delete
});
[65467] Fix | Delete
Object.defineProperty(Resizable.prototype, "size", {
[65468] Fix | Delete
get: function () {
[65469] Fix | Delete
var width = 0;
[65470] Fix | Delete
var height = 0;
[65471] Fix | Delete
if (this.resizable && this.window) {
[65472] Fix | Delete
var orgWidth = this.resizable.offsetWidth;
[65473] Fix | Delete
var orgHeight = this.resizable.offsetHeight;
[65474] Fix | Delete
// HACK: Set position `relative` to get parent size.
[65475] Fix | Delete
// This is because when re-resizable set `absolute`, I can not get base width correctly.
[65476] Fix | Delete
var orgPosition = this.resizable.style.position;
[65477] Fix | Delete
if (orgPosition !== 'relative') {
[65478] Fix | Delete
this.resizable.style.position = 'relative';
[65479] Fix | Delete
}
[65480] Fix | Delete
// INFO: Use original width or height if set auto.
[65481] Fix | Delete
width = this.resizable.style.width !== 'auto' ? this.resizable.offsetWidth : orgWidth;
[65482] Fix | Delete
height = this.resizable.style.height !== 'auto' ? this.resizable.offsetHeight : orgHeight;
[65483] Fix | Delete
// Restore original position
[65484] Fix | Delete
this.resizable.style.position = orgPosition;
[65485] Fix | Delete
}
[65486] Fix | Delete
return { width: width, height: height };
[65487] Fix | Delete
},
[65488] Fix | Delete
enumerable: false,
[65489] Fix | Delete
configurable: true
[65490] Fix | Delete
});
[65491] Fix | Delete
Object.defineProperty(Resizable.prototype, "sizeStyle", {
[65492] Fix | Delete
get: function () {
[65493] Fix | Delete
var _this = this;
[65494] Fix | Delete
var size = this.props.size;
[65495] Fix | Delete
var getSize = function (key) {
[65496] Fix | Delete
if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {
[65497] Fix | Delete
return 'auto';
[65498] Fix | Delete
}
[65499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function