@jiaozhiye/qm-design-react 1.9.8 → 1.9.10

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.
Files changed (59) hide show
  1. package/lib/anchor/src/anchor.d.ts +2 -0
  2. package/lib/button/src/button.d.ts +2 -0
  3. package/lib/collapse/src/Content.d.ts +1 -1
  4. package/lib/countup/src/countup.d.ts +2 -0
  5. package/lib/divider/src/divider.d.ts +2 -0
  6. package/lib/download/src/download.d.ts +2 -0
  7. package/lib/drawer/src/drawer.d.ts +2 -0
  8. package/lib/empty/src/empty.d.ts +2 -0
  9. package/lib/form/src/fields-filter.d.ts +2 -0
  10. package/lib/form/src/form-cascader.d.ts +2 -0
  11. package/lib/form/src/form-checkbox-group.d.ts +2 -0
  12. package/lib/form/src/form-checkbox.d.ts +2 -0
  13. package/lib/form/src/form-city-select.d.ts +2 -0
  14. package/lib/form/src/form-date.d.ts +2 -0
  15. package/lib/form/src/form-divider.d.ts +2 -0
  16. package/lib/form/src/form-immediate.d.ts +2 -0
  17. package/lib/form/src/form-input-number.d.ts +2 -0
  18. package/lib/form/src/form-input.d.ts +2 -0
  19. package/lib/form/src/form-multiple-search-helper.d.ts +2 -0
  20. package/lib/form/src/form-multiple-tree-table-helper.d.ts +2 -0
  21. package/lib/form/src/form-radio.d.ts +2 -0
  22. package/lib/form/src/form-range-date.d.ts +2 -0
  23. package/lib/form/src/form-range-input-number.d.ts +2 -0
  24. package/lib/form/src/form-range-input.d.ts +2 -0
  25. package/lib/form/src/form-range-search-helper.d.ts +2 -0
  26. package/lib/form/src/form-range-time.d.ts +2 -0
  27. package/lib/form/src/form-rate.d.ts +2 -0
  28. package/lib/form/src/form-region-select.d.ts +2 -0
  29. package/lib/form/src/form-search-helper.d.ts +2 -0
  30. package/lib/form/src/form-select.d.ts +2 -0
  31. package/lib/form/src/form-switch.d.ts +2 -0
  32. package/lib/form/src/form-text-area.d.ts +2 -0
  33. package/lib/form/src/form-time.d.ts +2 -0
  34. package/lib/form/src/form-tinymce.d.ts +2 -0
  35. package/lib/form/src/form-tree-select.d.ts +2 -0
  36. package/lib/form/src/form-tree-table-helper.d.ts +2 -0
  37. package/lib/form/src/form-upload-file.d.ts +2 -0
  38. package/lib/form/src/form-upload-img.d.ts +2 -0
  39. package/lib/form/src/form.d.ts +5 -4
  40. package/lib/form/src/types.d.ts +0 -1
  41. package/lib/hooks/useDebounce.d.ts +2 -3
  42. package/lib/hooks/useThrottle.d.ts +2 -0
  43. package/lib/index.esm.js +1 -1
  44. package/lib/index.full.js +1 -1
  45. package/lib/index.js +1 -1
  46. package/lib/modal/src/modal.d.ts +3 -1
  47. package/lib/print/src/container.d.ts +1 -1
  48. package/lib/print/src/preview.d.ts +3 -1
  49. package/lib/print/src/print.d.ts +3 -1
  50. package/lib/print/src/setting.d.ts +2 -0
  51. package/lib/space/src/space.d.ts +2 -0
  52. package/lib/split/src/split-pane.d.ts +1 -0
  53. package/lib/table/src/hooks/useTableCore.d.ts +2 -2
  54. package/lib/tabs/src/tabs.d.ts +2 -0
  55. package/lib/tinymce/src/index.d.ts +2 -0
  56. package/lib/upload-file/src/upload-file.d.ts +3 -1
  57. package/lib/upload-img/src/cropper-preview.d.ts +3 -0
  58. package/lib/upload-img/src/upload-img.d.ts +3 -1
  59. package/package.json +6 -6
@@ -1,5 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import ConfigContext from '../../config-provider/context';
3
4
  import type { ComponentSize } from '../../_utils/types';
4
5
  import type { ModalProps as AntModalProps } from '../../antd';
5
6
  type EventType = React.MouseEvent<HTMLElement>;
@@ -35,6 +36,7 @@ type IState = {
35
36
  export type ModalProps = IProps;
36
37
  declare class QmModal extends Component<IProps, IState> {
37
38
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
39
+ context: React.ContextType<typeof ConfigContext>;
38
40
  static propTypes: {
39
41
  size: (props: any, propName: any, componentName: any) => void;
40
42
  spinning: PropTypes.Requireable<boolean>;
@@ -53,7 +55,7 @@ declare class QmModal extends Component<IProps, IState> {
53
55
  };
54
56
  draggleRef: React.RefObject<HTMLDivElement>;
55
57
  private opened;
56
- get $size(): any;
58
+ get $size(): ComponentSize;
57
59
  get defaultHeight(): string;
58
60
  state: IState;
59
61
  componentDidUpdate(prevProps: IProps, prevState: IState): void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  type IProps = {
3
- templateRender?: () => React.Component;
3
+ templateRender?: () => React.ReactNode;
4
4
  directPrint?: boolean;
5
5
  };
6
6
  type ContainerRef = {
@@ -1,7 +1,8 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import type { IDict } from '../../_utils/types';
3
4
  type IProps = {
4
- templateRender?: () => React.Component;
5
+ templateRender?: () => React.ReactNode;
5
6
  uniqueKey?: string;
6
7
  defaultConfig?: Record<string, any>;
7
8
  preview?: boolean;
@@ -35,6 +36,7 @@ type IState = {
35
36
  };
36
37
  declare class Preview extends Component<IProps, IState> {
37
38
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
39
+ context: React.ContextType<typeof ConfigContext>;
38
40
  private provide;
39
41
  containRef: React.RefObject<any>;
40
42
  state: IState;
@@ -1,10 +1,11 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import ConfigContext from '../../config-provider/context';
3
4
  import type { CSSProperties, ComponentSize } from '../../_utils/types';
4
5
  import type { ButtonProps } from '../../antd';
5
6
  type IProps = ButtonProps & {
6
7
  size?: ComponentSize;
7
- templateRender?: () => React.Component;
8
+ templateRender?: () => React.ReactNode;
8
9
  uniqueKey?: string;
9
10
  defaultConfig?: Record<string, any>;
10
11
  preview?: boolean;
@@ -29,6 +30,7 @@ declare class QmPrint extends Component<IProps, IState> {
29
30
  icon: React.JSX.Element;
30
31
  };
31
32
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
33
+ context: React.ContextType<typeof ConfigContext>;
32
34
  previewRef: React.RefObject<any>;
33
35
  state: IState;
34
36
  clickHandle: () => Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import { QmForm, QmFormItem } from '../../index';
3
4
  type IProps = {
4
5
  setting: {
@@ -22,6 +23,7 @@ type IState = {
22
23
  };
23
24
  declare class Setting extends Component<IProps, IState> {
24
25
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
26
+ context: React.ContextType<typeof ConfigContext>;
25
27
  formRef: React.RefObject<QmForm>;
26
28
  createFormList: () => QmFormItem[];
27
29
  getInitialvalue: () => {
@@ -1,4 +1,5 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import type { ComponentSize } from '../../_utils/types';
3
4
  import type { SpaceProps as AntSpaceProps } from '../../antd';
4
5
  type IProps = Omit<AntSpaceProps, 'size'> & {
@@ -7,6 +8,7 @@ type IProps = Omit<AntSpaceProps, 'size'> & {
7
8
  export type SpaceProps = IProps;
8
9
  declare class QmSpace extends Component<IProps> {
9
10
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
11
+ context: React.ContextType<typeof ConfigContext>;
10
12
  render(): React.JSX.Element;
11
13
  }
12
14
  export default QmSpace;
@@ -3,6 +3,7 @@ type IProps = {
3
3
  min?: number | string;
4
4
  className?: string;
5
5
  style?: React.CSSProperties;
6
+ children?: React.ReactNode;
6
7
  };
7
8
  export type SplitPaneProps = IProps;
8
9
  declare const QmSplitPane: React.ForwardRefExoticComponent<IProps & {
@@ -87,14 +87,14 @@ declare const useTableCore: <T extends ITableProps>(props: T, extra: IExtra) =>
87
87
  removed: IRecord<any>[];
88
88
  };
89
89
  dataChange: () => void;
90
- tableChange: (...args: any[]) => void;
90
+ tableChange: () => void;
91
91
  toLastPage: () => void;
92
92
  toFirstPage: () => void;
93
93
  getPageCount: () => number;
94
94
  pagerChangeHandle: ({ current, pageSize }: Omit<IPagination, 'total'>) => void;
95
95
  triggerScrollXEvent: (sl: number) => void;
96
96
  triggerScrollYEvent: (st: number) => void;
97
- scrollBottomDebouncer: (...args: any[]) => void;
97
+ scrollBottomDebouncer: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
98
98
  clearTableSorter: () => void;
99
99
  clearTableFilter: () => void;
100
100
  clearSuperFilters: () => void;
@@ -1,4 +1,5 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import type { IAuth } from '../../_utils/types';
3
4
  import type { TabsProps as AntTabsProps } from '../../antd';
4
5
  type IProps = AntTabsProps & {
@@ -11,6 +12,7 @@ export type TabsProps = IProps;
11
12
  declare class QmTabs extends Component<IProps> {
12
13
  static TabPane: React.ClassicComponentClass<import("rc-tabs/lib/TabPanelList/TabPane").TabPaneProps>;
13
14
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
15
+ context: React.ContextType<typeof ConfigContext>;
14
16
  static defaultProps: {
15
17
  tabPosition: string;
16
18
  };
@@ -1,4 +1,5 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import type { ComponentSize, CSSProperties } from '../../_utils/types';
3
4
  import type { IFetchHeader } from '../../form/src/types';
4
5
  type IProps = {
@@ -25,6 +26,7 @@ type IProps = {
25
26
  export type TinymceProps = IProps;
26
27
  declare class QmTinymce extends Component<IProps> {
27
28
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
29
+ context: React.ContextType<typeof ConfigContext>;
28
30
  static propTypes: {
29
31
  size: (props: any, propName: any, componentName: any) => void;
30
32
  };
@@ -1,4 +1,5 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import type { HttpRequestHeader } from '../../download/src/download';
3
4
  import type { UploadProps, ButtonProps } from '../../antd';
4
5
  export interface UploadFile {
@@ -24,6 +25,7 @@ export type UploadFileProps = IProps;
24
25
  export declare const downloadFile: (url: string, { fileName, headers, params }: any) => Promise<void>;
25
26
  declare class QmUploadFile extends Component<IProps> {
26
27
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
28
+ context: React.ContextType<typeof ConfigContext>;
27
29
  static defaultProps: {
28
30
  name: string;
29
31
  multiple: boolean;
@@ -34,7 +36,7 @@ declare class QmUploadFile extends Component<IProps> {
34
36
  showRemoveIcon: boolean;
35
37
  };
36
38
  };
37
- get $size(): any;
39
+ get $size(): import("../../_utils/types").ComponentSize;
38
40
  beforeUpload: (file: any, fileList: any) => Promise<any>;
39
41
  doDownload: (file: any) => Promise<void>;
40
42
  render(): React.JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import type { CSSProperties } from '../../_utils/types';
3
4
  type IProps = {
4
5
  fixedSize?: [number, number];
@@ -7,12 +8,14 @@ type IProps = {
7
8
  fileSize?: number;
8
9
  className?: string;
9
10
  beforeCrop?: (file: any, fileList: any[]) => Promise<boolean>;
11
+ children?: React.ReactNode;
10
12
  };
11
13
  type IState = {
12
14
  src: string;
13
15
  };
14
16
  declare class CropperPreview extends Component<IProps, IState> {
15
17
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
18
+ context: React.ContextType<typeof ConfigContext>;
16
19
  private cropperRef;
17
20
  private beforeUploadRef;
18
21
  private fileRef;
@@ -1,4 +1,5 @@
1
1
  import React, { Component } from 'react';
2
+ import ConfigContext from '../../config-provider/context';
2
3
  import type { UploadProps } from '../../antd';
3
4
  export interface UploadFile {
4
5
  uid: string;
@@ -25,6 +26,7 @@ type IState = {
25
26
  export type UploadImgProps = IProps;
26
27
  declare class QmUploadImg extends Component<IProps, IState> {
27
28
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
29
+ context: React.ContextType<typeof ConfigContext>;
28
30
  static defaultProps: {
29
31
  name: string;
30
32
  multiple: boolean;
@@ -35,7 +37,7 @@ declare class QmUploadImg extends Component<IProps, IState> {
35
37
  };
36
38
  state: IState;
37
39
  private isFocused;
38
- get $size(): any;
40
+ get $size(): import("../../_utils/types").ComponentSize;
39
41
  get showUploadButton(): boolean;
40
42
  componentDidMount(): void;
41
43
  componentDidUpdate(prevProps: IProps): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiaozhiye/qm-design-react",
3
- "version": "1.9.8",
3
+ "version": "1.9.10",
4
4
  "description": "A Component Library for React",
5
5
  "keywords": [
6
6
  "React",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@rc-component/portal": "^1.1.2",
54
- "@rc-component/trigger": "^1.17.0",
54
+ "@rc-component/trigger": "^2.2.0",
55
55
  "add-dom-event-listener": "^1.1.0",
56
56
  "antd": "4.24.16",
57
57
  "big.js": "^6.2.1",
@@ -92,8 +92,8 @@
92
92
  "@rollup/plugin-terser": "^0.4.4",
93
93
  "@rollup/plugin-typescript": "^8.5.0",
94
94
  "@types/lodash-es": "^4.17.6",
95
- "@types/react": "^17.0.58",
96
- "@types/react-dom": "^17.0.20",
95
+ "@types/react": "^18.3.0",
96
+ "@types/react-dom": "^18.3.0",
97
97
  "@typescript-eslint/eslint-plugin": "^5.30.0",
98
98
  "@typescript-eslint/parser": "^5.30.0",
99
99
  "autoprefixer": "^10.4.14",
@@ -122,8 +122,8 @@
122
122
  "lint-staged": "^10.5.4",
123
123
  "mockjs": "^1.1.0",
124
124
  "prettier": "^2.8.8",
125
- "react": "17.0.2",
126
- "react-dom": "17.0.2",
125
+ "react": "^18.2.0",
126
+ "react-dom": "^18.2.0",
127
127
  "rimraf": "^3.0.2",
128
128
  "rollup": "^2.79.1",
129
129
  "style-loader": "^3.3.4",