CCM NG: Make tslint happy
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5671 8810af33-2d31-482b-a856-94f89814c4df
parent
1b96a3c4e0
commit
9770328a07
|
|
@ -229,7 +229,7 @@ class CategorizedItemComponentPropertiesList extends React.Component<
|
|||
|
||||
{this.props.children}
|
||||
|
||||
</ContentItemComponentPropertiesList>
|
||||
</ContentItemComponentPropertiesList>;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ class CategorizedItemComponentEditorDialog extends React.Component<
|
|||
|
||||
{this.props.children}
|
||||
|
||||
</ContentItemComponentEditorDialog>
|
||||
</ContentItemComponentEditorDialog>;
|
||||
}
|
||||
|
||||
private getComponentModelProperties(): {[name: string]: any} {
|
||||
|
|
@ -271,7 +271,8 @@ class FixedContentItemComponentPropertiesList extends React.Component<
|
|||
BasicComponentModelPropertiesListProps<FixedContentItemComponent>, {}> {
|
||||
|
||||
constructor(
|
||||
props: BasicComponentModelPropertiesListProps<FixedContentItemComponent>
|
||||
props: BasicComponentModelPropertiesListProps<
|
||||
FixedContentItemComponent>,
|
||||
) {
|
||||
|
||||
super(props);
|
||||
|
|
@ -286,7 +287,7 @@ class FixedContentItemComponentPropertiesList extends React.Component<
|
|||
<dd>{this.props.component.contentItem}</dd>
|
||||
{this.props.children}
|
||||
|
||||
</ContentItemComponentPropertiesList>
|
||||
</ContentItemComponentPropertiesList>;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -301,7 +302,8 @@ class FixedContentItemComponentEditorDialog extends React.Component<
|
|||
FixedContentItemComponentEditorDialogState> {
|
||||
|
||||
constructor(
|
||||
props: BasicComponentModelEditorDialogProps<FixedContentItemComponent>
|
||||
props: BasicComponentModelEditorDialogProps<
|
||||
FixedContentItemComponent>,
|
||||
) {
|
||||
super(props);
|
||||
|
||||
|
|
@ -386,7 +388,7 @@ class GreetingItemComponentPropertiesList extends React.Component<
|
|||
|
||||
{this.props.children}
|
||||
|
||||
</ContentItemComponentPropertiesList>
|
||||
</ContentItemComponentPropertiesList>;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -415,7 +417,7 @@ class GreetingItemComponentEditorDialog extends React.Component<
|
|||
|
||||
{this.props.children}
|
||||
|
||||
</ContentItemComponentEditorDialog>
|
||||
</ContentItemComponentEditorDialog>;
|
||||
}
|
||||
|
||||
private getComponentModelProperties(): {[name: string]: any} {
|
||||
|
|
@ -424,7 +426,6 @@ class GreetingItemComponentEditorDialog extends React.Component<
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class ItemListComponentPropertiesList extends React.Component<
|
||||
BasicComponentModelPropertiesListProps<ItemListComponent>, {}> {
|
||||
|
||||
|
|
@ -644,7 +645,7 @@ ComponentModelEditor.registerEditorComponents(
|
|||
CategoryTreeComponentEditorDialog as typeof React.Component,
|
||||
propertiesList:
|
||||
CategoryTreeComponentPropertiesList as typeof React.Component,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
ComponentModelEditor.registerEditorComponents(
|
||||
|
|
@ -655,7 +656,7 @@ ComponentModelEditor.registerEditorComponents(
|
|||
ItemListComponentEditorDialog as typeof React.Component,
|
||||
propertiesList:
|
||||
ItemListComponentPropertiesList as typeof React.Component,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
ComponentModelEditor.registerEditorComponents(
|
||||
|
|
@ -666,7 +667,7 @@ ComponentModelEditor.registerEditorComponents(
|
|||
FixedContentItemComponentEditorDialog as typeof React.Component,
|
||||
propertiesList:
|
||||
FixedContentItemComponentPropertiesList as typeof React.Component,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
ComponentModelEditor.registerEditorComponents(
|
||||
|
|
@ -676,6 +677,6 @@ ComponentModelEditor.registerEditorComponents(
|
|||
editorDialog:
|
||||
GreetingItemComponentEditorDialog as typeof React.Component,
|
||||
propertiesList:
|
||||
GreetingItemComponentPropertiesList as typeof React.Component
|
||||
}
|
||||
GreetingItemComponentPropertiesList as typeof React.Component,
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -824,17 +824,21 @@ class ContainerModelComponent
|
|||
&& <div className="errorPanel">
|
||||
<ul>
|
||||
{this.state.errorMessages.map((msg, index) =>
|
||||
<li key={index}>{msg}</li>
|
||||
<li key={index}>
|
||||
{msg}
|
||||
</li>,
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
<div className="components-list">
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<label htmlFor={`${this.props.container.key}_add_component_type`}>
|
||||
<label htmlFor={`${this.props.container.key}`
|
||||
+ `_add_component_type`}>
|
||||
Add component of type
|
||||
</label>
|
||||
<select id={`${this.props.container.key}_add_component_type`}
|
||||
<select id={`${this.props.container.key}`
|
||||
+ `_add_component_type`}
|
||||
onChange={this.handleTypeSelectChange}>
|
||||
<option value=""></option>
|
||||
{ComponentModelEditor.getAvailableComponents()
|
||||
|
|
@ -842,10 +846,11 @@ class ContainerModelComponent
|
|||
<option key={component.componentType}
|
||||
value={component.componentType}>
|
||||
{component.componentTitle}
|
||||
</option>
|
||||
</option>,
|
||||
)}
|
||||
</select>
|
||||
<label htmlFor={`${this.props.container.key}_add_component_key`}>
|
||||
<label htmlFor={`${this.props.container.key}`
|
||||
+ `_add_component_key`}>
|
||||
with key
|
||||
</label>
|
||||
<input id={`${this.props.container.key}_add_component_key`}
|
||||
|
|
@ -990,13 +995,13 @@ class ContainerModelComponent
|
|||
const init: RequestInit = {
|
||||
|
||||
body: JSON.stringify({
|
||||
type: this.state.addComponentOfType,
|
||||
key: this.state.addComponentWithKey,
|
||||
type: this.state.addComponentOfType,
|
||||
}),
|
||||
credentials: "same-origin",
|
||||
headers,
|
||||
method: "PUT",
|
||||
}
|
||||
};
|
||||
|
||||
const url: string = `${this.props.dispatcherPrefix}`
|
||||
+ `/page-models/${this.props.ccmApplication}/`
|
||||
|
|
@ -1028,8 +1033,8 @@ class ContainerModelComponent
|
|||
|
||||
this.setState({
|
||||
...this.state,
|
||||
addComponentWithKey: "",
|
||||
addComponentOfType: "",
|
||||
addComponentWithKey: "",
|
||||
components,
|
||||
});
|
||||
})
|
||||
|
|
@ -1050,7 +1055,7 @@ class ContainerModelComponent
|
|||
...this.state.errorMessages,
|
||||
`Failed to add component to container`
|
||||
+ `${response.status} ${response.statusText}`,
|
||||
]
|
||||
],
|
||||
});
|
||||
}
|
||||
})
|
||||
|
|
@ -1060,7 +1065,7 @@ class ContainerModelComponent
|
|||
errorMessages: [
|
||||
...this.state.errorMessages,
|
||||
`Failed to add component to container`
|
||||
+ ` ${this.props.container.key}: ${error.message}`
|
||||
+ ` ${this.props.container.key}: ${error.message}`,
|
||||
],
|
||||
});
|
||||
});
|
||||
|
|
@ -1290,7 +1295,7 @@ class ComponentModelEditor
|
|||
|
||||
const components: EditorComponents[] = [];
|
||||
|
||||
for(let editorComponents
|
||||
for (const editorComponents
|
||||
of ComponentModelEditor.editorComponents.values()) {
|
||||
|
||||
components.push(editorComponents);
|
||||
|
|
@ -1348,8 +1353,8 @@ class ComponentModelEditor
|
|||
.editorComponents.get(type) as EditorComponents;
|
||||
} else {
|
||||
const basicComponents: EditorComponents = {
|
||||
componentType: type,
|
||||
componentTitle: "",
|
||||
componentType: type,
|
||||
editorDialog:
|
||||
BasicComponentModelEditorDialog as typeof React.Component,
|
||||
propertiesList:
|
||||
|
|
|
|||
Loading…
Reference in New Issue