@faasjs/ant-design 2.6.1 → 2.7.0
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/index.d.mts +17 -9
- package/dist/index.d.ts +17 -9
- package/dist/index.js +43 -19
- package/dist/index.mjs +44 -20
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -145,16 +145,24 @@ declare function useConfigContext(): Partial<ConfigProviderProps>;
|
|
|
145
145
|
|
|
146
146
|
interface AppProps {
|
|
147
147
|
children: React.ReactNode;
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
/**
|
|
149
|
+
* `false` to disable StyleProvider.
|
|
150
|
+
*
|
|
151
|
+
* @see https://ant.design/docs/react/compatible-style#styleprovider
|
|
152
|
+
*/
|
|
153
|
+
styleProviderProps?: StyleProviderProps | false;
|
|
154
|
+
/** @see https://ant.design/components/config-provider/#API */
|
|
151
155
|
configProviderProps?: ConfigProviderProps$1;
|
|
152
|
-
/**
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
/**
|
|
157
|
+
* `false` to disable BrowserRouter.
|
|
158
|
+
*
|
|
159
|
+
* @see https://reactrouter.com/en/router-components/browser-router
|
|
160
|
+
*/
|
|
161
|
+
browserRouterProps?: BrowserRouterProps | false;
|
|
162
|
+
/** @see https://faasjs.com/doc/ant-design/#errorboundary */
|
|
155
163
|
errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>;
|
|
156
|
-
/** https://faasjs.com/doc/ant-design/#configprovider */
|
|
157
|
-
faasConfigProviderProps?: Omit<ConfigProviderProps, 'children'
|
|
164
|
+
/** @see https://faasjs.com/doc/ant-design/#configprovider */
|
|
165
|
+
faasConfigProviderProps?: Omit<ConfigProviderProps, 'children'> | false;
|
|
158
166
|
}
|
|
159
167
|
interface useAppProps {
|
|
160
168
|
message: MessageInstance;
|
|
@@ -571,7 +579,7 @@ interface FormProps<Values extends Record<string, any> = any, ExtendItemProps ex
|
|
|
571
579
|
footer?: JSX.Element | JSX.Element[];
|
|
572
580
|
extendTypes?: ExtendTypes;
|
|
573
581
|
children?: ReactNode;
|
|
574
|
-
initialValues?: Values
|
|
582
|
+
initialValues?: Partial<Values>;
|
|
575
583
|
}
|
|
576
584
|
/**
|
|
577
585
|
* Form component with Ant Design & FaasJS
|
package/dist/index.d.ts
CHANGED
|
@@ -145,16 +145,24 @@ declare function useConfigContext(): Partial<ConfigProviderProps>;
|
|
|
145
145
|
|
|
146
146
|
interface AppProps {
|
|
147
147
|
children: React.ReactNode;
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
/**
|
|
149
|
+
* `false` to disable StyleProvider.
|
|
150
|
+
*
|
|
151
|
+
* @see https://ant.design/docs/react/compatible-style#styleprovider
|
|
152
|
+
*/
|
|
153
|
+
styleProviderProps?: StyleProviderProps | false;
|
|
154
|
+
/** @see https://ant.design/components/config-provider/#API */
|
|
151
155
|
configProviderProps?: ConfigProviderProps$1;
|
|
152
|
-
/**
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
/**
|
|
157
|
+
* `false` to disable BrowserRouter.
|
|
158
|
+
*
|
|
159
|
+
* @see https://reactrouter.com/en/router-components/browser-router
|
|
160
|
+
*/
|
|
161
|
+
browserRouterProps?: BrowserRouterProps | false;
|
|
162
|
+
/** @see https://faasjs.com/doc/ant-design/#errorboundary */
|
|
155
163
|
errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>;
|
|
156
|
-
/** https://faasjs.com/doc/ant-design/#configprovider */
|
|
157
|
-
faasConfigProviderProps?: Omit<ConfigProviderProps, 'children'
|
|
164
|
+
/** @see https://faasjs.com/doc/ant-design/#configprovider */
|
|
165
|
+
faasConfigProviderProps?: Omit<ConfigProviderProps, 'children'> | false;
|
|
158
166
|
}
|
|
159
167
|
interface useAppProps {
|
|
160
168
|
message: MessageInstance;
|
|
@@ -571,7 +579,7 @@ interface FormProps<Values extends Record<string, any> = any, ExtendItemProps ex
|
|
|
571
579
|
footer?: JSX.Element | JSX.Element[];
|
|
572
580
|
extendTypes?: ExtendTypes;
|
|
573
581
|
children?: ReactNode;
|
|
574
|
-
initialValues?: Values
|
|
582
|
+
initialValues?: Partial<Values>;
|
|
575
583
|
}
|
|
576
584
|
/**
|
|
577
585
|
* Form component with Ant Design & FaasJS
|
package/dist/index.js
CHANGED
|
@@ -159,7 +159,7 @@ function ConfigProvider(props) {
|
|
|
159
159
|
function useConfigContext() {
|
|
160
160
|
return react$1.useContext(ConfigContext);
|
|
161
161
|
}
|
|
162
|
-
var AppContext = react.
|
|
162
|
+
var AppContext = react.createSplittingContext({
|
|
163
163
|
message: null,
|
|
164
164
|
notification: null,
|
|
165
165
|
modalProps: {},
|
|
@@ -190,26 +190,50 @@ function App(props) {
|
|
|
190
190
|
}),
|
|
191
191
|
[props.styleProviderProps]
|
|
192
192
|
);
|
|
193
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
194
|
-
|
|
193
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
194
|
+
react.OptionalWrapper,
|
|
195
195
|
{
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
196
|
+
condition: props.styleProviderProps !== false,
|
|
197
|
+
Wrapper: cssinjs.StyleProvider,
|
|
198
|
+
wrapperProps: styleProviderProps,
|
|
199
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
200
|
+
react.OptionalWrapper,
|
|
201
|
+
{
|
|
202
|
+
condition: !!props.configProviderProps,
|
|
203
|
+
Wrapper: antd.ConfigProvider,
|
|
204
|
+
wrapperProps: props.configProviderProps,
|
|
205
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
206
|
+
AppContext.Provider,
|
|
207
|
+
{
|
|
208
|
+
value: {
|
|
209
|
+
message: messageApi,
|
|
210
|
+
notification: notificationApi,
|
|
211
|
+
drawerProps,
|
|
212
|
+
setDrawerProps,
|
|
213
|
+
modalProps,
|
|
214
|
+
setModalProps
|
|
215
|
+
},
|
|
216
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ConfigProvider, { ...props.faasConfigProviderProps, children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { ...props.errorBoundaryProps, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
217
|
+
react.OptionalWrapper,
|
|
218
|
+
{
|
|
219
|
+
condition: props.browserRouterProps !== false,
|
|
220
|
+
Wrapper: reactRouterDom.BrowserRouter,
|
|
221
|
+
wrapperProps: props.browserRouterProps,
|
|
222
|
+
children: [
|
|
223
|
+
messageContextHolder,
|
|
224
|
+
notificationContextHolder,
|
|
225
|
+
modal,
|
|
226
|
+
drawer,
|
|
227
|
+
props.browserRouterProps !== false ? /* @__PURE__ */ jsxRuntime.jsx(RoutesApp, { children: props.children }) : props.children
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
) }) })
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
)
|
|
211
235
|
}
|
|
212
|
-
)
|
|
236
|
+
);
|
|
213
237
|
}
|
|
214
238
|
var useApp = AppContext.use;
|
|
215
239
|
App.useApp = useApp;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSplittingContext, ErrorBoundary as ErrorBoundary$1, FaasReactClient, OptionalWrapper, FaasDataWrapper as FaasDataWrapper$1, faas } from '@faasjs/react';
|
|
2
2
|
export { faas, useFaas } from '@faasjs/react';
|
|
3
3
|
import { Form as Form$1, Modal as Modal$1, Drawer as Drawer$1, message, notification, ConfigProvider as ConfigProvider$1, Typography, Spin, Descriptions, Input, Button, Row, Col, DatePicker, Switch, Select, InputNumber, Radio, Result, Skeleton, Table as Table$1, Tabs as Tabs$1, Alert, Space } from 'antd';
|
|
4
4
|
import { legacyLogicalPropertiesTransformer, StyleProvider } from '@ant-design/cssinjs';
|
|
@@ -155,7 +155,7 @@ function ConfigProvider(props) {
|
|
|
155
155
|
function useConfigContext() {
|
|
156
156
|
return useContext(ConfigContext);
|
|
157
157
|
}
|
|
158
|
-
var AppContext =
|
|
158
|
+
var AppContext = createSplittingContext({
|
|
159
159
|
message: null,
|
|
160
160
|
notification: null,
|
|
161
161
|
modalProps: {},
|
|
@@ -186,26 +186,50 @@ function App(props) {
|
|
|
186
186
|
}),
|
|
187
187
|
[props.styleProviderProps]
|
|
188
188
|
);
|
|
189
|
-
return /* @__PURE__ */ jsx(
|
|
190
|
-
|
|
189
|
+
return /* @__PURE__ */ jsx(
|
|
190
|
+
OptionalWrapper,
|
|
191
191
|
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
192
|
+
condition: props.styleProviderProps !== false,
|
|
193
|
+
Wrapper: StyleProvider,
|
|
194
|
+
wrapperProps: styleProviderProps,
|
|
195
|
+
children: /* @__PURE__ */ jsx(
|
|
196
|
+
OptionalWrapper,
|
|
197
|
+
{
|
|
198
|
+
condition: !!props.configProviderProps,
|
|
199
|
+
Wrapper: ConfigProvider$1,
|
|
200
|
+
wrapperProps: props.configProviderProps,
|
|
201
|
+
children: /* @__PURE__ */ jsx(
|
|
202
|
+
AppContext.Provider,
|
|
203
|
+
{
|
|
204
|
+
value: {
|
|
205
|
+
message: messageApi,
|
|
206
|
+
notification: notificationApi,
|
|
207
|
+
drawerProps,
|
|
208
|
+
setDrawerProps,
|
|
209
|
+
modalProps,
|
|
210
|
+
setModalProps
|
|
211
|
+
},
|
|
212
|
+
children: /* @__PURE__ */ jsx(ConfigProvider, { ...props.faasConfigProviderProps, children: /* @__PURE__ */ jsx(ErrorBoundary, { ...props.errorBoundaryProps, children: /* @__PURE__ */ jsxs(
|
|
213
|
+
OptionalWrapper,
|
|
214
|
+
{
|
|
215
|
+
condition: props.browserRouterProps !== false,
|
|
216
|
+
Wrapper: BrowserRouter,
|
|
217
|
+
wrapperProps: props.browserRouterProps,
|
|
218
|
+
children: [
|
|
219
|
+
messageContextHolder,
|
|
220
|
+
notificationContextHolder,
|
|
221
|
+
modal,
|
|
222
|
+
drawer,
|
|
223
|
+
props.browserRouterProps !== false ? /* @__PURE__ */ jsx(RoutesApp, { children: props.children }) : props.children
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
) }) })
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
)
|
|
207
231
|
}
|
|
208
|
-
)
|
|
232
|
+
);
|
|
209
233
|
}
|
|
210
234
|
var useApp = AppContext.use;
|
|
211
235
|
App.useApp = useApp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"lodash-es": "*"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@faasjs/react": "2.
|
|
41
|
+
"@faasjs/react": "2.7.0",
|
|
42
42
|
"antd": "*",
|
|
43
43
|
"react": "*",
|
|
44
44
|
"react-dom": "*",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@testing-library/react": "*",
|
|
51
51
|
"@testing-library/user-event": "*",
|
|
52
52
|
"@welldone-software/why-did-you-render": "*",
|
|
53
|
-
"@faasjs/react": "2.
|
|
53
|
+
"@faasjs/react": "2.7.0",
|
|
54
54
|
"antd": "*",
|
|
55
55
|
"react": "*",
|
|
56
56
|
"react-dom": "*",
|