@etsoo/materialui 1.0.29 → 1.0.31
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/__tests__/NotifierMUTests.tsx +2 -4
- package/lib/app/ReactApp.d.ts +26 -2
- package/package.json +7 -7
- package/src/app/ReactApp.ts +34 -0
|
@@ -118,8 +118,7 @@ test('Prompt tests', async () => {
|
|
|
118
118
|
act(() => {
|
|
119
119
|
// Add the notification
|
|
120
120
|
notifier.prompt<boolean>('Prompt message', handleClick, undefined, {
|
|
121
|
-
type: 'switch'
|
|
122
|
-
required: false
|
|
121
|
+
type: 'switch'
|
|
123
122
|
});
|
|
124
123
|
});
|
|
125
124
|
|
|
@@ -147,8 +146,7 @@ test('Prompt tests with form submit', async () => {
|
|
|
147
146
|
act(() => {
|
|
148
147
|
// Add the notification
|
|
149
148
|
notifier.prompt<boolean>('Prompt message', handleClick, undefined, {
|
|
150
|
-
type: 'switch'
|
|
151
|
-
required: false
|
|
149
|
+
type: 'switch'
|
|
152
150
|
});
|
|
153
151
|
});
|
|
154
152
|
|
package/lib/app/ReactApp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoreApp, IActionResult, IApp, IAppSettings, ICoreApp, IUser } from '@etsoo/appscript';
|
|
2
|
-
import {
|
|
2
|
+
import { NotificationReturn } from '@etsoo/notificationbase';
|
|
3
3
|
import { DataTypes } from '@etsoo/shared';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { CultureAction, CultureState, INotificationReact, InputDialogProps, IPageData, IStateProps, NotificationReactCallProps, PageAction, PageState, UserAction, UserState } from '@etsoo/react';
|
|
@@ -28,6 +28,25 @@ export interface IReactAppBase {
|
|
|
28
28
|
* User state
|
|
29
29
|
*/
|
|
30
30
|
readonly userState: UserState<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Is screen size down 'sm'
|
|
33
|
+
*/
|
|
34
|
+
smDown?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Is screen size up 'md'
|
|
37
|
+
*/
|
|
38
|
+
mdUp?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Get date format props
|
|
41
|
+
* @returns Props
|
|
42
|
+
*/
|
|
43
|
+
getDateFormatProps(): object;
|
|
44
|
+
/**
|
|
45
|
+
* Get money format props
|
|
46
|
+
* @param currency Currency, if undefined, default currency applied
|
|
47
|
+
* @returns Props
|
|
48
|
+
*/
|
|
49
|
+
getMoneyFormatProps(currency?: string): object;
|
|
31
50
|
/**
|
|
32
51
|
* Set page data
|
|
33
52
|
* @param data Page data
|
|
@@ -43,6 +62,11 @@ export interface IReactAppBase {
|
|
|
43
62
|
* @param title Page title
|
|
44
63
|
*/
|
|
45
64
|
setPageTitle(title: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* Show input dialog
|
|
67
|
+
* @param props Props
|
|
68
|
+
*/
|
|
69
|
+
showInputDialog({ title, message, callback, ...rest }: InputDialogProps): INotificationReact;
|
|
46
70
|
}
|
|
47
71
|
/**
|
|
48
72
|
* Core application interface
|
|
@@ -66,7 +90,7 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
|
|
|
66
90
|
/**
|
|
67
91
|
* Get notifier provider
|
|
68
92
|
*/
|
|
69
|
-
static get notifierProvider(): React.FunctionComponent<
|
|
93
|
+
static get notifierProvider(): React.FunctionComponent<object>;
|
|
70
94
|
private static createApi;
|
|
71
95
|
private static createNotifier;
|
|
72
96
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@emotion/css": "^11.10.0",
|
|
52
52
|
"@emotion/react": "^11.10.4",
|
|
53
53
|
"@emotion/styled": "^11.10.4",
|
|
54
|
-
"@etsoo/appscript": "^1.2.
|
|
55
|
-
"@etsoo/notificationbase": "^1.1.
|
|
56
|
-
"@etsoo/react": "^1.6.
|
|
54
|
+
"@etsoo/appscript": "^1.2.98",
|
|
55
|
+
"@etsoo/notificationbase": "^1.1.8",
|
|
56
|
+
"@etsoo/react": "^1.6.4",
|
|
57
57
|
"@etsoo/shared": "^1.1.58",
|
|
58
58
|
"@mui/icons-material": "^5.10.6",
|
|
59
|
-
"@mui/material": "^5.10.
|
|
59
|
+
"@mui/material": "^5.10.7",
|
|
60
60
|
"@types/pica": "^9.0.1",
|
|
61
61
|
"@types/pulltorefreshjs": "^0.1.5",
|
|
62
62
|
"@types/react": "^18.0.21",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"@testing-library/jest-dom": "^5.16.5",
|
|
84
84
|
"@testing-library/react": "^13.4.0",
|
|
85
85
|
"@types/jest": "^29.0.3",
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "^5.38.
|
|
87
|
-
"@typescript-eslint/parser": "^5.38.
|
|
86
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
87
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
88
88
|
"eslint": "^8.24.0",
|
|
89
89
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
90
90
|
"eslint-plugin-import": "^2.26.0",
|
package/src/app/ReactApp.ts
CHANGED
|
@@ -92,6 +92,29 @@ export interface IReactAppBase {
|
|
|
92
92
|
*/
|
|
93
93
|
readonly userState: UserState<any>;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Is screen size down 'sm'
|
|
97
|
+
*/
|
|
98
|
+
smDown?: boolean;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Is screen size up 'md'
|
|
102
|
+
*/
|
|
103
|
+
mdUp?: boolean;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get date format props
|
|
107
|
+
* @returns Props
|
|
108
|
+
*/
|
|
109
|
+
getDateFormatProps(): object;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Get money format props
|
|
113
|
+
* @param currency Currency, if undefined, default currency applied
|
|
114
|
+
* @returns Props
|
|
115
|
+
*/
|
|
116
|
+
getMoneyFormatProps(currency?: string): object;
|
|
117
|
+
|
|
95
118
|
/**
|
|
96
119
|
* Set page data
|
|
97
120
|
* @param data Page data
|
|
@@ -109,6 +132,17 @@ export interface IReactAppBase {
|
|
|
109
132
|
* @param title Page title
|
|
110
133
|
*/
|
|
111
134
|
setPageTitle(title: string): void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Show input dialog
|
|
138
|
+
* @param props Props
|
|
139
|
+
*/
|
|
140
|
+
showInputDialog({
|
|
141
|
+
title,
|
|
142
|
+
message,
|
|
143
|
+
callback,
|
|
144
|
+
...rest
|
|
145
|
+
}: InputDialogProps): INotificationReact;
|
|
112
146
|
}
|
|
113
147
|
|
|
114
148
|
/**
|