@singularsystems/neo-react 1.1.2 → 1.1.4
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/ReactComponents/FileManager/FileInput.d.ts +1 -0
- package/dist/ReactComponents/Grid/Grid.d.ts +10 -5
- package/dist/ReactComponents/Grid/Grid.js +15 -4
- package/dist/ReactComponents/Transitions/Transition.d.ts +5 -1
- package/dist/ReactComponents/Transitions/Transition.js +6 -2
- package/dist/ReactComponents/Transitions/TransitionContainer.d.ts +2 -0
- package/dist/ReactComponents/Transitions/TransitionContainer.js +7 -1
- package/dist/ReactComponents/Transitions/TransitionController.d.ts +6 -2
- package/dist/ReactComponents/Transitions/TransitionController.js +41 -25
- package/dist/ReactComponents/Transitions/TransitionPanel.d.ts +4 -0
- package/dist/ReactComponents/Transitions/TransitionPanel.js +2 -2
- package/dist/Routing/RouteView.d.ts +0 -1
- package/dist/Routing/RouteView.js +0 -1
- package/package.json +3 -3
|
@@ -13,6 +13,7 @@ export interface IFileEditorProps extends IFileComponentProps, Partial<Component
|
|
|
13
13
|
downloadLinkText?: string;
|
|
14
14
|
/**
|
|
15
15
|
* Path of API endpoint which will handle downloading a file. Only required if downloadLinkText is specified.
|
|
16
|
+
* Use `downloadEndpointAsync` when asynchronously returning a download link with sas token.
|
|
16
17
|
*/
|
|
17
18
|
downloadEndpoint?: string | ((fileID: any) => string);
|
|
18
19
|
/**
|
|
@@ -4,6 +4,7 @@ import { DataViewContext } from '../../React/DataView';
|
|
|
4
4
|
import { IButtonOptions } from '@singularsystems/neo-core/dist/Components/ButtonOptions';
|
|
5
5
|
import { ItemCallback } from '../PropTypes';
|
|
6
6
|
export type GridSection = "header" | "body" | "footer";
|
|
7
|
+
export type BorderType = "standard" | "borderless" | "bordered";
|
|
7
8
|
export declare class GridContextParams<T> {
|
|
8
9
|
currentItem: T;
|
|
9
10
|
section: GridSection;
|
|
@@ -53,18 +54,22 @@ export interface IGridProps<T> extends Omit<React.HTMLProps<HTMLTableElement>, "
|
|
|
53
54
|
initialSort?: keyof T | (keyof T)[];
|
|
54
55
|
initialSortAscending?: boolean | boolean[];
|
|
55
56
|
children: ItemCallback<T>;
|
|
57
|
+
/** @deprecated Use `borderType` instead. */
|
|
58
|
+
isBordered?: boolean;
|
|
59
|
+
/** @deprecated Use `borderType` instead. */
|
|
60
|
+
isBorderless?: boolean;
|
|
56
61
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
62
|
+
* Specifies the bootstrap border type. This can also be specified globally in Misc.Settings.grid.borderType.
|
|
63
|
+
* - Standard = Only horizontal borders.
|
|
64
|
+
* - Bordered = All borders.
|
|
65
|
+
* - Borderless = No borders.
|
|
59
66
|
*/
|
|
60
|
-
|
|
67
|
+
borderType?: BorderType;
|
|
61
68
|
/**
|
|
62
69
|
* When specified, every alternating row will receive a slightly darker background color.
|
|
63
70
|
* Note, this will not work correctly if your grid has child rows. See the neo react demo pages for a solution.
|
|
64
71
|
*/
|
|
65
72
|
isStriped?: boolean;
|
|
66
|
-
/** When specified, the table will have no cell borders, and the table will have no main border. */
|
|
67
|
-
isBorderless?: boolean;
|
|
68
73
|
/** When specified, a background color will be applied on a row if it is being hovered over. */
|
|
69
74
|
showHover?: boolean;
|
|
70
75
|
/** When specified, the table size will be reduced (by reducing the padding sizes in each cell by half). */
|
|
@@ -45,7 +45,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
45
45
|
};
|
|
46
46
|
Grid.prototype.render = function () {
|
|
47
47
|
var _this = this;
|
|
48
|
-
var _a = this.props, items = _a.items, showAddButton = _a.showAddButton, addButton = _a.addButton, filterPredicate = _a.filterPredicate, keyProperty = _a.keyProperty, allowSort = _a.allowSort, expandAll = _a.expandAll, collapseAll = _a.collapseAll, initialSort = _a.initialSort, initialSortAscending = _a.initialSortAscending, isBordered = _a.isBordered, isStriped = _a.isStriped,
|
|
48
|
+
var _a = this.props, items = _a.items, showAddButton = _a.showAddButton, addButton = _a.addButton, filterPredicate = _a.filterPredicate, keyProperty = _a.keyProperty, allowSort = _a.allowSort, expandAll = _a.expandAll, collapseAll = _a.collapseAll, initialSort = _a.initialSort, initialSortAscending = _a.initialSortAscending, isBordered = _a.isBordered, isBorderless = _a.isBorderless, isStriped = _a.isStriped, borderType = _a.borderType, showHover = _a.showHover, isSmallTable = _a.isSmallTable, footerContent = _a.footerContent, footerButtons = _a.footerButtons, stickyHeader = _a.stickyHeader, enableRowIndexes = _a.enableRowIndexes, children = _a.children, domProps = __rest(_a, ["items", "showAddButton", "addButton", "filterPredicate", "keyProperty", "allowSort", "expandAll", "collapseAll", "initialSort", "initialSortAscending", "isBordered", "isBorderless", "isStriped", "borderType", "showHover", "isSmallTable", "footerContent", "footerButtons", "stickyHeader", "enableRowIndexes", "children"]);
|
|
49
49
|
if (expandAll === true) {
|
|
50
50
|
this.gridContext.expandAll = true;
|
|
51
51
|
}
|
|
@@ -56,17 +56,28 @@ var Grid = /** @class */ (function (_super) {
|
|
|
56
56
|
this.gridContext.expandAll = undefined;
|
|
57
57
|
}
|
|
58
58
|
var className = Utils.joinWithSpaces(domProps.className, "table neo-grid");
|
|
59
|
-
|
|
60
|
-
if (
|
|
59
|
+
borderType !== null && borderType !== void 0 ? borderType : (borderType = Misc.Settings.grid.borderType);
|
|
60
|
+
if (borderType === undefined) {
|
|
61
|
+
var noBorders = isBorderless !== null && isBorderless !== void 0 ? isBorderless : Misc.Settings.grid.isBorderless;
|
|
62
|
+
if (noBorders) {
|
|
63
|
+
borderType = "borderless";
|
|
64
|
+
}
|
|
65
|
+
else if (isBordered !== null && isBordered !== void 0 ? isBordered : Misc.Settings.grid.isBordered) {
|
|
66
|
+
borderType = "bordered";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (borderType === "bordered") {
|
|
61
70
|
className += " table-bordered";
|
|
62
71
|
}
|
|
72
|
+
else if (borderType === "borderless") {
|
|
73
|
+
className += " table-borderless";
|
|
74
|
+
}
|
|
63
75
|
// apply striped styling
|
|
64
76
|
if (isStriped !== null && isStriped !== void 0 ? isStriped : Misc.Settings.grid.isStriped) {
|
|
65
77
|
className += " table-striped";
|
|
66
78
|
}
|
|
67
79
|
// apply borderless styling
|
|
68
80
|
if (isBorderless !== null && isBorderless !== void 0 ? isBorderless : Misc.Settings.grid.isBorderless) {
|
|
69
|
-
className += " table-borderless";
|
|
70
81
|
}
|
|
71
82
|
// apply hover styling
|
|
72
83
|
if (showHover !== null && showHover !== void 0 ? showHover : Misc.Settings.grid.showHover) {
|
|
@@ -2,7 +2,11 @@ export declare class Transition {
|
|
|
2
2
|
setBeforeStyles: (element: HTMLElement, out: boolean, toLeft: boolean) => void;
|
|
3
3
|
setAfterStyles: (element: HTMLElement, out: boolean, toLeft: boolean) => void;
|
|
4
4
|
cleanup: (element: HTMLElement) => void;
|
|
5
|
-
|
|
5
|
+
/** Set to true if the animation causes the elements height to change. E.g. zoom type transitions */
|
|
6
|
+
changesHeight: boolean;
|
|
7
|
+
constructor(setBeforeStyles: (element: HTMLElement, out: boolean, toLeft: boolean) => void, setAfterStyles: (element: HTMLElement, out: boolean, toLeft: boolean) => void, cleanup: (element: HTMLElement) => void,
|
|
8
|
+
/** Set to true if the animation causes the elements height to change. E.g. zoom type transitions */
|
|
9
|
+
changesHeight?: boolean);
|
|
6
10
|
static leftRight: Transition;
|
|
7
11
|
static upDown: Transition;
|
|
8
12
|
static inOut: Transition;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
var Transition = /** @class */ (function () {
|
|
2
|
-
function Transition(setBeforeStyles, setAfterStyles, cleanup
|
|
2
|
+
function Transition(setBeforeStyles, setAfterStyles, cleanup,
|
|
3
|
+
/** Set to true if the animation causes the elements height to change. E.g. zoom type transitions */
|
|
4
|
+
changesHeight) {
|
|
5
|
+
if (changesHeight === void 0) { changesHeight = false; }
|
|
3
6
|
this.setBeforeStyles = setBeforeStyles;
|
|
4
7
|
this.setAfterStyles = setAfterStyles;
|
|
5
8
|
this.cleanup = cleanup;
|
|
9
|
+
this.changesHeight = changesHeight;
|
|
6
10
|
}
|
|
7
11
|
Transition.leftRight = new Transition(function (element, out, toLeft) { return element.style.left = ((toLeft ? 1 : -1) * (out ? 0 : 150)) + "px"; }, function (element, out, toLeft) { return element.style.left = ((toLeft ? -1 : 1) * (out ? 150 : 0)) + "px"; }, function (element) { return element.style.left = ""; });
|
|
8
12
|
Transition.upDown = new Transition(function (element, out, toLeft) { return element.style.top = ((toLeft ? 1 : -1) * (out ? 0 : 100)) + "px"; }, function (element, out, toLeft) { return element.style.top = ((toLeft ? -1 : 1) * (out ? 100 : 0)) + "px"; }, function (element) { return element.style.top = ""; });
|
|
9
|
-
Transition.inOut = new Transition(function (element, out, toLeft) { return element.style.transform = out ? "scale(1)" : (toLeft ? "scale(0.8)" : "scale(1.2)"); }, function (element, out, toLeft) { return element.style.transform = out ? (toLeft ? "scale(1.2)" : "scale(0.8)") : "scale(1)"; }, function (element) { return element.style.transform = ""; });
|
|
13
|
+
Transition.inOut = new Transition(function (element, out, toLeft) { return element.style.transform = out ? "scale(1)" : (toLeft ? "scale(0.8)" : "scale(1.2)"); }, function (element, out, toLeft) { return element.style.transform = out ? (toLeft ? "scale(1.2)" : "scale(0.8)") : "scale(1)"; }, function (element) { return element.style.transform = ""; }, true);
|
|
10
14
|
Transition.fadeOnly = new Transition(function () { }, function () { }, function () { });
|
|
11
15
|
return Transition;
|
|
12
16
|
}());
|
|
@@ -8,6 +8,8 @@ export declare const TransitionContext: React.Context<ITransitionContextState>;
|
|
|
8
8
|
interface ITransitionContainerProps {
|
|
9
9
|
controller?: TransitionController;
|
|
10
10
|
transition?: Transition;
|
|
11
|
+
/** Transition to use when going backwards. */
|
|
12
|
+
backTransition?: Transition;
|
|
11
13
|
children: React.ReactNode;
|
|
12
14
|
}
|
|
13
15
|
export default class TransitionContainer extends React.Component<ITransitionContainerProps> {
|
|
@@ -8,11 +8,17 @@ var TransitionContainer = /** @class */ (function (_super) {
|
|
|
8
8
|
var _this = _super.call(this, props) || this;
|
|
9
9
|
_this.containerRef = React.createRef();
|
|
10
10
|
if (!_this.props.controller) {
|
|
11
|
-
_this.controller = new TransitionController(undefined, _this.props.transition);
|
|
11
|
+
_this.controller = new TransitionController(undefined, _this.props.transition, _this.props.backTransition);
|
|
12
12
|
_this.controller.wasAutoCreated = true;
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
15
|
_this.controller = _this.props.controller;
|
|
16
|
+
if (_this.props.transition) {
|
|
17
|
+
_this.controller.defaultTransition = _this.props.transition;
|
|
18
|
+
}
|
|
19
|
+
if (_this.props.backTransition) {
|
|
20
|
+
_this.controller.defaultBackTransition = _this.props.backTransition;
|
|
21
|
+
}
|
|
16
22
|
}
|
|
17
23
|
_this.contextState = { controller: _this.controller };
|
|
18
24
|
return _this;
|
|
@@ -2,14 +2,18 @@ import { Transition } from "./Transition";
|
|
|
2
2
|
export declare class TransitionController {
|
|
3
3
|
/** Global default transition. */
|
|
4
4
|
static transition: Transition;
|
|
5
|
+
/** Allows transitions to be disabled for the whole app. */
|
|
6
|
+
static disableTransitions: boolean;
|
|
5
7
|
/**
|
|
6
8
|
* Creates a transition controller.
|
|
7
9
|
* @param initialName Name of the panel to display initially. Not required if `isVisible` props are defined on the panels.
|
|
8
10
|
* @param transition Transition type to use by default on all panels.
|
|
11
|
+
* @param backTransition Transition type to use when going backwards.
|
|
9
12
|
*/
|
|
10
|
-
constructor(initialName?: string, transition?: Transition);
|
|
13
|
+
constructor(initialName?: string, transition?: Transition, backTransition?: Transition);
|
|
11
14
|
private _selectedName;
|
|
12
|
-
|
|
15
|
+
defaultTransition: Transition;
|
|
16
|
+
defaultBackTransition: Transition;
|
|
13
17
|
private direction;
|
|
14
18
|
private isFirstTransition;
|
|
15
19
|
private isTransitioning;
|
|
@@ -7,8 +7,9 @@ var TransitionController = /** @class */ (function () {
|
|
|
7
7
|
* Creates a transition controller.
|
|
8
8
|
* @param initialName Name of the panel to display initially. Not required if `isVisible` props are defined on the panels.
|
|
9
9
|
* @param transition Transition type to use by default on all panels.
|
|
10
|
+
* @param backTransition Transition type to use when going backwards.
|
|
10
11
|
*/
|
|
11
|
-
function TransitionController(initialName, transition) {
|
|
12
|
+
function TransitionController(initialName, transition, backTransition) {
|
|
12
13
|
this._selectedName = "";
|
|
13
14
|
this.direction = 1;
|
|
14
15
|
this.isFirstTransition = true;
|
|
@@ -22,6 +23,7 @@ var TransitionController = /** @class */ (function () {
|
|
|
22
23
|
this._selectedName = initialName !== null && initialName !== void 0 ? initialName : "";
|
|
23
24
|
makeObservable(this);
|
|
24
25
|
this.defaultTransition = transition !== null && transition !== void 0 ? transition : TransitionController.transition;
|
|
26
|
+
this.defaultBackTransition = backTransition !== null && backTransition !== void 0 ? backTransition : this.defaultTransition;
|
|
25
27
|
}
|
|
26
28
|
Object.defineProperty(TransitionController.prototype, "selectedPanel", {
|
|
27
29
|
/**
|
|
@@ -92,7 +94,7 @@ var TransitionController = /** @class */ (function () {
|
|
|
92
94
|
* @internal
|
|
93
95
|
* Called by each panel after render.
|
|
94
96
|
*/
|
|
95
|
-
TransitionController.prototype.afterUpdate = function (name, element, transition) {
|
|
97
|
+
TransitionController.prototype.afterUpdate = function (name, element, transition, animateHeight) {
|
|
96
98
|
if (this._selectedName === name && !this.isTransitioning) {
|
|
97
99
|
var panelState_1 = this.panelStates.find(function (c) { return c.name === name; });
|
|
98
100
|
var transitionIn = false;
|
|
@@ -107,7 +109,7 @@ var TransitionController = /** @class */ (function () {
|
|
|
107
109
|
transitionIn = true;
|
|
108
110
|
}
|
|
109
111
|
if (transitionIn && !this.isFirstTransition) {
|
|
110
|
-
panelState_1.inTimer = this.transitionElement(panelState_1.element, panelState_1.transition, this.direction > 0, false, function () {
|
|
112
|
+
panelState_1.inTimer = this.transitionElement(panelState_1.element, panelState_1.transition, this.direction > 0, false, animateHeight !== null && animateHeight !== void 0 ? animateHeight : true, function () {
|
|
111
113
|
panelState_1.inTimer = undefined;
|
|
112
114
|
});
|
|
113
115
|
}
|
|
@@ -165,7 +167,7 @@ var TransitionController = /** @class */ (function () {
|
|
|
165
167
|
panelState.inTimer = undefined;
|
|
166
168
|
}
|
|
167
169
|
if (!panelState.outTimer) {
|
|
168
|
-
panelState.outTimer = this_1.transitionElement(panelState.element, panelState.transition, this_1.direction > 0, true, function () {
|
|
170
|
+
panelState.outTimer = this_1.transitionElement(panelState.element, panelState.transition, this_1.direction > 0, true, true, function () {
|
|
169
171
|
_this.panelStates.remove(panelState);
|
|
170
172
|
});
|
|
171
173
|
}
|
|
@@ -176,28 +178,32 @@ var TransitionController = /** @class */ (function () {
|
|
|
176
178
|
_loop_1(panelState);
|
|
177
179
|
}
|
|
178
180
|
};
|
|
179
|
-
TransitionController.prototype.transitionElement = function (element, transition, toLeft, out, onComplete) {
|
|
181
|
+
TransitionController.prototype.transitionElement = function (element, transition, toLeft, out, animateHeight, onComplete) {
|
|
180
182
|
var _this = this;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.containerElement.classList.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
Components.AnimationHelper.triggerReflow(
|
|
195
|
-
|
|
183
|
+
var canAnimate = !TransitionController.disableTransitions;
|
|
184
|
+
transition !== null && transition !== void 0 ? transition : (transition = toLeft ? this.defaultTransition : this.defaultBackTransition);
|
|
185
|
+
if (canAnimate) {
|
|
186
|
+
element.style.overflow = "hidden";
|
|
187
|
+
var elementHeight_1 = element.getBoundingClientRect().height;
|
|
188
|
+
if (this.containerElement && !this.containerElement.classList.contains("transitioning")) {
|
|
189
|
+
this.containerElement.style.height = elementHeight_1 + "px";
|
|
190
|
+
this.containerElement.classList.add("transitioning");
|
|
191
|
+
}
|
|
192
|
+
element.style.opacity = out ? "1" : "0";
|
|
193
|
+
transition.setBeforeStyles(element, out, toLeft);
|
|
194
|
+
Components.AnimationHelper.triggerReflow(element);
|
|
195
|
+
element.classList.add("animate-".concat(out ? "out" : "in"));
|
|
196
|
+
Components.AnimationHelper.triggerReflow(element);
|
|
197
|
+
element.style.opacity = out ? "0" : "1";
|
|
198
|
+
transition.setAfterStyles(element, out, toLeft);
|
|
199
|
+
// Timeout needed to give time for child elements to render, in order to correctly calculate height.
|
|
200
|
+
setTimeout(function () {
|
|
201
|
+
if (!out && _this.containerElement) {
|
|
202
|
+
_this.containerElement.style.height = animateHeight ? (transition.changesHeight ? elementHeight_1 : element.getBoundingClientRect().height) + "px" : "";
|
|
203
|
+
}
|
|
204
|
+
}, 0);
|
|
196
205
|
}
|
|
197
|
-
|
|
198
|
-
transition.setAfterStyles(element, out, toLeft);
|
|
199
|
-
var duration = parseFloat(window.getComputedStyle(element).transitionDuration) * 1000;
|
|
200
|
-
return setTimeout(function () {
|
|
206
|
+
var cleanup = function () {
|
|
201
207
|
if (out) {
|
|
202
208
|
// Element will be removed from the dom, no need to cleanup props.
|
|
203
209
|
}
|
|
@@ -214,10 +220,20 @@ var TransitionController = /** @class */ (function () {
|
|
|
214
220
|
_this.containerElement.style.height = "";
|
|
215
221
|
}
|
|
216
222
|
}
|
|
217
|
-
}
|
|
223
|
+
};
|
|
224
|
+
if (canAnimate) {
|
|
225
|
+
var transitionDuration = parseFloat(window.getComputedStyle(element).transitionDuration) * 1000;
|
|
226
|
+
return setTimeout(cleanup, transitionDuration);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
cleanup();
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
218
232
|
};
|
|
219
233
|
/** Global default transition. */
|
|
220
234
|
TransitionController.transition = Transition.leftRight;
|
|
235
|
+
/** Allows transitions to be disabled for the whole app. */
|
|
236
|
+
TransitionController.disableTransitions = false;
|
|
221
237
|
__decorate([
|
|
222
238
|
observable.ref,
|
|
223
239
|
__metadata("design:type", String)
|
|
@@ -19,6 +19,10 @@ interface ITransitionPanelProps<T> {
|
|
|
19
19
|
isVisible?: boolean | T | null;
|
|
20
20
|
/** Override the transition for this panel only. */
|
|
21
21
|
transition?: Transition;
|
|
22
|
+
/** Indicates whether the container height is set during a transition. Transitions going from small height to a very large height may look better without height animation.
|
|
23
|
+
* `True` by default.
|
|
24
|
+
*/
|
|
25
|
+
animateHeight?: boolean;
|
|
22
26
|
}
|
|
23
27
|
export default class TransitionPanel<T = any> extends React.Component<ITransitionPanelProps<T>> {
|
|
24
28
|
static contextType: React.Context<import("./TransitionContainer").ITransitionContextState>;
|
|
@@ -26,7 +26,7 @@ var TransitionPanel = /** @class */ (function (_super) {
|
|
|
26
26
|
this.context.controller.transition(this.name);
|
|
27
27
|
}
|
|
28
28
|
if (this.panelRef.current) {
|
|
29
|
-
this.context.controller.afterUpdate(this.name, this.panelRef.current, this.props.transition);
|
|
29
|
+
this.context.controller.afterUpdate(this.name, this.panelRef.current, this.props.transition, this.props.animateHeight);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
TransitionPanel.prototype.componentWillUnmount = function () {
|
|
@@ -40,7 +40,7 @@ var TransitionPanel = /** @class */ (function (_super) {
|
|
|
40
40
|
configurable: true
|
|
41
41
|
});
|
|
42
42
|
TransitionPanel.prototype.render = function () {
|
|
43
|
-
var _a = this.props, name = _a.name, data = _a.data, isVisible = _a.isVisible, children = _a.children;
|
|
43
|
+
var _a = this.props, name = _a.name, data = _a.data, isVisible = _a.isVisible, animateHeight = _a.animateHeight, children = _a.children;
|
|
44
44
|
if (data) {
|
|
45
45
|
this.currentData = data;
|
|
46
46
|
}
|
|
@@ -17,7 +17,6 @@ export default abstract class RouteView extends React.Component<unknown> {
|
|
|
17
17
|
/**
|
|
18
18
|
* Creates the routes component after authentication and authorisation checks have been done.
|
|
19
19
|
* This can be used to override all routes to display pages like terms and conditions.
|
|
20
|
-
* To redirect to a route, return a react router <Redirect to= /> component.
|
|
21
20
|
*/
|
|
22
21
|
protected getAuthorisedComponent(route: Routing.IRoute, path: string): JSX.Element;
|
|
23
22
|
/**
|
|
@@ -52,7 +52,6 @@ var RouteView = /** @class */ (function (_super) {
|
|
|
52
52
|
/**
|
|
53
53
|
* Creates the routes component after authentication and authorisation checks have been done.
|
|
54
54
|
* This can be used to override all routes to display pages like terms and conditions.
|
|
55
|
-
* To redirect to a route, return a react router <Redirect to= /> component.
|
|
56
55
|
*/
|
|
57
56
|
RouteView.prototype.getAuthorisedComponent = function (route, path) {
|
|
58
57
|
return React.createElement(route.component, null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@singularsystems/neo-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "React application logic and components for the Neo client library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"typescript": "5.5.2"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@singularsystems/neo-core": "1.1.
|
|
32
|
+
"@singularsystems/neo-core": "1.1.1",
|
|
33
33
|
"@types/rc-slider": "^8.6.5",
|
|
34
34
|
"@types/react-color": "^3.0.1",
|
|
35
35
|
"axios": "1.7.7",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"tslib": "2.7.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@singularsystems/neo-core": ">=1.1.
|
|
47
|
+
"@singularsystems/neo-core": ">=1.1.1",
|
|
48
48
|
"axios": ">=1.6.2",
|
|
49
49
|
"inversify": ">=5.0.1",
|
|
50
50
|
"mobx": ">=6.9.0",
|