@singularsystems/neo-react 0.10.13 → 0.10.17
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/dist/Modules/Types.d.ts +1 -1
- package/dist/ReactComponents/Button.js +12 -2
- package/dist/ReactComponents/Button.js.map +1 -1
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.d.ts +1 -1
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.js +26 -13
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.js.map +1 -1
- package/dist/ReactComponents/DropDown/DropDown.js +1 -1
- package/dist/ReactComponents/DropDown/DropDown.js.map +1 -1
- package/dist/ReactComponents/Modal/ModalContainer.d.ts +14 -2
- package/dist/ReactComponents/Modal/ModalContainer.js +17 -2
- package/dist/ReactComponents/Modal/ModalContainer.js.map +1 -1
- package/dist/ReactComponents/PropTypes.d.ts +2 -1
- package/dist/ReactComponents/PropTypes.js +2 -1
- package/dist/ReactComponents/PropTypes.js.map +1 -1
- package/dist/Routing/RouteView.d.ts +2 -0
- package/dist/Routing/RouteView.js +6 -0
- package/dist/Routing/RouteView.js.map +1 -1
- package/dist/Routing/RoutingState.d.ts +2 -1
- package/dist/Routing/RoutingState.js +11 -17
- package/dist/Routing/RoutingState.js.map +1 -1
- package/package.json +2 -2
- package/styles/Validation.scss +1 -0
- package/dist/Modules/Misc.d.ts +0 -1
- package/dist/Modules/Misc.js +0 -2
- package/dist/Modules/Misc.js.map +0 -1
- package/dist/React/AutoQueryObject.d.ts +0 -5
- package/dist/React/AutoQueryObject.js +0 -39
- package/dist/React/AutoQueryObject.js.map +0 -1
- package/dist/React/Setup.d.ts +0 -1
- package/dist/React/Setup.js +0 -7
- package/dist/React/Setup.js.map +0 -1
- package/dist/ReactComponents/AsyncDropDown.d.ts +0 -54
- package/dist/ReactComponents/AsyncDropDown.js +0 -91
- package/dist/ReactComponents/AsyncDropDown.js.map +0 -1
- package/dist/ReactComponents/BootstrapHelpers.d.ts +0 -40
- package/dist/ReactComponents/BootstrapHelpers.js +0 -31
- package/dist/ReactComponents/BootstrapHelpers.js.map +0 -1
- package/dist/ReactComponents/DropDown/AsyncDropDown.d.ts +0 -53
- package/dist/ReactComponents/DropDown/AsyncDropDown.js +0 -95
- package/dist/ReactComponents/DropDown/AsyncDropDown.js.map +0 -1
- package/dist/ReactComponents/DropDown.d.ts +0 -47
- package/dist/ReactComponents/DropDown.js +0 -193
- package/dist/ReactComponents/DropDown.js.map +0 -1
- package/dist/ReactComponents/EditorContainerContext.d.ts +0 -19
- package/dist/ReactComponents/EditorContainerContext.js +0 -14
- package/dist/ReactComponents/EditorContainerContext.js.map +0 -1
- package/dist/ReactComponents/FileManager/FileManager.d.ts +0 -11
- package/dist/ReactComponents/FileManager/FileManager.js +0 -87
- package/dist/ReactComponents/FileManager/FileManager.js.map +0 -1
- package/dist/ReactComponents/FileManager.d.ts +0 -29
- package/dist/ReactComponents/FileManager.js +0 -105
- package/dist/ReactComponents/FileManager.js.map +0 -1
- package/dist/ReactComponents/FormGroup.d.ts +0 -23
- package/dist/ReactComponents/FormGroup.js +0 -68
- package/dist/ReactComponents/FormGroup.js.map +0 -1
- package/dist/ReactComponents/FormGroupFloating.d.ts +0 -19
- package/dist/ReactComponents/FormGroupFloating.js +0 -98
- package/dist/ReactComponents/FormGroupFloating.js.map +0 -1
- package/dist/ReactComponents/FormGroupInline.d.ts +0 -11
- package/dist/ReactComponents/FormGroupInline.js +0 -44
- package/dist/ReactComponents/FormGroupInline.js.map +0 -1
- package/dist/ReactComponents/Grid/Other.d.ts +0 -10
- package/dist/ReactComponents/Grid/Other.js +0 -22
- package/dist/ReactComponents/Grid/Other.js.map +0 -1
- package/dist/ReactComponents/Helpers.d.ts +0 -5
- package/dist/ReactComponents/Helpers.js +0 -18
- package/dist/ReactComponents/Helpers.js.map +0 -1
- package/dist/ReactComponents/InputBase.d.ts +0 -9
- package/dist/ReactComponents/InputBase.js +0 -29
- package/dist/ReactComponents/InputBase.js.map +0 -1
- package/dist/ReactComponents/Modal/ModalFactory.d.ts +0 -2
- package/dist/ReactComponents/Modal/ModalFactory.js +0 -43
- package/dist/ReactComponents/Modal/ModalFactory.js.map +0 -1
- package/dist/ReactComponents/Tabs/TabController.d.ts +0 -52
- package/dist/ReactComponents/Tabs/TabController.js +0 -104
- package/dist/ReactComponents/Tabs/TabController.js.map +0 -1
- package/dist/ReactComponents/_Controllers.d.ts +0 -4
- package/dist/ReactComponents/_Controllers.js +0 -5
- package/dist/ReactComponents/_Controllers.js.map +0 -1
- package/dist/ReactComponents/_UIHelpers.d.ts +0 -3
- package/dist/ReactComponents/_UIHelpers.js +0 -4
- package/dist/ReactComponents/_UIHelpers.js.map +0 -1
- package/dist/Routing/IMenuRoute.d.ts +0 -13
- package/dist/Routing/IMenuRoute.js +0 -20
- package/dist/Routing/IMenuRoute.js.map +0 -1
- package/dist/Routing/_Exports.d.ts +0 -4
- package/dist/Routing/_Exports.js +0 -5
- package/dist/Routing/_Exports.js.map +0 -1
- package/dist/Services/ErrorHandler.d.ts +0 -5
- package/dist/Services/ErrorHandler.js +0 -23
- package/dist/Services/ErrorHandler.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Other.js","sourceRoot":"","sources":["../../../src/ReactComponents/Grid/Other.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,SAAS,MAAM,WAAW,CAAC;AAGlC;IAAkC,wCAA8B;IAAhE;;IAeA,CAAC;IATG,6BAAM,GAAN;QAAA,iBAQC;QAPG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAErC,OAAO,CACH,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YACvB,+BAAS,CAAC,CAAC;YACX;gBAAI,oBAAC,SAAS,IAAC,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,cAAM,OAAC,KAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAA4B,CAAC,MAAM,CAAC,KAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAI,CAAC,IAAI,CAAC,EAAxF,CAAwF,GAAc,CAAK,CAC1K,CAAA;IACL,CAAC;IAbM,wBAAW,GAAG,WAAW,CAAC;IAcrC,mBAAC;CAAA,AAfD,CAAkC,KAAK,CAAC,SAAS,GAehD;SAfY,YAAY"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare class ReactHelpers {
|
|
3
|
-
/** If a string starts with fa- or far-, this will return an 'i' tag with the font-awesome class name. Otherwise it will return the passed in string. */
|
|
4
|
-
static textOrIcon(textOrIcon: string): string | JSX.Element;
|
|
5
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Utils } from '@singularsystems/neo-core';
|
|
3
|
-
var ReactHelpers = /** @class */ (function () {
|
|
4
|
-
function ReactHelpers() {
|
|
5
|
-
}
|
|
6
|
-
/** If a string starts with fa- or far-, this will return an 'i' tag with the font-awesome class name. Otherwise it will return the passed in string. */
|
|
7
|
-
ReactHelpers.textOrIcon = function (textOrIcon) {
|
|
8
|
-
if (textOrIcon.indexOf("fa-") === 0 || textOrIcon.indexOf("far-") === 0) {
|
|
9
|
-
return React.createElement("i", { className: Utils.getFontAwesomeClass(textOrIcon) });
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return textOrIcon;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
return ReactHelpers;
|
|
16
|
-
}());
|
|
17
|
-
export { ReactHelpers };
|
|
18
|
-
//# sourceMappingURL=Helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Helpers.js","sourceRoot":"","sources":["../../src/ReactComponents/Helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD;IAAA;IAWA,CAAC;IATG,wJAAwJ;IAC1I,uBAAU,GAAxB,UAAyB,UAAkB;QACvC,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;YACrE,OAAO,2BAAG,SAAS,EAAE,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,GAAM,CAAA;SACnE;aAAM;YACH,OAAO,UAAU,CAAC;SACrB;IAEL,CAAC;IACL,mBAAC;AAAD,CAAC,AAXD,IAWC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ICommonEditorProps, IEditorNormalisedProps } from './PropTypes';
|
|
3
|
-
export default abstract class InputBase<T extends ICommonEditorProps> extends React.Component<T> {
|
|
4
|
-
protected inputRef: React.RefObject<HTMLElement>;
|
|
5
|
-
protected currentProps: ICommonEditorProps;
|
|
6
|
-
componentDidMount(): void;
|
|
7
|
-
componentDidUpdate(): void;
|
|
8
|
-
protected getNormalisedProps(): IEditorNormalisedProps<React.HTMLProps<HTMLElement>>;
|
|
9
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as tslib_1 from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BindPropsHelper } from './PropTypes';
|
|
4
|
-
var InputBase = /** @class */ (function (_super) {
|
|
5
|
-
tslib_1.__extends(InputBase, _super);
|
|
6
|
-
function InputBase() {
|
|
7
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
8
|
-
_this.inputRef = React.createRef();
|
|
9
|
-
return _this;
|
|
10
|
-
}
|
|
11
|
-
InputBase.prototype.componentDidMount = function () {
|
|
12
|
-
if (this.currentProps.isFocused && this.inputRef.current) {
|
|
13
|
-
this.inputRef.current.focus();
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
InputBase.prototype.componentDidUpdate = function () {
|
|
17
|
-
if (this.currentProps.isFocused && this.inputRef.current) {
|
|
18
|
-
this.inputRef.current.focus();
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
InputBase.prototype.getNormalisedProps = function () {
|
|
22
|
-
var splitProps = BindPropsHelper.normaliseEditorProps(this.props);
|
|
23
|
-
this.currentProps = splitProps.editor;
|
|
24
|
-
return splitProps;
|
|
25
|
-
};
|
|
26
|
-
return InputBase;
|
|
27
|
-
}(React.Component));
|
|
28
|
-
export default InputBase;
|
|
29
|
-
//# sourceMappingURL=InputBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputBase.js","sourceRoot":"","sources":["../../src/ReactComponents/InputBase.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,eAAe,EAA0B,MAAM,aAAa,CAAC;AAE1F;IAA8E,qCAAkB;IAAhG;QAAA,qEAsBC;QApBa,cAAQ,GAAG,KAAK,CAAC,SAAS,EAAe,CAAC;;IAoBxD,CAAC;IAjBG,qCAAiB,GAAjB;QACI,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACtD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SACjC;IACL,CAAC;IAED,sCAAkB,GAAlB;QACI,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACtD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SACjC;IACL,CAAC;IAES,sCAAkB,GAA5B;QACI,IAAM,UAAU,GAAG,eAAe,CAAC,oBAAoB,CAA+B,IAAI,CAAC,KAAK,CAAC,CAAC;QAClG,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC;QACtC,OAAO,UAAU,CAAC;IACtB,CAAC;IACL,gBAAC;AAAD,CAAC,AAtBD,CAA8E,KAAK,CAAC,SAAS,GAsB5F"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as tslib_1 from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import ReactDOM from 'react-dom';
|
|
4
|
-
import Modal from './Modal';
|
|
5
|
-
import { Misc } from '@singularsystems/neo-core';
|
|
6
|
-
export default function showModal(title, message, modalOptions) {
|
|
7
|
-
var container = document.getElementById("root"); // document.createElement("div");
|
|
8
|
-
var modal;
|
|
9
|
-
var modalProps = modalOptions;
|
|
10
|
-
modalProps.title = title;
|
|
11
|
-
function onClose() {
|
|
12
|
-
modalProps.show = false;
|
|
13
|
-
modal = React.createElement(Modal, tslib_1.__assign({}, modalProps), message);
|
|
14
|
-
console.log("render hide");
|
|
15
|
-
ReactDOM.render(modal, container);
|
|
16
|
-
setTimeout(function () {
|
|
17
|
-
ReactDOM.unmountComponentAtNode(container);
|
|
18
|
-
}, Misc.Settings.modalAnimationTimeMs);
|
|
19
|
-
}
|
|
20
|
-
function interceptClick(onClick) {
|
|
21
|
-
return function (e) {
|
|
22
|
-
onClose();
|
|
23
|
-
if (onClick)
|
|
24
|
-
onClick(e);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
modalProps.show = true;
|
|
28
|
-
modalProps.onClose = interceptClick(modalProps.onClose);
|
|
29
|
-
if (modalProps.closeButton)
|
|
30
|
-
modalProps.closeButton.onClick = interceptClick(modalProps.closeButton.onClick);
|
|
31
|
-
if (modalProps.acceptButton)
|
|
32
|
-
modalProps.acceptButton.onClick = interceptClick(modalProps.acceptButton.onClick);
|
|
33
|
-
if (modalProps.buttons) {
|
|
34
|
-
for (var _i = 0, _a = modalProps.buttons; _i < _a.length; _i++) {
|
|
35
|
-
var button = _a[_i];
|
|
36
|
-
button.onClick = interceptClick(button.onClick);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
modal = React.createElement(Modal, tslib_1.__assign({}, modalProps), message);
|
|
40
|
-
console.log("render show");
|
|
41
|
-
ReactDOM.render(modal, container);
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=ModalFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModalFactory.js","sourceRoot":"","sources":["../../../src/ReactComponents/Modal/ModalFactory.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAa,EAAE,OAAe,EAAE,YAAoC;IAElG,IAAI,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAE,CAAC,CAAC,iCAAiC;IACnF,IAAI,KAAkB,CAAC;IACvB,IAAI,UAAU,GAAG,YAA6B,CAAC;IAC/C,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;IAEzB,SAAS,OAAO;QACZ,UAAU,CAAC,IAAI,GAAG,KAAK,CAAC;QACxB,KAAK,GAAG,oBAAC,KAAK,uBAAK,UAAU,GAAG,OAAO,CAAS,CAAA;QAEhD,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC3B,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAClC,UAAU,CAAC;YACP,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QAC/C,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAC3C,CAAC;IAED,SAAS,cAAc,CAAC,OAA0B;QAC9C,OAAO,UAAC,CAAM;YACV,OAAO,EAAE,CAAC;YACV,IAAI,OAAO;gBAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAA;IACL,CAAC;IAED,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACxD,IAAI,UAAU,CAAC,WAAW;QAAE,UAAU,CAAC,WAAW,CAAC,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5G,IAAI,UAAU,CAAC,YAAY;QAAE,UAAU,CAAC,YAAY,CAAC,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAC/G,IAAI,UAAU,CAAC,OAAO,EAAE;QACpB,KAAmB,UAAkB,EAAlB,KAAA,UAAU,CAAC,OAAO,EAAlB,cAAkB,EAAlB,IAAkB,EAAE;YAAlC,IAAI,MAAM,SAAA;YACX,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACnD;KACJ;IAED,KAAK,GAAG,oBAAC,KAAK,uBAAK,UAAU,GAAG,OAAO,CAAS,CAAA;IAChD,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Model } from '@singularsystems/neo-core';
|
|
2
|
-
export interface ITabController {
|
|
3
|
-
selectedTab: string;
|
|
4
|
-
/**
|
|
5
|
-
* Registers a callback to run when the tab is first displayed, or when reset is called with reInitialise=true.
|
|
6
|
-
*/
|
|
7
|
-
onTabInitialise(tabKey: string, callback: () => void): ITabController;
|
|
8
|
-
/**
|
|
9
|
-
* Registers a callback to run whenever the tab with this tab key is displayed.
|
|
10
|
-
*/
|
|
11
|
-
onTabDisplayed(tabKey: string, callback: () => void): ITabController;
|
|
12
|
-
}
|
|
13
|
-
export interface ITabControllerInternal extends ITabController {
|
|
14
|
-
initialise(): void;
|
|
15
|
-
destroy(): void;
|
|
16
|
-
}
|
|
17
|
-
export declare class TabController {
|
|
18
|
-
private reactionDisposer;
|
|
19
|
-
observable: Model.ObservableValue<string>;
|
|
20
|
-
/**
|
|
21
|
-
* Creates a tab controller used to bind to a tab container.
|
|
22
|
-
* @param selectedTab Initially selected tab.
|
|
23
|
-
* If this is left blank, call setInitial() to select the initial tab, e.g. from a view param in View.Initialise()
|
|
24
|
-
*/
|
|
25
|
-
constructor(selectedTab?: string);
|
|
26
|
-
/** Called by tab container. */
|
|
27
|
-
private initialise;
|
|
28
|
-
/** Called by tab container. */
|
|
29
|
-
private destroy;
|
|
30
|
-
get selectedTab(): string;
|
|
31
|
-
set selectedTab(value: string);
|
|
32
|
-
/**
|
|
33
|
-
* Registers a callback to run when the tab is first displayed, or when reset is called with reInitialise=true.
|
|
34
|
-
*/
|
|
35
|
-
onTabInitialise(tabKey: string, callback: () => void): this;
|
|
36
|
-
/**
|
|
37
|
-
* Registers a callback to run whenever the tab with this tab key is displayed.
|
|
38
|
-
*/
|
|
39
|
-
onTabDisplayed(tabKey: string, callback: () => void): this;
|
|
40
|
-
private getTab;
|
|
41
|
-
/**
|
|
42
|
-
* Marks the tab as 'initial'.
|
|
43
|
-
* @param invokeCallback True if the initialCallback should be invoked.
|
|
44
|
-
*/
|
|
45
|
-
reset(tabKey: string, reInitialise?: boolean): void;
|
|
46
|
-
/**
|
|
47
|
-
* Marks all tabs as 'initial'.
|
|
48
|
-
*/
|
|
49
|
-
resetAll(): void;
|
|
50
|
-
private tabs;
|
|
51
|
-
private onTabChanged;
|
|
52
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { Model } from '@singularsystems/neo-core';
|
|
2
|
-
import { reaction } from 'mobx';
|
|
3
|
-
var TabController = /** @class */ (function () {
|
|
4
|
-
/**
|
|
5
|
-
* Creates a tab controller used to bind to a tab container.
|
|
6
|
-
* @param selectedTab Initially selected tab.
|
|
7
|
-
* If this is left blank, call setInitial() to select the initial tab, e.g. from a view param in View.Initialise()
|
|
8
|
-
*/
|
|
9
|
-
function TabController(selectedTab) {
|
|
10
|
-
if (selectedTab === void 0) { selectedTab = ""; }
|
|
11
|
-
this.reactionDisposer = null;
|
|
12
|
-
this.observable = new Model.ObservableValue("");
|
|
13
|
-
this.tabs = {};
|
|
14
|
-
this.selectedTab = selectedTab;
|
|
15
|
-
this.onTabChanged = this.onTabChanged.bind(this);
|
|
16
|
-
}
|
|
17
|
-
/** Called by tab container. */
|
|
18
|
-
TabController.prototype.initialise = function () {
|
|
19
|
-
var _this = this;
|
|
20
|
-
this.reactionDisposer = reaction(function () { return _this.selectedTab; }, this.onTabChanged);
|
|
21
|
-
if (this.selectedTab !== "") {
|
|
22
|
-
this.onTabChanged();
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
/** Called by tab container. */
|
|
26
|
-
TabController.prototype.destroy = function () {
|
|
27
|
-
if (this.reactionDisposer) {
|
|
28
|
-
this.reactionDisposer();
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(TabController.prototype, "selectedTab", {
|
|
32
|
-
get: function () {
|
|
33
|
-
return this.observable.value;
|
|
34
|
-
},
|
|
35
|
-
set: function (value) {
|
|
36
|
-
this.observable.value = value;
|
|
37
|
-
},
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true
|
|
40
|
-
});
|
|
41
|
-
/**
|
|
42
|
-
* Registers a callback to run when the tab is first displayed, or when reset is called with reInitialise=true.
|
|
43
|
-
*/
|
|
44
|
-
TabController.prototype.onTabInitialise = function (tabKey, callback) {
|
|
45
|
-
var tab = this.getTab(tabKey);
|
|
46
|
-
tab.onInitialise = callback;
|
|
47
|
-
return this;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Registers a callback to run whenever the tab with this tab key is displayed.
|
|
51
|
-
*/
|
|
52
|
-
TabController.prototype.onTabDisplayed = function (tabKey, callback) {
|
|
53
|
-
var tab = this.getTab(tabKey);
|
|
54
|
-
tab.onDisplayed = callback;
|
|
55
|
-
return this;
|
|
56
|
-
};
|
|
57
|
-
TabController.prototype.getTab = function (tabKey) {
|
|
58
|
-
var tab = this.tabs[tabKey];
|
|
59
|
-
if (!tab) {
|
|
60
|
-
tab = { hasFetched: false };
|
|
61
|
-
this.tabs[tabKey] = tab;
|
|
62
|
-
}
|
|
63
|
-
return tab;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Marks the tab as 'initial'.
|
|
67
|
-
* @param invokeCallback True if the initialCallback should be invoked.
|
|
68
|
-
*/
|
|
69
|
-
TabController.prototype.reset = function (tabKey, reInitialise) {
|
|
70
|
-
if (reInitialise === void 0) { reInitialise = false; }
|
|
71
|
-
var tab = this.tabs[tabKey];
|
|
72
|
-
if (tab) {
|
|
73
|
-
if (reInitialise && tab.onInitialise) {
|
|
74
|
-
tab.onInitialise();
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
tab.hasFetched = false;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Marks all tabs as 'initial'.
|
|
83
|
-
*/
|
|
84
|
-
TabController.prototype.resetAll = function () {
|
|
85
|
-
this.tabs = {};
|
|
86
|
-
};
|
|
87
|
-
TabController.prototype.onTabChanged = function () {
|
|
88
|
-
var tab = this.tabs[this.observable.peek];
|
|
89
|
-
if (tab) {
|
|
90
|
-
if (!tab.hasFetched) {
|
|
91
|
-
tab.hasFetched = true;
|
|
92
|
-
if (tab.onInitialise) {
|
|
93
|
-
tab.onInitialise();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (tab.onDisplayed) {
|
|
97
|
-
tab.onDisplayed();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
return TabController;
|
|
102
|
-
}());
|
|
103
|
-
export { TabController };
|
|
104
|
-
//# sourceMappingURL=TabController.js.map
|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G,IAAI,CAAC;gBAEtB,IAAI,GAAG,CAAC,YAAY,EAAE;oBAClB,GAAG,CAAC,YAAY,EAAE,CAAC;iBACtB;aACJ;YACD,IAAI,GAAG,CAAC,WAAW,EAAE;gBACjB,GAAG,CAAC,WAAW,EAAE,CAAC;aACrB;SACJ;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AA9GD,IA8GC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { FileManager, BoundFileManager } from '@singularsystems/neo-core/dist/Components';
|
|
2
|
-
import { PageManager, PageRequest, PageResult } from '@singularsystems/neo-core/dist/Data';
|
|
3
|
-
import { TabController } from './Tabs/TabController';
|
|
4
|
-
export { BoundFileManager, FileManager, PageManager, PageRequest, PageResult, TabController };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { FileManager, BoundFileManager, } from '@singularsystems/neo-core/dist/Components';
|
|
2
|
-
import { PageManager, PageRequest, PageResult } from '@singularsystems/neo-core/dist/Data';
|
|
3
|
-
import { TabController } from './Tabs/TabController';
|
|
4
|
-
export { BoundFileManager, FileManager, PageManager, PageRequest, PageResult, TabController };
|
|
5
|
-
//# sourceMappingURL=_Controllers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_Controllers.js","sourceRoot":"","sources":["../../src/ReactComponents/_Controllers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,gBAAgB,GACnB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EACH,WAAW,EACX,WAAW,EACX,UAAU,EACb,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EACH,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,WAAW,EACX,UAAU,EACV,aAAa,EAChB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_UIHelpers.js","sourceRoot":"","sources":["../../src/ReactComponents/_UIHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EACH,aAAa,EACb,UAAU,EACb,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import ViewBase from '../Views/ViewBase';
|
|
2
|
-
import { Routing } from '@singularsystems/neo-core';
|
|
3
|
-
export declare class MenuRoute<TParams> implements Routing.IMenuRoute {
|
|
4
|
-
constructor(baseRoute: {
|
|
5
|
-
path: string;
|
|
6
|
-
component: new (...args: any) => ViewBase<any, TParams>;
|
|
7
|
-
}, menuParams: Routing.IMenuRoute, viewParams?: {
|
|
8
|
-
[P in keyof TParams]?: number | string | null;
|
|
9
|
-
});
|
|
10
|
-
path: string;
|
|
11
|
-
basePath: string;
|
|
12
|
-
name: string;
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ViewParameterList } from './ViewParameterList';
|
|
2
|
-
var MenuRoute = /** @class */ (function () {
|
|
3
|
-
function MenuRoute(baseRoute, menuParams, viewParams) {
|
|
4
|
-
var _this = this;
|
|
5
|
-
Object.getOwnPropertyNames(baseRoute).forEach(function (propertyName) {
|
|
6
|
-
_this[propertyName] = baseRoute[propertyName];
|
|
7
|
-
});
|
|
8
|
-
Object.getOwnPropertyNames(menuParams).forEach(function (propertyName) {
|
|
9
|
-
_this[propertyName] = menuParams[propertyName];
|
|
10
|
-
});
|
|
11
|
-
this.basePath = this.path;
|
|
12
|
-
if (viewParams) {
|
|
13
|
-
var viewParameterList = new ViewParameterList(baseRoute.component.params);
|
|
14
|
-
this.path = viewParameterList.getPathForValues(this.basePath, viewParams);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return MenuRoute;
|
|
18
|
-
}());
|
|
19
|
-
export { MenuRoute };
|
|
20
|
-
//# sourceMappingURL=IMenuRoute.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IMenuRoute.js","sourceRoot":"","sources":["../../src/Routing/IMenuRoute.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;IAEI,mBAAY,SAAoF,EAC5F,UAA8B,EAC9B,UAA8D;QAFlE,iBAkBC;QAdG,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAA,YAAY;YACtD,KAAI,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAA,YAAY;YACvD,KAAI,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAE1B,IAAI,UAAU,EAAE;YACZ,IAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAE,SAAS,CAAC,SAAkC,CAAC,MAAM,CAAC,CAAC;YACtG,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;SAC7E;IACL,CAAC;IAKL,gBAAC;AAAD,CAAC,AAzBD,IAyBC"}
|
package/dist/Routing/_Exports.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_Exports.js","sourceRoot":"","sources":["../../src/Routing/_Exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Components } from '@singularsystems/neo-core';
|
|
2
|
-
import { IErrorDisplay } from '@singularsystems/neo-core/dist/Components/ErrorHandler';
|
|
3
|
-
export declare class ErrorHandler extends Components.ErrorHandler {
|
|
4
|
-
protected displayModal(error: any, statusCode: number | undefined, errorDisplay: IErrorDisplay): void;
|
|
5
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { __decorate, __extends } from "tslib";
|
|
2
|
-
import { Components, ModalUtils } from '@singularsystems/neo-core';
|
|
3
|
-
import { injectable } from 'inversify';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
var ErrorHandler = /** @class */ (function (_super) {
|
|
6
|
-
__extends(ErrorHandler, _super);
|
|
7
|
-
function ErrorHandler() {
|
|
8
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
9
|
-
}
|
|
10
|
-
ErrorHandler.prototype.displayModal = function (error, statusCode, errorDisplay) {
|
|
11
|
-
var body = errorDisplay.body;
|
|
12
|
-
if (errorDisplay.showAdditionalInfo) {
|
|
13
|
-
body += "\n\nTimestamp: " + new Date().toISOString();
|
|
14
|
-
}
|
|
15
|
-
ModalUtils.showMessage(errorDisplay.header, React.createElement("pre", null, errorDisplay.body));
|
|
16
|
-
};
|
|
17
|
-
ErrorHandler = __decorate([
|
|
18
|
-
injectable()
|
|
19
|
-
], ErrorHandler);
|
|
20
|
-
return ErrorHandler;
|
|
21
|
-
}(Components.ErrorHandler));
|
|
22
|
-
export { ErrorHandler };
|
|
23
|
-
//# sourceMappingURL=ErrorHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHandler.js","sourceRoot":"","sources":["../../src/Services/ErrorHandler.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;IAAkC,gCAAuB;IAAzD;;IAYA,CAAC;IAVa,mCAAY,GAAtB,UAAuB,KAAU,EAAE,UAA8B,EAAE,YAA2B;QAE1F,IAAI,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;QAE7B,IAAI,YAAY,CAAC,kBAAkB,EAAE;YACjC,IAAI,IAAI,iBAAiB,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SACxD;QAED,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,iCAAM,YAAY,CAAC,IAAI,CAAO,CAAC,CAAC;IAChF,CAAC;IAXQ,YAAY;QADxB,UAAU,EAAE;OACA,YAAY,CAYxB;IAAD,mBAAC;CAAA,AAZD,CAAkC,UAAU,CAAC,YAAY,GAYxD;SAZY,YAAY"}
|