@jiaozhiye/qm-design-react 1.10.7 → 1.10.8

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.
@@ -9,6 +9,8 @@ type ICellEditProps = {
9
9
  };
10
10
  type CellEditRef = {
11
11
  focus: () => void;
12
+ isEditable: () => boolean;
13
+ isOpening: () => boolean;
12
14
  };
13
15
  declare const CellEdit: React.ForwardRefExoticComponent<ICellEditProps & React.RefAttributes<CellEditRef>>;
14
16
  export default CellEdit;
@@ -6,8 +6,8 @@ type Instance = {
6
6
  vm: React.ForwardedRef<TableRef>;
7
7
  };
8
8
  declare const TableManager: {
9
+ _getInstance: (id: string) => Nullable<Instance>;
9
10
  getFocusInstance: () => Nullable<Instance>;
10
- getInstance: (id: string) => Nullable<Instance>;
11
11
  focus: (id: string) => void;
12
12
  register: (id: string, instance: React.ForwardedRef<TableRef>) => void;
13
13
  deregister: (id: string) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { ITableProps, TableRef } from './types';
3
3
  export type TableProps = ITableProps;
4
- declare const Table: React.ForwardRefExoticComponent<ITableProps & React.RefAttributes<TableRef>>;
5
- export default Table;
4
+ declare const QmTable: React.ForwardRefExoticComponent<ITableProps & React.RefAttributes<TableRef>>;
5
+ export default QmTable;
@@ -1,5 +1,4 @@
1
- import React, { Component } from 'react';
2
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
3
2
  import type { ComponentSize, CSSProperties } from '../../_utils/types';
4
3
  import type { IFetchHeader } from '../../form/src/types';
5
4
  type IProps = {
@@ -24,18 +23,5 @@ type IProps = {
24
23
  }, ev: any) => void;
25
24
  };
26
25
  export type TinymceProps = IProps;
27
- declare class QmTinymce extends Component<IProps> {
28
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
29
- context: React.ContextType<typeof ConfigContext>;
30
- static propTypes: {
31
- size: (props: any, propName: any, componentName: any) => void;
32
- };
33
- defaultOption: {
34
- height: number;
35
- plugins: string;
36
- menubar: string;
37
- toolbar: string;
38
- };
39
- render(): React.JSX.Element;
40
- }
41
- export default QmTinymce;
26
+ declare const Tinymce: React.FC<IProps>;
27
+ export default Tinymce;
@@ -1,5 +1,4 @@
1
- import React, { Component } from 'react';
2
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
3
2
  import type { AjaxResponse } from '../../_utils/types';
4
3
  import type { HttpRequestHeader } from '../../download/src/download';
5
4
  import type { UploadProps, ButtonProps } from '../../antd';
@@ -18,6 +17,7 @@ type IProps = Omit<UploadProps, 'onPreview'> & {
18
17
  readOnly?: boolean;
19
18
  draggable?: boolean;
20
19
  editable?: boolean;
20
+ batchDownload?: boolean;
21
21
  fileDirection?: 'horizontal' | 'vertical';
22
22
  downloadWithHeaders?: boolean | HttpRequestHeader;
23
23
  button?: {
@@ -28,35 +28,6 @@ type IProps = Omit<UploadProps, 'onPreview'> & {
28
28
  onEditChange?: (file: UploadFile, fileList: UploadFile[]) => void;
29
29
  };
30
30
  export type UploadFileProps = IProps;
31
- type IState = {
32
- actived: Record<string, boolean>;
33
- };
34
31
  export declare const downloadFile: (url: string, { fileName, headers, params }: any) => Promise<void>;
35
- declare class QmUploadFile extends Component<IProps, IState> {
36
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
37
- context: React.ContextType<typeof ConfigContext>;
38
- static defaultProps: {
39
- name: string;
40
- multiple: boolean;
41
- fileDirection: string;
42
- showUploadList: {
43
- showPreviewIcon: boolean;
44
- showDownloadIcon: boolean;
45
- showRemoveIcon: boolean;
46
- };
47
- };
48
- state: IState;
49
- uploadRef: React.RefObject<HTMLSpanElement>;
50
- private sortableInstance;
51
- get $size(): import("../../_utils/types").ComponentSize;
52
- componentDidMount(): void;
53
- componentWillUnmount(): void;
54
- setActiveState: (uid: string, value?: boolean) => void;
55
- createSortable: () => void;
56
- getFileListNode: () => Element | null;
57
- beforeUpload: (file: any, fileList: any) => Promise<any>;
58
- doDownload: (file: UploadFile) => Promise<void>;
59
- itemRender: (file: UploadFile, actions: any) => React.JSX.Element;
60
- render(): React.JSX.Element;
61
- }
62
- export default QmUploadFile;
32
+ declare const UploadFile: React.FC<IProps>;
33
+ export default UploadFile;
@@ -1,48 +1,53 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2023-10-18 09:35:59
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-upload-file: ~'@{qm-prefix}-upload-file';
10
-
11
- .@{prefix-upload-file} {
12
- .ant-upload-list {
13
- .ant-upload-list-text-container {
14
- max-width: 100%;
15
- }
16
- .ant-upload-list-item {
17
- height: 30px;
18
- margin: 0;
19
- &-name {
20
- padding: 0 4px;
21
- a {
22
- display: block;
23
- }
24
- }
25
- &.handle {
26
- .ant-upload-list-item-name {
27
- cursor: move;
28
- }
29
- }
30
- }
31
- }
32
- &--horizontal {
33
- .ant-upload-list {
34
- display: flex;
35
- flex-wrap: wrap;
36
- }
37
- }
38
- &--lg {
39
- .ant-upload-list .ant-upload-list-item {
40
- height: 38px;
41
- }
42
- }
43
- &--sm {
44
- .ant-upload-list .ant-upload-list-item {
45
- height: 22px;
46
- }
47
- }
48
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2023-10-18 09:35:59
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-upload-file: ~'@{qm-prefix}-upload-file';
10
+
11
+ .@{prefix-upload-file} {
12
+ .ant-upload-select {
13
+ &:has(.inner:empty) {
14
+ display: none;
15
+ }
16
+ }
17
+ .ant-upload-list {
18
+ .ant-upload-list-text-container {
19
+ max-width: 100%;
20
+ }
21
+ .ant-upload-list-item {
22
+ height: 30px;
23
+ margin: 0;
24
+ &-name {
25
+ padding: 0 4px;
26
+ a {
27
+ display: block;
28
+ }
29
+ }
30
+ &.handle {
31
+ .ant-upload-list-item-name {
32
+ cursor: move;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ &--horizontal {
38
+ .ant-upload-list {
39
+ display: flex;
40
+ flex-wrap: wrap;
41
+ }
42
+ }
43
+ &--lg {
44
+ .ant-upload-list .ant-upload-list-item {
45
+ height: 38px;
46
+ }
47
+ }
48
+ &--sm {
49
+ .ant-upload-list .ant-upload-list-item {
50
+ height: 22px;
51
+ }
52
+ }
53
+ }
@@ -1,5 +1,4 @@
1
- import React, { Component } from 'react';
2
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
3
2
  import type { UploadFile } from '../../upload-file/src/upload-file';
4
3
  import type { UploadProps } from '../../antd';
5
4
  type IProps = UploadProps & {
@@ -14,36 +13,6 @@ type IProps = UploadProps & {
14
13
  beforeCrop?: (file: UploadFile, fileList: UploadFile[]) => Promise<boolean>;
15
14
  onSortChange?: (fileList: UploadFile[]) => void;
16
15
  };
17
- type IState = {
18
- previewVisible: boolean;
19
- currentIndex: number;
20
- };
21
16
  export type UploadImgProps = IProps;
22
- declare class QmUploadImg extends Component<IProps, IState> {
23
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
24
- context: React.ContextType<typeof ConfigContext>;
25
- static defaultProps: {
26
- name: string;
27
- multiple: boolean;
28
- accept: string;
29
- listType: string;
30
- quality: number;
31
- openCropper: boolean;
32
- };
33
- state: IState;
34
- uploadRef: React.RefObject<HTMLSpanElement>;
35
- private sortableInstance;
36
- private isFocused;
37
- get $size(): import("../../_utils/types").ComponentSize;
38
- get showUploadButton(): boolean;
39
- componentDidMount(): void;
40
- componentDidUpdate(prevProps: IProps): void;
41
- componentWillUnmount(): void;
42
- createSortable: () => void;
43
- getFileListNode: () => Element | null;
44
- beforeUpload: (file: any, fileList: any) => Promise<any>;
45
- handlePreview: (file: UploadFile) => void;
46
- handlePaste: (ev: any) => Promise<void>;
47
- render(): React.JSX.Element;
48
- }
49
- export default QmUploadImg;
17
+ declare const UploadImg: React.FC<IProps>;
18
+ export default UploadImg;
@@ -1,93 +1,101 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2023-10-15 12:14:45
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-upload-img: ~'@{qm-prefix}-upload-img';
10
- @prefix-cropper-preview: ~'@{qm-prefix}-cropper-preview';
11
-
12
- .@{prefix-upload-img} {
13
- .ant-upload-select {
14
- & > span {
15
- flex-direction: column;
16
- .ant-upload-drag-icon {
17
- font-size: 24px;
18
- line-height: 0;
19
- color: @--primary-5;
20
- }
21
- .ant-upload-text {
22
- font-size: @--font-size-base - 1px;
23
- }
24
- .ant-upload-button {
25
- display: inline-block;
26
- text-align: center;
27
- text-transform: none;
28
- text-decoration: none;
29
- background: transparent;
30
- border: 0;
31
- outline: 0;
32
- font-size: @--font-size-base - 1px;
33
- transition: all 0.3s ease;
34
- cursor: inherit;
35
- &:focus {
36
- box-shadow: 0 0 2px 0 @--primary-5;
37
- background-color: @--primary-1;
38
- }
39
- &.disabled {
40
- pointer-events: none;
41
- }
42
- }
43
- }
44
- }
45
- .upload-item {
46
- height: 100%;
47
- position: relative;
48
- &:hover {
49
- .icon {
50
- display: block;
51
- }
52
- }
53
- &.handle {
54
- cursor: move;
55
- }
56
- .icon {
57
- position: absolute;
58
- top: 2px;
59
- right: 2px;
60
- padding: 1px;
61
- border-radius: @--border-radius-base;
62
- font-size: @--font-size-sm;
63
- color: #fff;
64
- background-color: rgba(0, 0, 0, 0.4);
65
- z-index: 2;
66
- cursor: pointer;
67
- display: none;
68
- }
69
- }
70
- }
71
-
72
- .@{prefix-cropper-preview} {
73
- .cropper-preview {
74
- display: flex;
75
- flex-direction: row;
76
- .cropper-area {
77
- flex: 1;
78
- .actions {
79
- margin-top: @--margin-md;
80
- }
81
- }
82
- .preview-area {
83
- width: 380px;
84
- min-height: 380px;
85
- margin-left: @--margin-md;
86
- display: flex;
87
- justify-content: center;
88
- .preview {
89
- overflow: hidden;
90
- }
91
- }
92
- }
93
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2023-10-15 12:14:45
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-upload-img: ~'@{qm-prefix}-upload-img';
10
+ @prefix-cropper-preview: ~'@{qm-prefix}-cropper-preview';
11
+
12
+ .@{prefix-upload-img} {
13
+ .ant-upload-select {
14
+ & > span {
15
+ flex-direction: column;
16
+ }
17
+ &:has(.inner:empty) {
18
+ display: none;
19
+ }
20
+ .ant-upload-drag-icon {
21
+ font-size: 24px;
22
+ line-height: 0;
23
+ color: @--primary-5;
24
+ }
25
+ .ant-upload-text {
26
+ font-size: @--font-size-base - 1px;
27
+ }
28
+ .ant-upload-button {
29
+ display: inline-block;
30
+ text-align: center;
31
+ text-transform: none;
32
+ text-decoration: none;
33
+ background: transparent;
34
+ border: 0;
35
+ outline: 0;
36
+ font-size: @--font-size-base - 1px;
37
+ transition: all 0.3s ease;
38
+ cursor: inherit;
39
+ &:focus {
40
+ box-shadow: 0 0 2px 0 @--primary-5;
41
+ background-color: @--primary-1;
42
+ }
43
+ &.disabled {
44
+ pointer-events: none;
45
+ }
46
+ }
47
+ &[class*='disabled'] {
48
+ .ant-upload-button {
49
+ pointer-events: none;
50
+ }
51
+ }
52
+ }
53
+ .upload-item {
54
+ height: 100%;
55
+ position: relative;
56
+ &:hover {
57
+ .icon {
58
+ display: block;
59
+ }
60
+ }
61
+ &.handle {
62
+ cursor: move;
63
+ }
64
+ .icon {
65
+ position: absolute;
66
+ top: 2px;
67
+ right: 2px;
68
+ padding: 1px;
69
+ border-radius: @--border-radius-base;
70
+ font-size: @--font-size-sm;
71
+ color: #fff;
72
+ background-color: rgba(0, 0, 0, 0.4);
73
+ z-index: 2;
74
+ cursor: pointer;
75
+ display: none;
76
+ }
77
+ }
78
+ }
79
+
80
+ .@{prefix-cropper-preview} {
81
+ .cropper-preview {
82
+ display: flex;
83
+ flex-direction: row;
84
+ .cropper-area {
85
+ flex: 1;
86
+ .actions {
87
+ margin-top: @--margin-md;
88
+ }
89
+ }
90
+ .preview-area {
91
+ width: 380px;
92
+ min-height: 380px;
93
+ margin-left: @--margin-md;
94
+ display: flex;
95
+ justify-content: center;
96
+ .preview {
97
+ overflow: hidden;
98
+ }
99
+ }
100
+ }
101
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiaozhiye/qm-design-react",
3
- "version": "1.10.7",
3
+ "version": "1.10.8",
4
4
  "description": "A Component Library for React",
5
5
  "keywords": [
6
6
  "React",