@faasjs/ant-design 7.0.0 → 7.0.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/index.cjs CHANGED
@@ -7,8 +7,8 @@ var reactRouterDom = require('react-router-dom');
7
7
  var lodashEs = require('lodash-es');
8
8
  var react$1 = require('react');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
- var dayjs2 = require('dayjs');
11
10
  var icons = require('@ant-design/icons');
11
+ var dayjs2 = require('dayjs');
12
12
 
13
13
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
14
 
package/dist/index.d.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { StyleProviderProps } from '@ant-design/cssinjs';
3
- import { DrawerProps as DrawerProps$1, ModalProps as ModalProps$1, ConfigProviderProps as ConfigProviderProps$1, DescriptionsProps, FormItemProps as FormItemProps$1, InputProps, SelectProps, RadioProps, InputNumberProps, SwitchProps, DatePickerProps, FormInstance, TableColumnProps, TablePaginationConfig, TableProps as TableProps$1, FormProps as FormProps$1, ButtonProps, TabsProps as TabsProps$1, GlobalToken } from 'antd';
3
+ import { DrawerProps as DrawerProps$1, ModalProps as ModalProps$1, ConfigProviderProps as ConfigProviderProps$1, FormItemProps as FormItemProps$1, InputProps, SelectProps, RadioProps, InputNumberProps, SwitchProps, DatePickerProps, FormInstance, TableColumnProps, TablePaginationConfig, TableProps as TableProps$1, DescriptionsProps, FormProps as FormProps$1, ButtonProps, TabsProps as TabsProps$1, GlobalToken } from 'antd';
4
4
  import { MessageInstance } from 'antd/es/message/interface';
5
5
  import { NotificationInstance } from 'antd/es/notification/interface';
6
6
  import { BrowserRouterProps, RouteProps } from 'react-router-dom';
7
7
  import * as react from 'react';
8
- import { JSX, CSSProperties, Dispatch, SetStateAction, ReactNode, ReactElement, FC, LazyExoticComponent, ComponentType } from 'react';
8
+ import { JSX, CSSProperties, Dispatch, SetStateAction, ReactElement, FC, ReactNode, LazyExoticComponent, ComponentType } from 'react';
9
9
  export { lazy } from 'react';
10
10
  import { FaasDataWrapperProps as FaasDataWrapperProps$1, FaasDataInjection as FaasDataInjection$1, FaasReactClientOptions, ErrorBoundaryProps } from '@faasjs/react';
11
11
  export { ErrorBoundaryProps, FaasDataWrapperRef, FaasReactClient, FaasReactClientOptions, faas, useFaas } from '@faasjs/react';
12
12
  import * as antd_es_modal_PurePanel from 'antd/es/modal/PurePanel';
13
13
  import * as antd_es_modal_useModal from 'antd/es/modal/useModal';
14
14
  import * as antd_es_modal_confirm from 'antd/es/modal/confirm';
15
- import { Dayjs } from 'dayjs';
16
15
  import { FaasActionUnionType, FaasAction } from '@faasjs/types';
16
+ import { Dayjs } from 'dayjs';
17
17
  import * as antd_es_form_FormItem from 'antd/es/form/FormItem';
18
18
  import { RuleObject } from 'rc-field-form/lib/interface';
19
19
  import { FilterValue, SorterResult, TableCurrentDataSource } from 'antd/es/table/interface';
@@ -297,64 +297,6 @@ declare namespace Blank {
297
297
  var whyDidYouRender: boolean;
298
298
  }
299
299
 
300
- interface ExtendDescriptionTypeProps<T = any> {
301
- children?: UnionFaasItemElement<T>;
302
- render?: UnionFaasItemRender<T>;
303
- }
304
- type ExtendDescriptionItemProps = BaseItemProps;
305
- interface DescriptionItemProps<T = any> extends FaasItemProps {
306
- children?: UnionFaasItemElement<T> | null;
307
- descriptionChildren?: UnionFaasItemElement<T> | null;
308
- render?: UnionFaasItemRender<T> | null;
309
- descriptionRender?: UnionFaasItemRender<T> | null;
310
- if?: (values: Record<string, any>) => boolean;
311
- object?: DescriptionItemProps<T>[];
312
- }
313
- interface DescriptionProps<T = any, ExtendItemProps = any> extends Omit<DescriptionsProps, 'items'> {
314
- renderTitle?(values: T): ReactNode;
315
- items: (DescriptionItemProps | ExtendItemProps)[];
316
- extendTypes?: {
317
- [key: string]: ExtendDescriptionTypeProps;
318
- };
319
- dataSource?: T;
320
- faasData?: FaasDataWrapperProps<T>;
321
- }
322
- interface DescriptionItemContentProps<T = any> {
323
- item: DescriptionItemProps;
324
- value: T;
325
- values?: any;
326
- extendTypes?: {
327
- [key: string]: ExtendDescriptionTypeProps;
328
- };
329
- }
330
- /**
331
- * Description component
332
- *
333
- * - Based on [Ant Design Descriptions](https://ant.design/components/descriptions/).
334
- *
335
- * @example
336
- * ```tsx
337
- * import { Description } from '@faasjs/ant-design'
338
- *
339
- * <Description
340
- * title="Title"
341
- * items={[
342
- * {
343
- * id: 'id',
344
- * title: 'Title',
345
- * type: 'string',
346
- * },
347
- * ]}
348
- * dataSource={{ id: 'value' }}
349
- * />
350
- * ```
351
- */
352
- declare function Description<T extends Record<string, any> = any>({ faasData, dataSource, renderTitle, extendTypes, ...props }: DescriptionProps<T>): react_jsx_runtime.JSX.Element;
353
- declare namespace Description {
354
- var displayName: string;
355
- var whyDidYouRender: boolean;
356
- }
357
-
358
300
  type ExtendFormTypeProps<T = any> = {
359
301
  children?: UnionFaasItemElement<T>;
360
302
  };
@@ -737,6 +679,64 @@ interface UnionFaasItemProps<Value = any, Values = any> extends FormItemProps, D
737
679
  */
738
680
  declare function cloneUnionFaasItemElement(element: UnionFaasItemElement, props: any): ReactElement<UnionFaasItemInjection<any, any>, string | react.JSXElementConstructor<any>>;
739
681
 
682
+ interface ExtendDescriptionTypeProps<T = any> {
683
+ children?: UnionFaasItemElement<T>;
684
+ render?: UnionFaasItemRender<T>;
685
+ }
686
+ type ExtendDescriptionItemProps = BaseItemProps;
687
+ interface DescriptionItemProps<T = any> extends FaasItemProps {
688
+ children?: UnionFaasItemElement<T> | null;
689
+ descriptionChildren?: UnionFaasItemElement<T> | null;
690
+ render?: UnionFaasItemRender<T> | null;
691
+ descriptionRender?: UnionFaasItemRender<T> | null;
692
+ if?: (values: Record<string, any>) => boolean;
693
+ object?: DescriptionItemProps<T>[];
694
+ }
695
+ interface DescriptionProps<T = any, ExtendItemProps = any> extends Omit<DescriptionsProps, 'items'> {
696
+ renderTitle?(values: T): ReactNode;
697
+ items: (DescriptionItemProps | ExtendItemProps)[];
698
+ extendTypes?: {
699
+ [key: string]: ExtendDescriptionTypeProps;
700
+ };
701
+ dataSource?: T;
702
+ faasData?: FaasDataWrapperProps<T>;
703
+ }
704
+ interface DescriptionItemContentProps<T = any> {
705
+ item: DescriptionItemProps;
706
+ value: T;
707
+ values?: any;
708
+ extendTypes?: {
709
+ [key: string]: ExtendDescriptionTypeProps;
710
+ };
711
+ }
712
+ /**
713
+ * Description component
714
+ *
715
+ * - Based on [Ant Design Descriptions](https://ant.design/components/descriptions/).
716
+ *
717
+ * @example
718
+ * ```tsx
719
+ * import { Description } from '@faasjs/ant-design'
720
+ *
721
+ * <Description
722
+ * title="Title"
723
+ * items={[
724
+ * {
725
+ * id: 'id',
726
+ * title: 'Title',
727
+ * type: 'string',
728
+ * },
729
+ * ]}
730
+ * dataSource={{ id: 'value' }}
731
+ * />
732
+ * ```
733
+ */
734
+ declare function Description<T extends Record<string, any> = any>({ faasData, dataSource, renderTitle, extendTypes, ...props }: DescriptionProps<T>): react_jsx_runtime.JSX.Element;
735
+ declare namespace Description {
736
+ var displayName: string;
737
+ var whyDidYouRender: boolean;
738
+ }
739
+
740
740
  type FormSubmitProps = {
741
741
  /** Default: Submit */
742
742
  text?: string;
package/dist/index.mjs CHANGED
@@ -7,8 +7,8 @@ import { defaultsDeep, cloneDeep, isNil, uniqBy } from 'lodash-es';
7
7
  import { createContext, useState, useContext, cloneElement, createElement, isValidElement, useEffect, Suspense } from 'react';
8
8
  export { lazy } from 'react';
9
9
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
10
- import dayjs2 from 'dayjs';
11
10
  import { PlusOutlined, MinusCircleOutlined, CheckOutlined, CloseOutlined } from '@ant-design/icons';
11
+ import dayjs2 from 'dayjs';
12
12
 
13
13
  // src/App.tsx
14
14
  function Loading(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -30,7 +30,7 @@
30
30
  "dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@faasjs/react": ">=7.0.0",
33
+ "@faasjs/react": ">=7.0.1",
34
34
  "antd": "*",
35
35
  "@ant-design/icons": "*",
36
36
  "lodash-es": "*",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/lodash-es": "*",
43
- "@faasjs/react": ">=7.0.0",
43
+ "@faasjs/react": ">=7.0.1",
44
44
  "antd": "*",
45
45
  "@ant-design/icons": "*",
46
46
  "lodash-es": "*",