Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
incrementIcon,
decrementIcon,
theme,
ButtonIcon,
SteppableInput,
dateFormatType,
value: { day, month, year },
} = this.props;
const yearClassName = this.getSectionClassName(ActiveSection.Year);
// check if "X" clear button should be visible - at least one part of date should be set
const onClear = isSome(day) || isSome(month) || isSome(year) ? this.onClear : undefined;
const innerClassName = classnames(theme.inner, {
[theme.inner_isFilled as string]: isSome(day) && isSome(month) && isSome(year),
});
return (
clearIcon,
calendarIcon,
Calendar,
incrementIcon,
decrementIcon,
theme,
ButtonIcon,
SteppableInput,
dateFormatType,
value: { day, month, year },
} = this.props;
const yearClassName = this.getSectionClassName(ActiveSection.Year);
// check if "X" clear button should be visible - at least one part of date should be set
const onClear = isSome(day) || isSome(month) || isSome(year) ? this.onClear : undefined;
const innerClassName = classnames(theme.inner, {
[theme.inner_isFilled as string]: isSome(day) && isSome(month) && isSome(year),
});
return (
function reduceServicesToVisibleServices(
visibleServicesObj: StrMap,
service: RetrievedService
): StrMap {
// we use an in-memory object (map)
// to temporary store visible services
const maybeVisibleService = lookup(service.serviceId, visibleServicesObj);
if (
!service.isVisible &&
isSome(maybeVisibleService) &&
service.version > maybeVisibleService.value.version
) {
// if the service is not visible anymore
// delete it from the visible services list
return remove(service.serviceId, visibleServicesObj);
} else if (
// if the service is visible and we don't have a related
// cached visible service yet...
service.isVisible &&
(isNone(maybeVisibleService) ||
// ... or if the updated service is visible and the version
// is greater than the stored version of the cached visible service
service.version > maybeVisibleService.value.version)
) {
// store the visible service into the object (map)
return insert(
activeSection: Section.PeriodType,
});
}
this.secondInput = false;
} else {
this.secondInput = true;
}
this.updateTime(hours, some(newMinutes), seconds, periodType);
}
}
break;
}
case Section.Seconds: {
let newSeconds;
if (this.secondInput) {
newSeconds = isSome(seconds) ? Number(`${seconds.value % 10}${digit}`) : digit;
} else {
newSeconds = digit;
this.secondInput = true;
}
this.updateTime(hours, minutes, some(newSeconds), periodType);
break;
}
}
}
.bindL("ret", ({ res }) =>
isSome(res.body)
? T.completed((res.body.value as RPCResponse).value)
: T.raiseError(new Error("empty response"))
)
ObservableCache.prototype.emitLoadingEvent = function (a) {
this.log('emitting LOADING event for %o', a);
var subject = this.getSubject(a);
if (Option_1.isSome(subject.value.data)) {
subject.next(new CacheEvent(true, subject.value.data));
}
else {
subject.next(LOADING);
}
};
ObservableCache.prototype.emitPayloadEvent = function (a, p) {
.filter(g => isSome(g))
.map(g => (g as Some).value)
function isWhitelisted({ whitelistedHosts }: ActionsKibanaConfig, hostname: string): boolean {
return (
Array.isArray(whitelistedHosts) &&
isSome(
fromNullable(
whitelistedHosts.find(
whitelistedHostname =>
doesValueWhitelistAnyHostname(whitelistedHostname) || whitelistedHostname === hostname
)
)
)
);
}
listen(f: FunctionN<[A], void>): Lazy {
if (o.isSome(this.completed)) {
f(this.completed.value);
}
this.listeners.push(f);
return () => {
this.listeners = this.listeners.filter(cb => cb !== f);
};
}
}