@singularsystems/neo-react 1.0.0-beta.7 → 1.0.1
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.
- package/CHANGELOG.md +138 -0
- package/dist/Modules/Types.d.ts +13 -0
- package/dist/Modules/Types.js +8 -0
- package/dist/React/AutoRunner.js +5 -1
- package/dist/ReactComponents/Card.d.ts +1 -1
- package/dist/ReactComponents/Collapsable.d.ts +1 -1
- package/dist/ReactComponents/ColorPicker.d.ts +6 -4
- package/dist/ReactComponents/ColorPicker.js +24 -9
- package/dist/ReactComponents/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ReactComponents/ContextMenu/ContextMenuContainer.d.ts +1 -1
- package/dist/ReactComponents/ContextMenu/ContextMenuState.js +2 -1
- package/dist/ReactComponents/DatePicker.d.ts +1 -1
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.d.ts +1 -1
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.js +1 -2
- package/dist/ReactComponents/DropDown/DropDown.d.ts +1 -1
- package/dist/ReactComponents/DropDown/DropDown.js +11 -7
- package/dist/ReactComponents/DropDown/DropDownBase.d.ts +2 -2
- package/dist/ReactComponents/DropDown/LookupHelper.d.ts +4 -4
- package/dist/ReactComponents/ErrorHandler.js +2 -1
- package/dist/ReactComponents/FileManager/FileBasicInput.d.ts +1 -1
- package/dist/ReactComponents/FileManager/FileBasicInput.js +2 -1
- package/dist/ReactComponents/FileManager/FileContext.d.ts +1 -1
- package/dist/ReactComponents/FileManager/FileDropArea.d.ts +1 -1
- package/dist/ReactComponents/FileManager/FileInput.d.ts +1 -1
- package/dist/ReactComponents/FileManager/FileUploadButton.d.ts +1 -1
- package/dist/ReactComponents/FileManager/FileUploadProgress.d.ts +1 -1
- package/dist/ReactComponents/Form.d.ts +1 -1
- package/dist/ReactComponents/FormContext.d.ts +1 -1
- package/dist/ReactComponents/FormContext.js +2 -1
- package/dist/ReactComponents/FormGroup/FormGroup.d.ts +1 -1
- package/dist/ReactComponents/FormGroup/FormGroup.js +2 -1
- package/dist/ReactComponents/FormGroup/FormGroupFloating.d.ts +1 -1
- package/dist/ReactComponents/FormGroup/FormGroupInline.d.ts +1 -1
- package/dist/ReactComponents/Grid/ButtonColumn.d.ts +1 -1
- package/dist/ReactComponents/Grid/ButtonColumn.js +3 -2
- package/dist/ReactComponents/Grid/Column.d.ts +1 -1
- package/dist/ReactComponents/Grid/Grid.d.ts +2 -2
- package/dist/ReactComponents/Grid/Row.d.ts +2 -2
- package/dist/ReactComponents/Grid/Row.js +4 -2
- package/dist/ReactComponents/GridLayout.d.ts +1 -1
- package/dist/ReactComponents/IColorPicker.d.ts +7 -0
- package/dist/ReactComponents/IColorPicker.js +1 -0
- package/dist/ReactComponents/Icons/FontAwesomeIconFactory.js +2 -1
- package/dist/ReactComponents/Icons/IconFactory.js +2 -1
- package/dist/ReactComponents/Icons/MaterialSymbolsFontFactory.js +1 -2
- package/dist/ReactComponents/Input.d.ts +1 -1
- package/dist/ReactComponents/InputHelpers.d.ts +1 -1
- package/dist/ReactComponents/Link.d.ts +1 -1
- package/dist/ReactComponents/Loader.d.ts +1 -1
- package/dist/ReactComponents/Modal/Modal.d.ts +1 -1
- package/dist/ReactComponents/Modal/ModalContainer.d.ts +1 -1
- package/dist/ReactComponents/Modal/ModalPortal.d.ts +1 -1
- package/dist/ReactComponents/Notifications/Alert.d.ts +1 -1
- package/dist/ReactComponents/Notifications/Toast.d.ts +1 -1
- package/dist/ReactComponents/Notifications/ToastContainer.d.ts +1 -1
- package/dist/ReactComponents/NumberInput.d.ts +1 -1
- package/dist/ReactComponents/Paging/BasicPagerControls.d.ts +1 -1
- package/dist/ReactComponents/Paging/PageSizeControl.d.ts +1 -1
- package/dist/ReactComponents/Paging/Pager.d.ts +1 -1
- package/dist/ReactComponents/ProgressBar.d.ts +1 -1
- package/dist/ReactComponents/PropTypes.d.ts +1 -1
- package/dist/ReactComponents/PropTypes.js +3 -1
- package/dist/ReactComponents/RadioList.d.ts +1 -1
- package/dist/ReactComponents/Slider.d.ts +1 -1
- package/dist/ReactComponents/Slider.js +1 -1
- package/dist/ReactComponents/Tabs/Tab.d.ts +3 -3
- package/dist/ReactComponents/Tabs/Tab.js +1 -2
- package/dist/ReactComponents/Tabs/TabContainer.d.ts +1 -1
- package/dist/ReactComponents/Tooltip.d.ts +7 -3
- package/dist/ReactComponents/TooltipHelper.d.ts +1 -0
- package/dist/ReactComponents/TooltipHelper.js +7 -3
- package/dist/ReactComponents/TooltipProvider.d.ts +1 -1
- package/dist/ReactComponents/ValidationSummary.d.ts +1 -1
- package/dist/Routing/MenuRoute.js +2 -0
- package/dist/Routing/PageLeaveHandler.js +2 -1
- package/dist/Routing/RoutingState.js +2 -1
- package/dist/Routing/ViewParameter.js +2 -1
- package/dist/Routing/ViewParameterList.d.ts +2 -1
- package/dist/Routing/ViewParameterList.js +5 -0
- package/dist/Services/DisposeHelper.js +2 -1
- package/dist/Views/ViewBase.js +1 -1
- package/dist/Views/ViewModelBase.d.ts +3 -1
- package/dist/Views/ViewModelBase.js +1 -5
- package/package.json +12 -10
- package/styles/ColorPicker.scss +1 -2
- package/dist/React/Decorators.d.ts +0 -4
- package/dist/React/Decorators.js +0 -15
- package/dist/React/Utils.d.ts +0 -2
- package/dist/React/Utils.js +0 -15
|
@@ -5,7 +5,7 @@ import NeoButton from '../Button';
|
|
|
5
5
|
import { Misc, Utils } from '@singularsystems/neo-core';
|
|
6
6
|
import ComponentBase from '../ComponentBase';
|
|
7
7
|
import { ColumnHelper } from './ColumnHelper';
|
|
8
|
-
|
|
8
|
+
var ButtonColumn = /** @class */ (function (_super) {
|
|
9
9
|
__extends(ButtonColumn, _super);
|
|
10
10
|
function ButtonColumn(props) {
|
|
11
11
|
var _this = _super.call(this, props) || this;
|
|
@@ -17,9 +17,9 @@ export var ButtonColumn = /** @class */ (function (_super) {
|
|
|
17
17
|
this.item = this.context.currentItem;
|
|
18
18
|
};
|
|
19
19
|
ButtonColumn.prototype.onDelete = function () {
|
|
20
|
-
var _a, _b;
|
|
21
20
|
return __awaiter(this, void 0, void 0, function () {
|
|
22
21
|
var item, mustRemove;
|
|
22
|
+
var _a, _b;
|
|
23
23
|
return __generator(this, function (_c) {
|
|
24
24
|
switch (_c.label) {
|
|
25
25
|
case 0:
|
|
@@ -79,3 +79,4 @@ export var ButtonColumn = /** @class */ (function (_super) {
|
|
|
79
79
|
ButtonColumn.contextType = GridContext;
|
|
80
80
|
return ButtonColumn;
|
|
81
81
|
}(ComponentBase));
|
|
82
|
+
export { ButtonColumn };
|
|
@@ -41,7 +41,7 @@ export default class Column<TData> extends ComponentBase<INeoColumnProps<TData>>
|
|
|
41
41
|
private headerClick;
|
|
42
42
|
refreshStateObserver(props: IBindableEditorProps): void;
|
|
43
43
|
componentWillUnmount(): void;
|
|
44
|
-
render(): JSX.Element;
|
|
44
|
+
render(): React.JSX.Element;
|
|
45
45
|
private renderHeader;
|
|
46
46
|
private renderBody;
|
|
47
47
|
private renderFooter;
|
|
@@ -34,7 +34,7 @@ export interface IGridProps<T> extends Omit<React.HTMLProps<HTMLTableElement>, "
|
|
|
34
34
|
* The unique key of the items being displayed. This is only necessary if the items dont have an entityIdentifier
|
|
35
35
|
* property (non ModelBase items).
|
|
36
36
|
*/
|
|
37
|
-
keyProperty?:
|
|
37
|
+
keyProperty?: keyof T;
|
|
38
38
|
/**
|
|
39
39
|
* Set to false if you don't want to allow sorting.
|
|
40
40
|
*/
|
|
@@ -91,6 +91,6 @@ export default class Grid<T> extends React.Component<IGridProps<T>> {
|
|
|
91
91
|
constructor(props: IGridProps<T>);
|
|
92
92
|
componentDidMount(): void;
|
|
93
93
|
componentWillUnmount(): void;
|
|
94
|
-
render(): JSX.Element;
|
|
94
|
+
render(): React.JSX.Element;
|
|
95
95
|
private setInitialSort;
|
|
96
96
|
}
|
|
@@ -32,7 +32,7 @@ export default class Row<TData> extends ComponentBase<IRowProps> {
|
|
|
32
32
|
onFirstRender(): void;
|
|
33
33
|
componentWillUnmount(): void;
|
|
34
34
|
onExpandClick(): void;
|
|
35
|
-
render(): false | JSX.Element;
|
|
35
|
+
render(): false | React.JSX.Element;
|
|
36
36
|
}
|
|
37
37
|
interface INeoChildRowProps extends React.HTMLProps<HTMLTableRowElement> {
|
|
38
38
|
/**
|
|
@@ -63,7 +63,7 @@ export declare class ChildRow extends ComponentBase<INeoChildRowProps> {
|
|
|
63
63
|
protected afterRender(isInitial: boolean): void;
|
|
64
64
|
private afterTransition;
|
|
65
65
|
private setHeight;
|
|
66
|
-
render(): false | JSX.Element | undefined;
|
|
66
|
+
render(): false | React.JSX.Element | undefined;
|
|
67
67
|
}
|
|
68
68
|
interface INeoRowGroupProps {
|
|
69
69
|
/**
|
|
@@ -89,7 +89,7 @@ var Row = /** @class */ (function (_super) {
|
|
|
89
89
|
return Row;
|
|
90
90
|
}(ComponentBase));
|
|
91
91
|
export default Row;
|
|
92
|
-
|
|
92
|
+
var ChildRow = /** @class */ (function (_super) {
|
|
93
93
|
__extends(ChildRow, _super);
|
|
94
94
|
function ChildRow(props) {
|
|
95
95
|
var _this = _super.call(this, props) || this;
|
|
@@ -185,7 +185,8 @@ export var ChildRow = /** @class */ (function (_super) {
|
|
|
185
185
|
], ChildRow);
|
|
186
186
|
return ChildRow;
|
|
187
187
|
}(ComponentBase));
|
|
188
|
-
export
|
|
188
|
+
export { ChildRow };
|
|
189
|
+
var RowGroup = /** @class */ (function (_super) {
|
|
189
190
|
__extends(RowGroup, _super);
|
|
190
191
|
function RowGroup() {
|
|
191
192
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -199,3 +200,4 @@ export var RowGroup = /** @class */ (function (_super) {
|
|
|
199
200
|
RowGroup.contextType = GridContext;
|
|
200
201
|
return RowGroup;
|
|
201
202
|
}(React.Component));
|
|
203
|
+
export { RowGroup };
|
|
@@ -15,6 +15,6 @@ export declare class FormGroupLayoutContextParams {
|
|
|
15
15
|
}
|
|
16
16
|
export declare const FormGroupLayoutContext: React.Context<FormGroupLayoutContextParams>;
|
|
17
17
|
export default class GridLayout extends React.Component<ILayoutGridProps & React.HTMLProps<HTMLDivElement>> {
|
|
18
|
-
render(): JSX.Element;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { injectable } from "inversify";
|
|
4
4
|
import { IconFactory } from "./IconFactory";
|
|
5
5
|
/** Icon factory supporting font-awesome string, as well as the font-awesome icon definition and component. */
|
|
6
|
-
|
|
6
|
+
var FontAwesomeIconFactory = /** @class */ (function (_super) {
|
|
7
7
|
__extends(FontAwesomeIconFactory, _super);
|
|
8
8
|
/**
|
|
9
9
|
* Creates a font awesome factory, allowing the use of IconDefinition on any neo icon prop.
|
|
@@ -41,3 +41,4 @@ export var FontAwesomeIconFactory = /** @class */ (function (_super) {
|
|
|
41
41
|
], FontAwesomeIconFactory);
|
|
42
42
|
return FontAwesomeIconFactory;
|
|
43
43
|
}(IconFactory));
|
|
44
|
+
export { FontAwesomeIconFactory };
|
|
@@ -3,7 +3,7 @@ import { Utils } from "@singularsystems/neo-core";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { injectable } from 'inversify';
|
|
5
5
|
/** Default icon factory supporting font-awesome strings. */
|
|
6
|
-
|
|
6
|
+
var IconFactory = /** @class */ (function () {
|
|
7
7
|
function IconFactory() {
|
|
8
8
|
}
|
|
9
9
|
IconFactory.prototype.getIconComponent = function (iconOrName, style) {
|
|
@@ -49,3 +49,4 @@ export var IconFactory = /** @class */ (function () {
|
|
|
49
49
|
], IconFactory);
|
|
50
50
|
return IconFactory;
|
|
51
51
|
}());
|
|
52
|
+
export { IconFactory };
|
|
@@ -8,9 +8,8 @@ import { IconFactory } from ".";
|
|
|
8
8
|
var MaterialSymbolsFontFactory = /** @class */ (function (_super) {
|
|
9
9
|
__extends(MaterialSymbolsFontFactory, _super);
|
|
10
10
|
function MaterialSymbolsFontFactory(options) {
|
|
11
|
-
var _this = this;
|
|
12
11
|
var _a;
|
|
13
|
-
_this = _super.call(this) || this;
|
|
12
|
+
var _this = _super.call(this) || this;
|
|
14
13
|
_this.filledByDefault = (_a = options === null || options === void 0 ? void 0 : options.fillDefault) !== null && _a !== void 0 ? _a : false;
|
|
15
14
|
if ((options === null || options === void 0 ? void 0 : options.fontAwesomeMappings) && (options === null || options === void 0 ? void 0 : options.replaceNeoMappings)) {
|
|
16
15
|
_this.fontAwesomeMap = new Map(options.fontAwesomeMappings);
|
|
@@ -31,7 +31,7 @@ export default class Input extends ComponentBase<IInputProps> {
|
|
|
31
31
|
private determineType;
|
|
32
32
|
afterRender(): void;
|
|
33
33
|
private onChanged;
|
|
34
|
-
render(): JSX.Element;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
export declare class Textbox extends Input {
|
|
37
37
|
constructor(props: any);
|
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
|
2
2
|
import { ICommonEditorProps } from './PropTypes';
|
|
3
3
|
export declare class InputHelpers {
|
|
4
4
|
private static iconFactory?;
|
|
5
|
-
static surroundWithInputGroup<T extends React.ReactNode>(element: T, props: ICommonEditorProps, inputRef?: React.RefObject<HTMLElement>): JSX.Element | T;
|
|
5
|
+
static surroundWithInputGroup<T extends React.ReactNode>(element: T, props: ICommonEditorProps, inputRef?: React.RefObject<HTMLElement>): React.JSX.Element | T;
|
|
6
6
|
}
|
|
@@ -12,7 +12,7 @@ export default class Loader extends ComponentBase<ILoaderProps> {
|
|
|
12
12
|
overlayRef: React.RefObject<HTMLDivElement>;
|
|
13
13
|
isShowing: boolean;
|
|
14
14
|
hasAnimated: boolean;
|
|
15
|
-
render(): JSX.Element;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
16
|
afterRender(): void;
|
|
17
17
|
}
|
|
18
18
|
export {};
|
|
@@ -12,6 +12,6 @@ export default class ModalContainer extends React.Component<IModalContainerProps
|
|
|
12
12
|
private containerRef;
|
|
13
13
|
componentDidMount(): void;
|
|
14
14
|
componentDidUpdate(): void;
|
|
15
|
-
render(): JSX.Element | (0 | JSX.Element)[];
|
|
15
|
+
render(): React.JSX.Element | (0 | React.JSX.Element)[];
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -3,5 +3,5 @@ import { Components } from "@singularsystems/neo-core";
|
|
|
3
3
|
import CollapsableBase from '../CollapsableBase';
|
|
4
4
|
export default class Alert extends CollapsableBase<Components.INotificationOptions & React.HTMLProps<HTMLDivElement>> {
|
|
5
5
|
private iconFactory;
|
|
6
|
-
render(): JSX.Element;
|
|
6
|
+
render(): React.JSX.Element;
|
|
7
7
|
}
|
|
@@ -22,5 +22,5 @@ export interface IPagerControlsProps extends React.HTMLProps<HTMLUListElement> {
|
|
|
22
22
|
}
|
|
23
23
|
export default class SimplePagerControls extends React.Component<IPagerControlsProps> {
|
|
24
24
|
private iconFactory;
|
|
25
|
-
render(): false | JSX.Element;
|
|
25
|
+
render(): false | React.JSX.Element;
|
|
26
26
|
}
|
|
@@ -21,5 +21,5 @@ export default class Pager<TCriteria extends ValueObject, TModel extends Model.I
|
|
|
21
21
|
constructor(props: IPagerBaseProps<TCriteria, TModel>);
|
|
22
22
|
componentDidMount(): void;
|
|
23
23
|
componentDidUpdate(): void;
|
|
24
|
-
render(): JSX.Element | null;
|
|
24
|
+
render(): React.JSX.Element | null;
|
|
25
25
|
}
|
|
@@ -15,5 +15,5 @@ export interface IProgressBarProps {
|
|
|
15
15
|
export default class ProgressBar extends React.Component<IProgressBarProps & React.HTMLProps<HTMLDivElement>> {
|
|
16
16
|
innerRef: React.RefObject<HTMLDivElement>;
|
|
17
17
|
componentDidMount(): void;
|
|
18
|
-
render(): JSX.Element;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
19
|
}
|
|
@@ -137,7 +137,7 @@ export declare class BindPropsHelper {
|
|
|
137
137
|
static getBindProperty<T>(allProps: IEditorContainerProps<T, any>): Model.IPropertyInstance;
|
|
138
138
|
static splitCommonEditorProps<T extends ICommonEditorProps>(props: T): {
|
|
139
139
|
editor: ICommonEditorProps;
|
|
140
|
-
rest: Omit<T, "
|
|
140
|
+
rest: Omit<T, "append" | "prepend" | "disabled" | "readOnly" | "isDisabled" | "isReadOnly" | "prependText" | "appendText" | "inputElement">;
|
|
141
141
|
};
|
|
142
142
|
static normaliseContainerProps<T, TContainerDom = React.HTMLProps<T>, TData = any>(component: IComponentBase, props: IEditorContainerProps<T, TData>, inGroup: boolean, isBootstrap?: boolean): IEditorContainerNormalisedProps<TContainerDom, TData>;
|
|
143
143
|
static normaliseEditorProps<T, TDom = React.HTMLProps<T>>(component: IComponentBase, props: (IEditorAndSelectorProps<T, any> & TDom) | IEditorNormalisedProps<TDom, any>): IEditorNormalisedProps<TDom, any>;
|
|
@@ -24,7 +24,7 @@ export var CheckboxType;
|
|
|
24
24
|
CheckboxType[CheckboxType["Checkbox"] = 1] = "Checkbox";
|
|
25
25
|
CheckboxType[CheckboxType["Switch"] = 2] = "Switch";
|
|
26
26
|
})(CheckboxType || (CheckboxType = {}));
|
|
27
|
-
|
|
27
|
+
var BindPropsHelper = /** @class */ (function () {
|
|
28
28
|
function BindPropsHelper() {
|
|
29
29
|
}
|
|
30
30
|
Object.defineProperty(BindPropsHelper, "config", {
|
|
@@ -207,6 +207,7 @@ export var BindPropsHelper = /** @class */ (function () {
|
|
|
207
207
|
domProps.id = (_a = formContext.uniqueId) !== null && _a !== void 0 ? _a : props.uniqueID;
|
|
208
208
|
}
|
|
209
209
|
if (this.config.isTestOrDevelopment) {
|
|
210
|
+
//@ts-ignore
|
|
210
211
|
domProps[BindPropsHelper.DataFieldName] = props.bind.propertyInfo.propertyName;
|
|
211
212
|
}
|
|
212
213
|
if (this.isReadOnly(props.editor, formContext)) {
|
|
@@ -261,3 +262,4 @@ export var BindPropsHelper = /** @class */ (function () {
|
|
|
261
262
|
BindPropsHelper.DataFieldName = "data-field-name";
|
|
262
263
|
return BindPropsHelper;
|
|
263
264
|
}());
|
|
265
|
+
export { BindPropsHelper };
|
|
@@ -14,7 +14,7 @@ var Slider = /** @class */ (function (_super) {
|
|
|
14
14
|
_this.sliderImplementation = Misc.Globals.appService.get(NeoReactTypes.Components.Slider);
|
|
15
15
|
_this.rangeImplementation = Misc.Globals.appService.get(NeoReactTypes.Components.Range);
|
|
16
16
|
_this.onChangeHandler = function (value) {
|
|
17
|
-
if (
|
|
17
|
+
if (!(value instanceof Array)) {
|
|
18
18
|
// This is a <Slider/>
|
|
19
19
|
_this.props.bind.value = value;
|
|
20
20
|
}
|
|
@@ -34,9 +34,9 @@ export default class Tab extends React.Component<ITabProps> {
|
|
|
34
34
|
private iconFactory;
|
|
35
35
|
constructor(props: ITabProps);
|
|
36
36
|
componentDidMount(): void;
|
|
37
|
-
render(): false | JSX.Element;
|
|
37
|
+
render(): false | React.JSX.Element;
|
|
38
38
|
onClick(e: React.MouseEvent<HTMLAnchorElement>): void;
|
|
39
|
-
renderHeader(isSelected: boolean): JSX.Element;
|
|
40
|
-
renderBody(isSelected: boolean): false | JSX.Element;
|
|
39
|
+
renderHeader(isSelected: boolean): React.JSX.Element;
|
|
40
|
+
renderBody(isSelected: boolean): false | React.JSX.Element;
|
|
41
41
|
}
|
|
42
42
|
export {};
|
|
@@ -7,9 +7,8 @@ import { NeoReactTypes } from "../../Modules/Types";
|
|
|
7
7
|
var Tab = /** @class */ (function (_super) {
|
|
8
8
|
__extends(Tab, _super);
|
|
9
9
|
function Tab(props) {
|
|
10
|
-
var _this = this;
|
|
11
10
|
var _a;
|
|
12
|
-
_this = _super.call(this, props) || this;
|
|
11
|
+
var _this = _super.call(this, props) || this;
|
|
13
12
|
_this.hasRenderedContents = false;
|
|
14
13
|
_this.iconFactory = Misc.Globals.appService.get(NeoReactTypes.Components.IconFactory);
|
|
15
14
|
_this.onClick = _this.onClick.bind(_this);
|
|
@@ -40,5 +40,5 @@ export default class TabContainer extends React.Component<ITabContainerProps & R
|
|
|
40
40
|
constructor(props: ITabContainerProps & React.HTMLProps<HTMLDivElement>);
|
|
41
41
|
componentDidMount(): void;
|
|
42
42
|
componentWillUnmount(): void;
|
|
43
|
-
render(): JSX.Element;
|
|
43
|
+
render(): React.JSX.Element;
|
|
44
44
|
}
|
|
@@ -14,7 +14,11 @@ export default class Tooltip extends React.Component<ITooltipProps> {
|
|
|
14
14
|
componentWillUnmount(): void;
|
|
15
15
|
private onMouseEnter;
|
|
16
16
|
private onMouseLeave;
|
|
17
|
-
render(): JSX.Element;
|
|
18
|
-
static fromDataAttributes(element: JSX.Element, attributes: {
|
|
19
|
-
|
|
17
|
+
render(): React.JSX.Element;
|
|
18
|
+
static fromDataAttributes(element: JSX.Element, attributes: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
static setDomProperties(dom: HTMLProps<HTMLElement> & {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}, tooltipOptions: string | Components.Tooltip.ITooltipOptions): void;
|
|
20
24
|
}
|
|
@@ -4,5 +4,6 @@ export declare class TooltipHelper {
|
|
|
4
4
|
static showTooltip(on: HTMLElement, content: string, isHtml: boolean, aligmnent?: Components.Tooltip.Alignment, position?: Components.Tooltip.Position, className?: string): void;
|
|
5
5
|
static hideTooltip(): void;
|
|
6
6
|
private static positionTooltip;
|
|
7
|
+
private static getPrefixedWindowKey;
|
|
7
8
|
private static getPrefixedStyleName;
|
|
8
9
|
}
|
|
@@ -40,7 +40,7 @@ var TooltipHelper = /** @class */ (function () {
|
|
|
40
40
|
var ttRect = toolTipContainer.getBoundingClientRect();
|
|
41
41
|
var anchorRect = anchor.getBoundingClientRect();
|
|
42
42
|
if (alignment === "start-edge") {
|
|
43
|
-
alignment = (anchorRect[startName] + ttRect[dimensionName] + 20 > window[this.
|
|
43
|
+
alignment = (anchorRect[startName] + ttRect[dimensionName] + 20 > window[this.getPrefixedWindowKey("inner", dimensionName)]) ? "end" : "start";
|
|
44
44
|
}
|
|
45
45
|
else if (alignment === "end-edge") {
|
|
46
46
|
alignment = (anchorRect[endName] - ttRect[dimensionName] < 15) ? "start" : "end";
|
|
@@ -56,12 +56,12 @@ var TooltipHelper = /** @class */ (function () {
|
|
|
56
56
|
arrowPosition = anchorRect[dimensionName] - 20;
|
|
57
57
|
}
|
|
58
58
|
// Check if the tooltip is going to go off the edge of the screen.
|
|
59
|
-
var clampedStart = Math.max(Math.min(start, window[this.
|
|
59
|
+
var clampedStart = Math.max(Math.min(start, window[this.getPrefixedWindowKey("inner", dimensionName)] - ttRect[dimensionName] - 20), 15);
|
|
60
60
|
var arrowOffset = anchorRect[startName] - clampedStart;
|
|
61
61
|
ttArrow.removeAttribute("style");
|
|
62
62
|
ttArrow.style[startName] = (arrowOffset + arrowPosition) + "px";
|
|
63
63
|
var align = anchorRect[alignName] - ttRect[alignDimensionName] - arrowHeight;
|
|
64
|
-
if ((align < 20 || position === endAlignName) && anchorRect[endAlignName] + ttRect[alignDimensionName] + arrowHeight + 20 < window[this.
|
|
64
|
+
if ((align < 20 || position === endAlignName) && anchorRect[endAlignName] + ttRect[alignDimensionName] + arrowHeight + 20 < window[this.getPrefixedWindowKey("inner", alignDimensionName)]) {
|
|
65
65
|
align = anchorRect[endAlignName] + arrowHeight;
|
|
66
66
|
ttArrow.style[this.getPrefixedStyleName("border", endAlignName)] = "5px solid " + bgColor;
|
|
67
67
|
ttArrow.style[this.getPrefixedStyleName("border", alignName)] = "none";
|
|
@@ -76,7 +76,11 @@ var TooltipHelper = /** @class */ (function () {
|
|
|
76
76
|
toolTipContainer.style[alignName] = align + (isHorizontal ? window.scrollX : window.scrollY) + "px";
|
|
77
77
|
toolTipContainer.style[startName] = clampedStart + (isHorizontal ? window.scrollY : window.scrollX) + "px";
|
|
78
78
|
};
|
|
79
|
+
TooltipHelper.getPrefixedWindowKey = function (prefix, styleName) {
|
|
80
|
+
return prefix + styleName[0].toUpperCase() + styleName.substring(1);
|
|
81
|
+
};
|
|
79
82
|
TooltipHelper.getPrefixedStyleName = function (prefix, styleName) {
|
|
83
|
+
// This can return any style name, but is cast as "borderLeft" to keep typescript happy.
|
|
80
84
|
return prefix + styleName[0].toUpperCase() + styleName.substring(1);
|
|
81
85
|
};
|
|
82
86
|
return TooltipHelper;
|
|
@@ -9,9 +9,11 @@ var MenuRoute = /** @class */ (function () {
|
|
|
9
9
|
function MenuRoute(baseRoute, menuParams, viewParams) {
|
|
10
10
|
var _this = this;
|
|
11
11
|
Object.getOwnPropertyNames(baseRoute).forEach(function (propertyName) {
|
|
12
|
+
// @ts-ignore
|
|
12
13
|
_this[propertyName] = baseRoute[propertyName];
|
|
13
14
|
});
|
|
14
15
|
Object.getOwnPropertyNames(menuParams).forEach(function (propertyName) {
|
|
16
|
+
// @ts-ignore
|
|
15
17
|
_this[propertyName] = menuParams[propertyName];
|
|
16
18
|
});
|
|
17
19
|
this.basePath = this.path;
|
|
@@ -3,7 +3,7 @@ import { Routing, ModalUtils, Misc, AppServices } from '@singularsystems/neo-cor
|
|
|
3
3
|
import { inject, injectable } from 'inversify';
|
|
4
4
|
import { NeoReactTypes } from '../Modules/Types';
|
|
5
5
|
import { RoutingState } from './RoutingState';
|
|
6
|
-
|
|
6
|
+
var PageLeaveHandler = /** @class */ (function () {
|
|
7
7
|
function PageLeaveHandler(routingState) {
|
|
8
8
|
this.routingState = routingState;
|
|
9
9
|
}
|
|
@@ -72,3 +72,4 @@ export var PageLeaveHandler = /** @class */ (function () {
|
|
|
72
72
|
], PageLeaveHandler);
|
|
73
73
|
return PageLeaveHandler;
|
|
74
74
|
}());
|
|
75
|
+
export { PageLeaveHandler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { injectable } from 'inversify';
|
|
3
3
|
import { computed, makeObservable, observable } from 'mobx';
|
|
4
|
-
|
|
4
|
+
var RoutingState = /** @class */ (function () {
|
|
5
5
|
function RoutingState() {
|
|
6
6
|
this.observableRoute = null;
|
|
7
7
|
this.currentView = null;
|
|
@@ -69,3 +69,4 @@ export var RoutingState = /** @class */ (function () {
|
|
|
69
69
|
], RoutingState);
|
|
70
70
|
return RoutingState;
|
|
71
71
|
}());
|
|
72
|
+
export { RoutingState };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { makeObservable, observable } from 'mobx';
|
|
3
|
-
|
|
3
|
+
var ViewParameter = /** @class */ (function () {
|
|
4
4
|
function ViewParameter(parent, name, routeParameter) {
|
|
5
5
|
this.parent = parent;
|
|
6
6
|
this.name = name;
|
|
@@ -128,3 +128,4 @@ export var ViewParameter = /** @class */ (function () {
|
|
|
128
128
|
], ViewParameter.prototype, "_description", void 0);
|
|
129
129
|
return ViewParameter;
|
|
130
130
|
}());
|
|
131
|
+
export { ViewParameter };
|
|
@@ -3,6 +3,7 @@ import { RouteParameterObject } from './IRouteParameter';
|
|
|
3
3
|
import { match } from 'react-router';
|
|
4
4
|
import { BreadCrumbItem } from './BreadCrumbItem';
|
|
5
5
|
import { IViewBase } from '../Views/ViewBase';
|
|
6
|
+
import { ParamValues } from "./NavigationHelper";
|
|
6
7
|
export type TransformParamsType<T> = {
|
|
7
8
|
[P in keyof T]: IViewParameter;
|
|
8
9
|
};
|
|
@@ -54,6 +55,6 @@ export declare class ViewParameterList<TParams extends RouteParameterObject<TPar
|
|
|
54
55
|
* @param basePath Base path without parameters
|
|
55
56
|
* @param values Object of param names and values.
|
|
56
57
|
*/
|
|
57
|
-
static getPathForValues<TParams extends RouteParameterObject<TParams>>(basePath: string, params: TParams, values:
|
|
58
|
+
static getPathForValues<TParams extends RouteParameterObject<TParams>>(basePath: string, params: TParams, values: ParamValues<TParams>): string;
|
|
58
59
|
}
|
|
59
60
|
export {};
|
|
@@ -12,6 +12,7 @@ var ViewParameterList = /** @class */ (function () {
|
|
|
12
12
|
if (routeParameterObject) {
|
|
13
13
|
for (var param in routeParameterObject) {
|
|
14
14
|
var viewParam = new ViewParameter(this, param, routeParameterObject[param]);
|
|
15
|
+
//@ts-ignore
|
|
15
16
|
this[param] = viewParam;
|
|
16
17
|
this.params.push(viewParam);
|
|
17
18
|
}
|
|
@@ -80,6 +81,7 @@ var ViewParameterList = /** @class */ (function () {
|
|
|
80
81
|
options = { force: true }; // parameter used to be named 'force'- backwards compatibility.
|
|
81
82
|
}
|
|
82
83
|
for (var paramName in values) {
|
|
84
|
+
//@ts-ignore
|
|
83
85
|
this[paramName].value = (_a = values[paramName]) !== null && _a !== void 0 ? _a : null;
|
|
84
86
|
}
|
|
85
87
|
this.suppressNavigation = false;
|
|
@@ -111,8 +113,10 @@ var ViewParameterList = /** @class */ (function () {
|
|
|
111
113
|
var hasChanged = false;
|
|
112
114
|
//Get url params
|
|
113
115
|
for (var param in match.params) {
|
|
116
|
+
//@ts-ignore
|
|
114
117
|
var viewParam = this[param];
|
|
115
118
|
if (viewParam) {
|
|
119
|
+
// @ts-ignore
|
|
116
120
|
var value = match.params[param];
|
|
117
121
|
if (value === undefined)
|
|
118
122
|
value = null;
|
|
@@ -140,6 +144,7 @@ var ViewParameterList = /** @class */ (function () {
|
|
|
140
144
|
// TODO: This needs a rework.
|
|
141
145
|
var viewParameterList = new ViewParameterList(params);
|
|
142
146
|
for (var name_1 in values) {
|
|
147
|
+
//@ts-ignore
|
|
143
148
|
var viewParam = viewParameterList[name_1];
|
|
144
149
|
if (viewParam) {
|
|
145
150
|
var value = values[name_1];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { injectable } from "inversify";
|
|
3
3
|
import { reaction } from "mobx";
|
|
4
|
-
|
|
4
|
+
var DisposeHelper = /** @class */ (function () {
|
|
5
5
|
function DisposeHelper() {
|
|
6
6
|
this.registeredReactions = [];
|
|
7
7
|
this.registeredDisposables = [];
|
|
@@ -38,3 +38,4 @@ export var DisposeHelper = /** @class */ (function () {
|
|
|
38
38
|
], DisposeHelper);
|
|
39
39
|
return DisposeHelper;
|
|
40
40
|
}());
|
|
41
|
+
export { DisposeHelper };
|
package/dist/Views/ViewBase.js
CHANGED
|
@@ -72,7 +72,7 @@ var ViewBase = /** @class */ (function (_super) {
|
|
|
72
72
|
ViewBase.prototype.componentDidMount = function () {
|
|
73
73
|
var _this = this;
|
|
74
74
|
var paramsUpdated = this.navigation.currentRouteProps ? this.viewState.viewParams.update(this.navigation.currentRouteProps.match) : false;
|
|
75
|
-
var initPromise;
|
|
75
|
+
var initPromise = undefined;
|
|
76
76
|
if (!this.viewState.hasSetup) {
|
|
77
77
|
this.viewState.hasSetup = true;
|
|
78
78
|
initPromise = this.initialise();
|
|
@@ -4,6 +4,7 @@ import { IReactionDisposer } from 'mobx';
|
|
|
4
4
|
import { AxiosPromise } from 'axios';
|
|
5
5
|
import { WaitForTaskRunnerOptions } from '@singularsystems/neo-core/dist/Components/TaskRunner/TaskRunner';
|
|
6
6
|
import { BindableBase } from '@singularsystems/neo-core/dist/Model/BindableBase';
|
|
7
|
+
type VMConstructor<T> = (new (taskRunner?: ITaskRunner) => T);
|
|
7
8
|
export type valueOrLazy<T> = T | (() => T) | (new () => T);
|
|
8
9
|
export default abstract class ViewModelBase extends ModelBase implements IViewModel {
|
|
9
10
|
taskRunner: ITaskRunner;
|
|
@@ -22,7 +23,7 @@ export default abstract class ViewModelBase extends ModelBase implements IViewMo
|
|
|
22
23
|
* The task runner will be passed to the new vm from this one.
|
|
23
24
|
* @param viewModel View model type.
|
|
24
25
|
*/
|
|
25
|
-
registerViewModel<TViewModel extends IViewModel>(viewModel:
|
|
26
|
+
registerViewModel<TViewModel extends IViewModel>(viewModel: VMConstructor<TViewModel>, options?: {
|
|
26
27
|
initialise: boolean;
|
|
27
28
|
}): TViewModel;
|
|
28
29
|
/**
|
|
@@ -55,3 +56,4 @@ export default abstract class ViewModelBase extends ModelBase implements IViewMo
|
|
|
55
56
|
*/
|
|
56
57
|
static create<TViewModel extends IViewModel>(viewModel: valueOrLazy<TViewModel>, taskRunner?: ITaskRunner): TViewModel;
|
|
57
58
|
}
|
|
59
|
+
export {};
|