Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planning authoring-react fields #2147

Merged
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions client/components/fields/editor/CustomVocabularies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ import {getVocabularyItemFieldTranslated} from '../../../utils/vocabularies';
import {arrayToTree} from 'superdesk-core/scripts/core/helpers/tree';
import {TreeSelect} from 'superdesk-ui-framework/react';

interface IProps extends IEditorFieldProps {
export interface ICustomVocabulariesProps extends IEditorFieldProps {
schema?: IProfileSchemaTypeList;
}

interface IReduxStateProps {
vocabularies: Array<IVocabulary>;
popupContainer?(): HTMLElement;
onPopupOpen?(): void;
onPopupClose?(): void;
}

type IProps = ICustomVocabulariesProps & IReduxStateProps;

const mapStateToProps = (state) => ({
vocabularies: state.customVocabularies,
});
Expand Down Expand Up @@ -93,4 +95,5 @@ class CustomVocabulariesComponent extends React.PureComponent<IProps> {
}
}

export const EditorFieldCustomVocabularies = connect(mapStateToProps)(CustomVocabulariesComponent);
export const EditorFieldCustomVocabularies =
connect<IReduxStateProps, {}, ICustomVocabulariesProps>(mapStateToProps)(CustomVocabulariesComponent);
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ export class PlanningEditorStandaloneComponent extends React.PureComponent<IProp
// PR-TODO: add a close button that will collapse the accordion
return {readOnly: false, actions: [saveButton]};
}}
getAuthoringPrimaryToolbarWidgets={() => []}
secondaryToolbarWidgets={[]}
getSidebarWidgetsCount={() => 0}
getSidebar={() => null}
sideWidget={null}
Expand All @@ -124,4 +122,4 @@ function mapStateToProps(state: IPlanningAppState): IReduxProps {
};
}

export const PlanningEditorStandalone = connect(mapStateToProps)(PlanningEditorStandaloneComponent);
export const PlanningEditorStandalone = connect(mapStateToProps)(PlanningEditorStandaloneComponent);
Loading
Loading