@singularsystems/neo-react 0.10.52 → 0.10.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,7 @@ interface IDeleteButtonOptions extends IButtonOptions {
|
|
|
13
13
|
*/
|
|
14
14
|
onDeleteExisting?: (item: any) => Promise<boolean>;
|
|
15
15
|
}
|
|
16
|
-
interface IButtonColumnProps extends INeoCommonColumnProps, React.HTMLProps<HTMLTableCellElement> {
|
|
16
|
+
export interface IButtonColumnProps extends INeoCommonColumnProps, React.HTMLProps<HTMLTableCellElement> {
|
|
17
17
|
/** Item to pass to edit and delete callbacks. Defaults to the current rows item */
|
|
18
18
|
item?: any;
|
|
19
19
|
/** Text to show in the header. */
|
|
@@ -68,7 +68,7 @@ interface IEditorSelectorProps<T> {
|
|
|
68
68
|
/** Date props if this editor is a date editor */
|
|
69
69
|
dateProps?: Components.IPartialDateProps;
|
|
70
70
|
/** Radio list props if this is a radio button list. */
|
|
71
|
-
radioList?: IRadioListSpecificProps
|
|
71
|
+
radioList?: IRadioListSpecificProps<T>;
|
|
72
72
|
/** File props if this editor is a file editor */
|
|
73
73
|
fileProps?: IFileEditorProps;
|
|
74
74
|
}
|
|
@@ -127,7 +127,7 @@ export declare class BindPropsHelper {
|
|
|
127
127
|
* Gets the correct input control type based on the props. E.g. Input / DatePicker / Select
|
|
128
128
|
* @param props Props passed to a multi type input container. E.g. FormGroup / Column
|
|
129
129
|
*/
|
|
130
|
-
static getFormControl(props: IEditorNormalisedProps<any, any>): React.CElement<import("./DatePicker").INeoDatePickerProps, DatePicker> | React.CElement<import("./NumberInput").INumberInputProps, NumberInput> | React.CElement<import("./DropDown/DropDown").IDropDownProps<unknown>, DropDown<unknown>> | React.CElement<IFileEditorProps, FileInput> | React.CElement<import("./Input").IInputProps, Input> | React.CElement<import("./RadioList").IRadioListProps
|
|
130
|
+
static getFormControl(props: IEditorNormalisedProps<any, any>): React.CElement<import("./DatePicker").INeoDatePickerProps, DatePicker> | React.CElement<import("./NumberInput").INumberInputProps, NumberInput> | React.CElement<import("./DropDown/DropDown").IDropDownProps<unknown>, DropDown<unknown>> | React.CElement<IFileEditorProps, FileInput> | React.CElement<import("./Input").IInputProps, Input> | React.CElement<import("./RadioList").IRadioListProps<unknown>, RadioList<unknown>>;
|
|
131
131
|
static getControlType(props: IEditorNormalisedProps<any, any>): ControlType;
|
|
132
132
|
static getCheckBoxType(props: IEditorNormalisedProps<any, any>, instance?: any): CheckboxType;
|
|
133
133
|
/**
|
|
@@ -2,22 +2,22 @@ import React from 'react';
|
|
|
2
2
|
import { IBindableEditorProps } from './PropTypes';
|
|
3
3
|
import ComponentBase from './ComponentBase';
|
|
4
4
|
import { FormContext } from './FormContext';
|
|
5
|
-
export interface IRadioListSpecificProps {
|
|
5
|
+
export interface IRadioListSpecificProps<T> {
|
|
6
6
|
/** List of items to show. */
|
|
7
|
-
items?:
|
|
7
|
+
items?: T[];
|
|
8
8
|
/** Enum to show as a radio button list. */
|
|
9
9
|
enumType?: any;
|
|
10
10
|
/** True if the radio buttons should be displayed inline (horizontally). */
|
|
11
11
|
inline?: boolean;
|
|
12
12
|
/** Property name to use for the id. Only applies when using items. */
|
|
13
|
-
valueMember?:
|
|
13
|
+
valueMember?: keyof T;
|
|
14
14
|
/** Property name to use for the radio button text. Only applies when using items. */
|
|
15
|
-
displayMember?:
|
|
15
|
+
displayMember?: keyof T;
|
|
16
16
|
}
|
|
17
|
-
export interface IRadioListProps extends IBindableEditorProps<HTMLSelectElement> {
|
|
18
|
-
radioList: IRadioListSpecificProps
|
|
17
|
+
export interface IRadioListProps<T> extends IBindableEditorProps<HTMLSelectElement> {
|
|
18
|
+
radioList: IRadioListSpecificProps<T>;
|
|
19
19
|
}
|
|
20
|
-
export default class RadioList extends ComponentBase<IRadioListProps
|
|
20
|
+
export default class RadioList<T> extends ComponentBase<IRadioListProps<T>> {
|
|
21
21
|
static contextType: React.Context<import("./FormContext").FormContextParams>;
|
|
22
22
|
context: React.ContextType<typeof FormContext>;
|
|
23
23
|
private previousList?;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import ViewBase from '../Views/ViewBase';
|
|
2
2
|
import { Routing } from '@singularsystems/neo-core';
|
|
3
|
+
import { RouteParameterObject } from './IRouteParameter';
|
|
3
4
|
export interface IMenuRoute extends Routing.IMenuRoute {
|
|
4
5
|
}
|
|
5
|
-
export declare class MenuRoute<TParams
|
|
6
|
+
export declare class MenuRoute<TParams extends RouteParameterObject<TParams>> implements IMenuRoute {
|
|
6
7
|
/**
|
|
7
8
|
* Creates a menu route with view parameters specified.
|
|
8
9
|
* @param baseRoute Path and component
|
|
@@ -2,7 +2,8 @@ import ViewBase from '../Views/ViewBase';
|
|
|
2
2
|
import { RouteComponentProps } from 'react-router';
|
|
3
3
|
import { RoutingState } from './RoutingState';
|
|
4
4
|
import { INavigationHelper as INeoNavigationHelper } from '@singularsystems/neo-core/dist/Routing/INavigationHelper';
|
|
5
|
-
|
|
5
|
+
import { RouteParameterObject } from './IRouteParameter';
|
|
6
|
+
export declare type ViewConstructor<TParams extends RouteParameterObject<TParams>> = new (...args: any) => ViewBase<any, TParams>;
|
|
6
7
|
export declare type ParamValues<TParams> = {
|
|
7
8
|
[P in keyof TParams]?: number | string | null;
|
|
8
9
|
};
|
|
@@ -13,13 +14,13 @@ export interface INavigationHelper extends INeoNavigationHelper {
|
|
|
13
14
|
* @param view View component which inherits from view base.
|
|
14
15
|
* @param paramValues View params to include in the url to pass to the view.
|
|
15
16
|
*/
|
|
16
|
-
navigateToView<TParams
|
|
17
|
+
navigateToView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): void;
|
|
17
18
|
/**
|
|
18
19
|
* Gets the full path for a view including view parameter values.
|
|
19
20
|
* @param view View component which inherits from view base.
|
|
20
21
|
* @param paramValues View params to include in the url to pass to the view.
|
|
21
22
|
*/
|
|
22
|
-
getPathForView<TParams
|
|
23
|
+
getPathForView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): string;
|
|
23
24
|
/**
|
|
24
25
|
* Gets the path of the currently rendered view, without parameter components.
|
|
25
26
|
*/
|
|
@@ -33,8 +34,8 @@ export default class NavigationHelper implements INavigationHelper {
|
|
|
33
34
|
private routingState;
|
|
34
35
|
constructor(routingState: RoutingState);
|
|
35
36
|
navigateInternal(url: string, replace?: boolean): void;
|
|
36
|
-
navigateToView<TParams
|
|
37
|
-
getPathForView<TParams
|
|
37
|
+
navigateToView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): void;
|
|
38
|
+
getPathForView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): string;
|
|
38
39
|
getCurrentViewPath(): string;
|
|
39
40
|
get currentRouteProps(): RouteComponentProps<{}, import("react-router").StaticContext, import("history").History.PoorMansUnknown>;
|
|
40
41
|
}
|