@singularsystems/neo-core 1.0.18 → 1.1.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/dist/AppServices/NeoTypes.d.ts +0 -2
- package/dist/AppServices/NeoTypes.js +0 -1
- package/dist/Components/Notifications/Notification.d.ts +3 -7
- package/dist/Components/Notifications/Notification.js +3 -0
- package/dist/Components/Notifications/NotificationStore.d.ts +3 -3
- package/dist/Components/TaskRunner/TaskRunner.js +2 -1
- package/dist/Data/ApiDataSource.d.ts +2 -2
- package/dist/Globals.d.ts +2 -2
- package/dist/Model/index.d.ts +1 -0
- package/dist/Routing/INavigationHelper.d.ts +2 -1
- package/dist/Routing/index.d.ts +0 -1
- package/dist/Routing/index.js +0 -1
- package/dist/Settings.d.ts +11 -2
- package/dist/Settings.js +9 -0
- package/package.json +8 -8
|
@@ -10,7 +10,6 @@ import { IMenuItemProvider } from '../Routing/IMenuItemProvider';
|
|
|
10
10
|
import { IModalStore } from '../Components/Modal/ModalStore';
|
|
11
11
|
import { INotificationStore, INotificationHelper } from '../Components';
|
|
12
12
|
import { IErrorHandler } from '../Components/ErrorHandler';
|
|
13
|
-
import { IPageLeaveHandler } from '../Routing';
|
|
14
13
|
import { IConnectionManager } from '../ConnectionManager';
|
|
15
14
|
import { IAutoRunnerFactory } from '../Model/IAutoRunner';
|
|
16
15
|
import { ILocalisationService } from '../Localisation/ILocalisationService';
|
|
@@ -43,7 +42,6 @@ declare const NeoTypes: {
|
|
|
43
42
|
Routing: {
|
|
44
43
|
MenuItemProvider: ServiceIdentifier<IMenuItemProvider<import("../Routing").IMenuRoute>>;
|
|
45
44
|
NavigationHelper: ServiceIdentifier<INavigationHelper>;
|
|
46
|
-
PageLeaveHandler: ServiceIdentifier<IPageLeaveHandler>;
|
|
47
45
|
RouteSecurityService: ServiceIdentifier<IRouteSecurityService>;
|
|
48
46
|
};
|
|
49
47
|
Security: {
|
|
@@ -24,7 +24,6 @@ var NeoTypes = {
|
|
|
24
24
|
Routing: {
|
|
25
25
|
MenuItemProvider: new ServiceIdentifier("Neo.MenuItemProvider"),
|
|
26
26
|
NavigationHelper: new ServiceIdentifier("Neo.NavigationHelper"),
|
|
27
|
-
PageLeaveHandler: new ServiceIdentifier("Neo.PageLeaveHandler"),
|
|
28
27
|
RouteSecurityService: new ServiceIdentifier("Neo.RouteSecurityService"),
|
|
29
28
|
},
|
|
30
29
|
Security: {
|
|
@@ -14,19 +14,15 @@ export interface INotificationOptions extends ICollapsableOptions {
|
|
|
14
14
|
export interface INotification {
|
|
15
15
|
hide(): void;
|
|
16
16
|
}
|
|
17
|
-
export interface INotificationInternal extends INotification {
|
|
18
|
-
options: INotificationOptions;
|
|
19
|
-
body: any;
|
|
20
|
-
identifier: string;
|
|
21
|
-
key: string;
|
|
22
|
-
refreshValue: number;
|
|
23
|
-
}
|
|
24
17
|
export declare class Notification {
|
|
25
18
|
options: INotificationOptions;
|
|
26
19
|
body: any;
|
|
27
20
|
constructor(options: INotificationOptions, body: any);
|
|
21
|
+
/** @internal */
|
|
28
22
|
refreshValue: number;
|
|
23
|
+
/** @internal */
|
|
29
24
|
identifier: string;
|
|
25
|
+
/** @internal */
|
|
30
26
|
key: string;
|
|
31
27
|
hide(): void;
|
|
32
28
|
}
|
|
@@ -6,8 +6,11 @@ var Notification = /** @class */ (function () {
|
|
|
6
6
|
function Notification(options, body) {
|
|
7
7
|
this.options = options;
|
|
8
8
|
this.body = body;
|
|
9
|
+
/** @internal */
|
|
9
10
|
this.refreshValue = 1;
|
|
11
|
+
/** @internal */
|
|
10
12
|
this.identifier = Utils.uuidv4();
|
|
13
|
+
/** @internal */
|
|
11
14
|
this.key = "";
|
|
12
15
|
options.state = this;
|
|
13
16
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { variant } from '../BootstrapTypes';
|
|
2
|
-
import { INotification,
|
|
2
|
+
import { INotification, Notification } from './Notification';
|
|
3
3
|
export interface INotificationStore {
|
|
4
|
-
notifications:
|
|
4
|
+
notifications: Notification[];
|
|
5
5
|
add(heading: string, body: any, variant: variant, autoHideTimeSeconds?: number): INotification;
|
|
6
6
|
addOrUpdate(key: string, heading: string, body: any, variant: variant, autoHideTimeSeconds?: number): INotification;
|
|
7
7
|
remove(key: string): void;
|
|
8
8
|
}
|
|
9
9
|
export declare class NotificationStore implements INotificationStore {
|
|
10
|
-
notifications:
|
|
10
|
+
notifications: Notification[];
|
|
11
11
|
private onHidden;
|
|
12
12
|
/**
|
|
13
13
|
* Adds a notification to the notification list
|
|
@@ -171,9 +171,10 @@ var TaskRunner = /** @class */ (function () {
|
|
|
171
171
|
this.runningTasks.push({ name: name, promise: runningTask, options: options });
|
|
172
172
|
return new Promise(function (resolve, reject) {
|
|
173
173
|
runningTask.then(function (value) {
|
|
174
|
+
var _a;
|
|
174
175
|
var axiosResponse = value;
|
|
175
176
|
var allowPosts = options.allowPost;
|
|
176
|
-
if (name === "" && !allowPosts && axiosResponse && axiosResponse.config) {
|
|
177
|
+
if (name === "" && !allowPosts && axiosResponse && axiosResponse.config && ((_a = axiosResponse.config) === null || _a === void 0 ? void 0 : _a.method) && axiosResponse.request) {
|
|
177
178
|
if (axiosResponse.config.method !== "get") {
|
|
178
179
|
var message = "The operation completed, but TaskRunner.waitFor() must only be used for get operations. Change your code to use TaskRunner.run()";
|
|
179
180
|
ModalUtils.showMessage("Error", message);
|
|
@@ -30,7 +30,7 @@ export declare abstract class ConvertingApiClientDataSource<T> extends AsyncData
|
|
|
30
30
|
export declare class ApiClientLookupDataSource<T extends IBindableBase> extends ConvertingApiClientDataSource<T[]> {
|
|
31
31
|
private deserialiseType;
|
|
32
32
|
private dbSet?;
|
|
33
|
-
constructor(getMethod: () => AxiosPromise<PlainObject<T>[]>, deserialiseType: (new () => T), defaultData?: T[], dbSet?: IDbSet<
|
|
33
|
+
constructor(getMethod: () => AxiosPromise<PlainObject<T>[]>, deserialiseType: (new () => T), defaultData?: T[], dbSet?: IDbSet<PlainObject<T>> | undefined);
|
|
34
34
|
protected offlineGet(): Promise<any>;
|
|
35
35
|
protected offlineStore(rawData: any): Promise<void>;
|
|
36
36
|
protected convertData(rawData: any): T[];
|
|
@@ -38,7 +38,7 @@ export declare class ApiClientLookupDataSource<T extends IBindableBase> extends
|
|
|
38
38
|
export declare class ApiClientSingleLookupDataSource<T extends IBindableBase> extends ConvertingApiClientDataSource<T> {
|
|
39
39
|
private deserialiseType;
|
|
40
40
|
private dbSet?;
|
|
41
|
-
constructor(getMethod: () => AxiosPromise<PlainObject<T>>, deserialiseType: (new () => T), defaultData?: T, dbSet?: IDbSet<
|
|
41
|
+
constructor(getMethod: () => AxiosPromise<PlainObject<T>>, deserialiseType: (new () => T), defaultData?: T, dbSet?: IDbSet<PlainObject<T>> | undefined);
|
|
42
42
|
protected offlineGet(): Promise<any>;
|
|
43
43
|
protected offlineStore(rawData: any): Promise<void>;
|
|
44
44
|
protected convertData(rawData: any): T;
|
package/dist/Globals.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export default class Globals {
|
|
|
7
7
|
* The top level container hosting the app. Usually the html document, but can be a shadow root if hosted in another site.
|
|
8
8
|
* Use this for adding top level events.
|
|
9
9
|
*/
|
|
10
|
-
static get root():
|
|
10
|
+
static get root(): ShadowRoot | Document;
|
|
11
11
|
/**
|
|
12
12
|
* The top level element hosting the app. Usually html document.body, but can be a shadow root if hosted in another site.
|
|
13
13
|
* Use this for adding elements to the root level.
|
|
14
14
|
*/
|
|
15
|
-
static get rootElement():
|
|
15
|
+
static get rootElement(): ShadowRoot | HTMLElement;
|
|
16
16
|
}
|
package/dist/Model/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import PropertyInfo from './PropertyInfo';
|
|
|
5
5
|
export { IObservableValue, ObservableValue, ValueWrapper } from './ObservableValue';
|
|
6
6
|
export { ObservableProperty } from './ObservableProperty';
|
|
7
7
|
export { ISelectedItem } from './Misc';
|
|
8
|
+
export { IEnumItem } from './EnumHelper';
|
|
8
9
|
export { ModelFieldInfo, IModelFieldInfoContainer } from './ModelFieldInfo';
|
|
9
10
|
import * as GraphTraverser from './ModelGraphTraverser';
|
|
10
11
|
export { GraphTraverser, PropertyInfo };
|
|
@@ -2,6 +2,7 @@ export interface INavigationHelper {
|
|
|
2
2
|
/**
|
|
3
3
|
* Navigates to an internal url using the router.
|
|
4
4
|
* @param replace Replace the url instead of adding to the history. This prevents the back button returning the params to the current state.
|
|
5
|
+
* @returns True if the navigation event occurred. False if it was blocked by the view / page leave handler.
|
|
5
6
|
* */
|
|
6
|
-
navigateInternal(url: string, replace?: boolean):
|
|
7
|
+
navigateInternal(url: string, replace?: boolean): Promise<boolean>;
|
|
7
8
|
}
|
package/dist/Routing/index.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ export { IRoute } from './IRoute';
|
|
|
2
2
|
export { IMenuRoute } from './IMenuRoute';
|
|
3
3
|
export { MenuItemProvider } from './MenuItemProvider';
|
|
4
4
|
export { IMenuItemProvider } from './IMenuItemProvider';
|
|
5
|
-
export { IPageLeaveHandler, NavigateLocation } from './IPageLeaveHandler';
|
|
6
5
|
export { IRouteSecurityService } from './IRouteSecurityService';
|
|
7
6
|
export { RouteSecurityService } from './RouteSecurityService';
|
package/dist/Routing/index.js
CHANGED
package/dist/Settings.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const Settings: {
|
|
|
13
13
|
modalAnimationTimeMs: number;
|
|
14
14
|
form: {
|
|
15
15
|
validationDisplayMode: ValidationDisplayMode;
|
|
16
|
-
validationModalCloseButton:
|
|
16
|
+
validationModalCloseButton: Partial<IButtonOptions> | false | undefined;
|
|
17
17
|
};
|
|
18
18
|
icons: {
|
|
19
19
|
loadingIcon: any;
|
|
@@ -45,7 +45,9 @@ export declare const Settings: {
|
|
|
45
45
|
viewButton: IButtonOptions;
|
|
46
46
|
expandButton: IButtonOptions;
|
|
47
47
|
boolTrueClass: string;
|
|
48
|
+
boolTrueIcon: any;
|
|
48
49
|
boolFalseClass: string;
|
|
50
|
+
boolFalseIcon: any;
|
|
49
51
|
/**
|
|
50
52
|
* Will cause headers to stick to the top of the screen / scroll element when scrolling.
|
|
51
53
|
* This will apply to all NeoGrids, but can be overridden per grid.
|
|
@@ -87,8 +89,15 @@ export declare const Settings: {
|
|
|
87
89
|
/** The standard notification duration in seconds. */
|
|
88
90
|
standardDuration: number;
|
|
89
91
|
};
|
|
92
|
+
tabs: {
|
|
93
|
+
animate: boolean;
|
|
94
|
+
};
|
|
90
95
|
alerts: {
|
|
91
96
|
isOutline: boolean;
|
|
92
|
-
iconPosition: "
|
|
97
|
+
iconPosition: "body" | "left";
|
|
98
|
+
};
|
|
99
|
+
buttons: {
|
|
100
|
+
/** Will prevent icons from displaying in buttons if the buttons text content is not empty. */
|
|
101
|
+
suppressIcons: boolean;
|
|
93
102
|
};
|
|
94
103
|
};
|
package/dist/Settings.js
CHANGED
|
@@ -68,7 +68,9 @@ export var Settings = {
|
|
|
68
68
|
tabIndex: -1
|
|
69
69
|
},
|
|
70
70
|
boolTrueClass: "far fa-lg fa-check-square",
|
|
71
|
+
boolTrueIcon: undefined,
|
|
71
72
|
boolFalseClass: "far fa-lg fa-square text-light",
|
|
73
|
+
boolFalseIcon: undefined,
|
|
72
74
|
/**
|
|
73
75
|
* Will cause headers to stick to the top of the screen / scroll element when scrolling.
|
|
74
76
|
* This will apply to all NeoGrids, but can be overridden per grid.
|
|
@@ -119,8 +121,15 @@ export var Settings = {
|
|
|
119
121
|
/** The standard notification duration in seconds. */
|
|
120
122
|
standardDuration: 4
|
|
121
123
|
},
|
|
124
|
+
tabs: {
|
|
125
|
+
animate: false,
|
|
126
|
+
},
|
|
122
127
|
alerts: {
|
|
123
128
|
isOutline: false,
|
|
124
129
|
iconPosition: "body",
|
|
130
|
+
},
|
|
131
|
+
buttons: {
|
|
132
|
+
/** Will prevent icons from displaying in buttons if the buttons text content is not empty. */
|
|
133
|
+
suppressIcons: false,
|
|
125
134
|
}
|
|
126
135
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@singularsystems/neo-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Core functionality for the Neo client library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/jest": "29.5.13",
|
|
19
|
-
"@types/node": "
|
|
20
|
-
"@types/react": "18.
|
|
19
|
+
"@types/node": "22.7.4",
|
|
20
|
+
"@types/react": "18.3.11",
|
|
21
21
|
"decimal.js-light": "2.5.1",
|
|
22
22
|
"jest": "29.7.0",
|
|
23
|
-
"ts-jest": "29.
|
|
24
|
-
"typescript": "5.
|
|
23
|
+
"ts-jest": "29.2.5",
|
|
24
|
+
"typescript": "5.6.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@microsoft/signalr": "
|
|
27
|
+
"@microsoft/signalr": "8.0.7",
|
|
28
28
|
"axios": "1.7.7",
|
|
29
|
-
"inversify": "
|
|
29
|
+
"inversify": "6.0.2",
|
|
30
30
|
"reflect-metadata": "0.2.2",
|
|
31
31
|
"tslib": "2.7.0"
|
|
32
32
|
},
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"axios": ">=1.4.0",
|
|
35
35
|
"inversify": ">=5.0.1"
|
|
36
36
|
},
|
|
37
|
-
"packageManager": "yarn@4.
|
|
37
|
+
"packageManager": "yarn@4.5.0"
|
|
38
38
|
}
|