Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onPulloutTypeChange(pulloutType) {
const model = this.props.model.with({
pulloutType: pulloutType === ''
? Maybe.nothing()
: Maybe.just(pulloutType),
});
this.props.onEdit(model, model);
}
const defaults = (params: Partial = {}) => ({
contentType: 'Multipanel',
elementType: 'multipanel',
guid: params.guid || createGuid(),
id: params.id || toContentId(createGuid()),
purpose: params.purpose || Maybe.nothing(),
title: params.title || Maybe.nothing(),
imageHotspot: params.imageHotspot || new ImageHotspot(),
panels: params.panels || Immutable.List(),
introPanelRef: params.introPanelRef || Maybe.nothing(),
inline: params.inline || new WbInline(),
});
const defaults = (params: Partial = {}) => ({
contentType: 'Panel',
elementType: 'panel',
guid: params.guid || toContentId(createGuid()),
id: params.id || createGuid(),
title: params.title || Maybe.nothing(),
content: params.content || ContentElements.fromText(
'', createGuid(), [...INLINE_ELEMENTS, ...CONTROL_ELEMENTS]),
});
const defaults = (params: Partial = {}) => ({
contentType: 'ImageHotspot',
elementType: 'image_hotspot',
guid: params.guid || createGuid(),
id: params.id || toContentId(createGuid()),
src: params.src || 'NO_IMAGE_SELECTED',
alt: params.alt || '',
width: params.width || 600,
height: params.height || 400,
visibility: params.visibility || Maybe.nothing(),
hotspots: params.hotspots || Immutable.OrderedMap(),
});
const defaults = (params: Partial = {}) => ({
requestedDataSetId: params.requestedDataSetId || Maybe.nothing(),
dataSet: params.dataSet || Maybe.nothing(),
});
static fromPersistence(root: Object, guid: string, notify: () => void) : Translation {
const t = (root as any).translation;
const id = t['@id']
? t['@id']
: (notify(), createGuid());
const title = t['@title'] !== undefined
? Maybe.just(t['@title'])
: Maybe.nothing();
return new Translation({
guid,
content: ContentElements.fromPersistence(t, '', INLINE_ELEMENTS, null, notify),
id,
title,
});
}
constructor(props) {
super(props);
this.state = { previewUrl: Maybe.nothing() };
this.timerId = Maybe.nothing();
}
constructor(props: StyledComponentProps) {
super(props);
this.state = {
collapsed: false,
showOrgDropdown: false,
isResizing: false,
resizeStart: 0,
width: Maybe.nothing(),
newWidth: Maybe.nothing(),
};
}
constructor(props) {
super(props);
this.state = { previewUrl: Maybe.nothing() };
this.timerId = Maybe.nothing();
}
constructor(props) {
super(props);
this.state = { courses: Maybe.nothing() };
this.createCourse = this.createCourse.bind(this);
this.onSelect = (id) => {
this.props.dispatch(viewActions.viewCourse(id));
};
}