@faasjs/ant-design 0.0.3-beta.76 → 0.0.3-beta.78

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.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { FaasDataInjection as FaasDataInjection$1, FaasDataWrapperProps as FaasDataWrapperProps$1 } from '@faasjs/react';
2
+ export { faas, useFaas } from '@faasjs/react';
1
3
  import { ConfigProviderProps as ConfigProviderProps$1 } from 'antd/es/config-provider';
2
4
  import { StyleProviderProps } from '@ant-design/cssinjs/lib/StyleContext';
3
5
  import { MessageInstance } from 'antd/es/message/interface';
@@ -10,7 +12,6 @@ import { CSSProperties, ReactNode, ReactElement, Component, LazyExoticComponent,
10
12
  export { lazy } from 'react';
11
13
  import { Dayjs } from 'dayjs';
12
14
  import { RuleObject } from 'rc-field-form/lib/interface';
13
- import { FaasDataInjection as FaasDataInjection$1, FaasDataWrapperProps as FaasDataWrapperProps$1 } from '@faasjs/react';
14
15
  import { FilterValue, SorterResult, TableCurrentDataSource } from 'antd/es/table/interface';
15
16
  import * as antd_es_form_context from 'antd/es/form/context';
16
17
  import * as antd_es_form_ErrorList from 'antd/es/form/ErrorList';
@@ -204,7 +205,7 @@ interface FormItemProps<T = any> extends FaasItemProps, Omit<FormItemProps$1<T>,
204
205
  declare function FormItem<T = any>(props: FormItemProps<T>): JSX.Element;
205
206
  declare namespace FormItem {
206
207
  var useStatus: () => {
207
- status?: "" | "success" | "error" | "warning" | "validating";
208
+ status?: "" | "error" | "success" | "warning" | "validating";
208
209
  };
209
210
  }
210
211
 
@@ -383,7 +384,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, {
383
384
  }> {
384
385
  constructor(props: ErrorBoundaryProps);
385
386
  componentDidCatch(error: Error | null, info: any): void;
386
- render(): string | number | boolean | react.ReactFragment | JSX.Element;
387
+ render(): string | number | boolean | JSX.Element | react.ReactFragment;
387
388
  }
388
389
 
389
390
  type FormSubmitProps = {
package/dist/index.js CHANGED
@@ -44,15 +44,18 @@ __export(src_exports, {
44
44
  Table: () => Table,
45
45
  Tabs: () => Tabs,
46
46
  Title: () => Title,
47
+ faas: () => import_react15.faas,
47
48
  lazy: () => import_react12.lazy,
48
49
  transferOptions: () => transferOptions,
49
50
  transferValue: () => transferValue,
50
51
  useApp: () => useApp,
51
52
  useConfigContext: () => useConfigContext,
52
53
  useDrawer: () => useDrawer,
54
+ useFaas: () => import_react15.useFaas,
53
55
  useModal: () => useModal
54
56
  });
55
57
  module.exports = __toCommonJS(src_exports);
58
+ var import_react15 = require("@faasjs/react");
56
59
 
57
60
  // src/App.tsx
58
61
  var import_antd3 = require("antd");
@@ -468,17 +471,15 @@ function Description(props) {
468
471
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd6.Descriptions, {
469
472
  ...props,
470
473
  title: (0, import_lodash_es4.isFunction)(props.renderTitle) ? props.renderTitle(props.dataSource) : props.title,
471
- children: props.items.map((item) => {
472
- return !item.if || item.if(props.dataSource) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd6.Descriptions.Item, {
473
- label: item.title || (0, import_lodash_es4.upperFirst)(item.id),
474
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionItemContent, {
475
- item,
476
- value: props.dataSource[item.id],
477
- values: props.dataSource,
478
- extendTypes: props.extendTypes
479
- })
480
- }, item.id) : null;
481
- }).filter(Boolean)
474
+ children: props.items.map((item) => item && (!item.if || item.if(props.dataSource)) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd6.Descriptions.Item, {
475
+ label: item.title || (0, import_lodash_es4.upperFirst)(item.id),
476
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionItemContent, {
477
+ item,
478
+ value: props.dataSource[item.id],
479
+ values: props.dataSource,
480
+ extendTypes: props.extendTypes
481
+ })
482
+ }, item.id) : null).filter(Boolean)
482
483
  });
483
484
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FaasDataWrapper, {
484
485
  render: ({ data }) => {
@@ -1783,11 +1784,13 @@ function Title(props) {
1783
1784
  Table,
1784
1785
  Tabs,
1785
1786
  Title,
1787
+ faas,
1786
1788
  lazy,
1787
1789
  transferOptions,
1788
1790
  transferValue,
1789
1791
  useApp,
1790
1792
  useConfigContext,
1791
1793
  useDrawer,
1794
+ useFaas,
1792
1795
  useModal
1793
1796
  });
package/dist/index.mjs CHANGED
@@ -1,3 +1,6 @@
1
+ // src/index.ts
2
+ import { faas as faas2, useFaas } from "@faasjs/react";
3
+
1
4
  // src/App.tsx
2
5
  import {
3
6
  ConfigProvider,
@@ -433,17 +436,15 @@ function Description(props) {
433
436
  return /* @__PURE__ */ jsx8(Descriptions, {
434
437
  ...props,
435
438
  title: isFunction(props.renderTitle) ? props.renderTitle(props.dataSource) : props.title,
436
- children: props.items.map((item) => {
437
- return !item.if || item.if(props.dataSource) ? /* @__PURE__ */ jsx8(Descriptions.Item, {
438
- label: item.title || upperFirst2(item.id),
439
- children: /* @__PURE__ */ jsx8(DescriptionItemContent, {
440
- item,
441
- value: props.dataSource[item.id],
442
- values: props.dataSource,
443
- extendTypes: props.extendTypes
444
- })
445
- }, item.id) : null;
446
- }).filter(Boolean)
439
+ children: props.items.map((item) => item && (!item.if || item.if(props.dataSource)) ? /* @__PURE__ */ jsx8(Descriptions.Item, {
440
+ label: item.title || upperFirst2(item.id),
441
+ children: /* @__PURE__ */ jsx8(DescriptionItemContent, {
442
+ item,
443
+ value: props.dataSource[item.id],
444
+ values: props.dataSource,
445
+ extendTypes: props.extendTypes
446
+ })
447
+ }, item.id) : null).filter(Boolean)
447
448
  });
448
449
  return /* @__PURE__ */ jsx8(FaasDataWrapper, {
449
450
  render: ({ data }) => {
@@ -1789,11 +1790,13 @@ export {
1789
1790
  Table,
1790
1791
  Tabs,
1791
1792
  Title,
1793
+ faas2 as faas,
1792
1794
  lazy,
1793
1795
  transferOptions,
1794
1796
  transferValue,
1795
1797
  useApp,
1796
1798
  useConfigContext,
1797
1799
  useDrawer,
1800
+ useFaas,
1798
1801
  useModal
1799
1802
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.3-beta.76",
3
+ "version": "0.0.3-beta.78",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",