Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// make sure react doesn't needlessly detach and re-attach this effect. In practice this
// seems to cause troubles
undefined
// [navigation.state.key]
);
}
exports.useNavigationEvents = useNavigationEvents;
var emptyFocusState = {
isFocused: false,
isBlurring: false,
isBlurred: false,
isFocusing: false,
};
var didFocusState = tslib_1.__assign({}, emptyFocusState, { isFocused: true });
var willBlurState = tslib_1.__assign({}, emptyFocusState, { isBlurring: true });
var didBlurState = tslib_1.__assign({}, emptyFocusState, { isBlurred: true });
var willFocusState = tslib_1.__assign({}, emptyFocusState, { isFocusing: true });
var getInitialFocusState = function (isFocused) {
return isFocused ? didFocusState : didBlurState;
};
function focusStateOfEvent(eventName) {
switch (eventName) {
case 'didFocus':
return didFocusState;
case 'willFocus':
return willFocusState;
case 'willBlur':
return willBlurState;
case 'didBlur':
return didBlurState;
default:
return null;
var actualFragmentName = fragmentName;
var fragments = [];
document.definitions.forEach(function (definition) {
if (definition.kind === 'OperationDefinition') {
throw process.env.NODE_ENV === "production" ? new InvariantError() : new InvariantError("Found a " + definition.operation + " operation" + (definition.name ? " named '" + definition.name.value + "'" : '') + ". " +
'No operations are allowed when using a fragment as a query. Only fragments are allowed.');
}
if (definition.kind === 'FragmentDefinition') {
fragments.push(definition);
}
});
if (typeof actualFragmentName === 'undefined') {
process.env.NODE_ENV === "production" ? invariant(fragments.length === 1) : invariant(fragments.length === 1, "Found " + fragments.length + " fragments. `fragmentName` must be provided when there is not exactly 1 fragment.");
actualFragmentName = fragments[0].name.value;
}
var query = __assign({}, document, { definitions: [
{
kind: 'OperationDefinition',
operation: 'query',
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: {
kind: 'Name',
value: actualFragmentName,
},
},
],
},
}
function shallowCopyForMerge(value, pastCopies) {
if (value !== null &&
typeof value === 'object' &&
pastCopies.indexOf(value) < 0) {
if (Array.isArray(value)) {
value = value.slice(0);
}
else {
value = __assign({ __proto__: Object.getPrototypeOf(value) }, value);
}
pastCopies.push(value);
}
return value;
}
function HashHistory(props) {
if (props === void 0) { props = {}; }
var _this = this;
if (!isBrowser) {
return new MemoryHistory();
}
_this = _super.call(this, props) || this;
_this._props = props = tslib_1.__assign({ hash: '#!' }, _this._props);
_this._last = [_this.current];
window.addEventListener('hashchange', function (e) {
_this._fireChange();
});
return _this;
}
HashHistory.prototype.realPath = function (path) {
function sanitizeAction(actionSanitizer, action, actionIdx) {
return __assign(__assign({}, action), { action: actionSanitizer(action.action, actionIdx) });
}
/**
export function accountOptionsFactory(options) {
return tslib_1.__assign({ redirectUrl: '/' }, options);
}
/** @type {?} */
cursorRequest_1.onsuccess = function () {
var cursor = cursorRequest_1.result;
if (cursor) {
var value = cursor.value;
var newValue = tslib_1.__assign({}, value);
if (!value.createTime) {
newValue.createTime = Date.now();
}
if (typeof value.vapidKey === 'string') {
newValue.vapidKey = base64ToArrayBuffer(value.vapidKey);
}
if (typeof value.auth === 'string') {
newValue.auth = base64ToArrayBuffer(value.auth).buffer;
}
if (typeof value.auth === 'string') {
newValue.p256dh = base64ToArrayBuffer(value.p256dh).buffer;
}
if (typeof value.fcmPushSet === 'string') {
delete newValue.fcmPushSet;
}
cursor.update(newValue);
};
barInnerProps.onMouseLeave = function () { return _this.handleHoverLeave(); };
}
bars.push(React.createElement("rect", tslib_1.__assign({}, barInnerProps)));
ymax = ymax || "innerMax";
}
if (hasCenter) {
var level = 2;
var keyCenter = _this.series.name() + "-" + index + "-center";
var boxCenter = {
x: xInner,
y: center,
width: innerWidth,
height: 1
};
var barCenterProps = tslib_1.__assign({ key: keyCenter }, boxCenter, { style: styles[level] });
if (_this.props.onSelectionChange) {
barCenterProps.onClick = function (e) {
return _this.handleClick(e, event);
};
}
if (_this.props.onHighlightChange) {
barCenterProps.onMouseMove = function (e) {
return _this.handleHover(e, event);
};
barCenterProps.onMouseLeave = function () { return _this.handleHoverLeave(); };
}
bars.push(React.createElement("rect", tslib_1.__assign({}, barCenterProps)));
ymax = ymax || "center";
}
var isHighlighted = _this.props.highlighted && pondjs_1.Event.is(_this.props.highlighted, event);
if (isHighlighted && _this.props.info) {
var directives = [];
try {
for (var _b = tslib_1.__values(scope.directives), _c = _b.next(); !_c.done; _c = _b.next()) {
var meta = _c.value;
directives.push({ selector: meta.selector, expression: meta.directive });
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_3) throw e_3.error; }
}
var wrapDirectivesAndPipesInClosure = !!containsForwardDecls;
metadata = tslib_1.__assign({}, metadata, { directives: directives, pipes: pipes, wrapDirectivesAndPipesInClosure: wrapDirectivesAndPipesInClosure });
}
var res = compiler_1.compileComponentFromMetadata(metadata, pool, compiler_1.makeBindingParser(metadata.interpolation));
var statements = res.statements;
if (analysis.metadataStmt !== null) {
statements.push(analysis.metadataStmt);
}
return {
name: 'ngComponentDef',
initializer: res.expression, statements: statements,
type: res.type,
};
};
ComponentDecoratorHandler.prototype._resolveLiteral = function (decorator) {
function (per) {
if (clickedPermission.name === per.name) {
return __assign({}, per, { isGranted: !per.isGranted });
}
else if (clickedPermission.name === per.parentName && clickedPermission.isGranted) {
return __assign({}, per, { isGranted: false });
}
else if (clickedPermission.parentName === per.name && !clickedPermission.isGranted) {
return __assign({}, per, { isGranted: true });
}
return per;
}));
_this.setTabCheckboxState();