@arim-aisdc/public-components 2.3.18 → 2.3.19

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.
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
17
17
  value: any;
18
18
  field: string;
19
19
  label?: string;
20
- text: string | Element | JSX.Element;
20
+ text: string | JSX.Element | Element;
21
21
  units?: string;
22
22
  width?: string;
23
23
  labelWidth?: string;
@@ -12,6 +12,16 @@ import React, { useEffect, useMemo, useRef } from 'react';
12
12
  import { Rnd } from 'react-rnd';
13
13
  import "./index.less";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ var resizeHandleClasses = {
16
+ bottom: "resizeHandleBottom",
17
+ bottomLeft: "resizeHandleBottomLeft",
18
+ bottomRight: "resizeHandleBottomRight",
19
+ left: "resizeHandleLeft",
20
+ right: "resizeHandleRight",
21
+ top: "resizeHandleTop",
22
+ topLeft: "resizeHandleTopLeft",
23
+ topRight: "resizeHandleTopRight"
24
+ };
15
25
  var CenterModal = function CenterModal(_ref) {
16
26
  var _ref$open = _ref.open,
17
27
  open = _ref$open === void 0 ? false : _ref$open,
@@ -73,6 +83,7 @@ var CenterModal = function CenterModal(_ref) {
73
83
  }, [modalBodyRef.current]);
74
84
  return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
75
85
  className: "centerModal".concat(size),
86
+ wrapClassName: 'wrapClassName',
76
87
  title: /*#__PURE__*/_jsx("div", {
77
88
  className: "modal-header ".concat(dragHandleClassName),
78
89
  style: {
@@ -107,6 +118,7 @@ var CenterModal = function CenterModal(_ref) {
107
118
  enableResizing: enableResizing,
108
119
  disableDragging: !enableDragging,
109
120
  resizeHandleWrapperClass: "resizeHandles",
121
+ resizeHandleClasses: resizeHandleClasses,
110
122
  dragHandleClassName: dragHandleClassName,
111
123
  default: {
112
124
  x: 0,
@@ -114,6 +126,16 @@ var CenterModal = function CenterModal(_ref) {
114
126
  width: 'fit-content',
115
127
  height: 'fit-content'
116
128
  },
129
+ onResizeStop: function onResizeStop(e, direction, ref, delta, position) {
130
+ var _ref$querySelector;
131
+ if (direction === 'left' || direction === 'right') return;
132
+ var modalContent = (_ref$querySelector = ref.querySelector('.ant-modal-content')) === null || _ref$querySelector === void 0 ? void 0 : _ref$querySelector.getBoundingClientRect();
133
+ var resizeContent = ref === null || ref === void 0 ? void 0 : ref.getBoundingClientRect();
134
+ var height = modalContent.height;
135
+ if (modalContent.height !== resizeContent.height) {
136
+ ref.style.height = height + "px";
137
+ }
138
+ },
117
139
  style: {
118
140
  display: 'flex',
119
141
  flexDirection: 'column',
@@ -1,86 +1,9 @@
1
- .custom-light-modal {
2
- top: 0 !important;
3
- left: 0 !important;
4
- height: 'none' !important;
5
- }
6
-
7
- .ant-design-draggable-modal-resize-handle {
8
- display: none;
9
-
10
- .ant-design-draggable-modal .ant-design-draggable-modal-title {
11
- padding: 0;
12
- }
13
- }
14
-
15
- .centerModal {
16
- .ant-modal-content {
17
- resize: none; /* disable default resize */
18
- overflow: hidden;
19
- }
20
- }
21
-
22
- .resize-handle {
23
- opacity: 0.6;
24
- transition: opacity 0.2s;
25
-
26
- &:hover {
27
- opacity: 1;
28
- border-color: #40a9ff;
29
- }
30
- }
31
-
32
- .is-resizing .resize-handle {
33
- opacity: 1;
34
- border-color: #096dd9 !important;
35
- }
36
-
37
-
38
-
39
1
  .centerModal {
40
- .react-resizable {
41
- position: absolute !important;
42
- }
43
-
44
- .react-rnd {
45
- border: 1px solid #d9d9d9;
46
- border-radius: 6px;
47
- overflow: hidden;
48
- background: #fff;
49
- box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
50
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
51
- 0 9px 28px 8px rgba(0, 0, 0, 0.05);
52
- }
53
-
54
- .resize-handle {
55
- position: absolute;
56
- right: 0;
57
- bottom: 0;
58
- width: 16px;
59
- height: 16px;
60
- cursor: nwse-resize;
61
- background: transparent;
62
- border-right: 2px solid #1890ff;
63
- border-bottom: 2px solid #1890ff;
64
- z-index: 1001;
65
- opacity: 0.7;
66
- transition: opacity 0.2s;
67
-
68
- &:hover {
69
- opacity: 1;
70
- border-color: #40a9ff;
71
- }
72
- }
73
-
74
- .ant-modal-body {
75
- padding: 0 !important;
76
- }
77
-
78
2
  .resizeHandles div {
79
3
  pointer-events: auto;
80
4
  z-index: 1002;
81
5
  }
82
6
 
83
-
84
7
  .ant-modal-content {
85
8
  display: flex;
86
9
  flex-direction: column;
@@ -94,8 +17,17 @@
94
17
  .react-draggable {
95
18
  position: relative !important;
96
19
  }
97
- }
98
20
 
99
- .react-draggable {
100
- position: relative;
101
- }
21
+ .resizeHandleBottomLeft, .resizeHandleBottomRight, .resizeHandleTopLeft, .resizeHandleTopRight {
22
+ width: 40px !important;
23
+ height: 40px !important;
24
+ }
25
+
26
+ // .resizeHandleLeft, .resizeHandleRight {
27
+ // width: 20px !important;
28
+ // }
29
+
30
+ // .resizeHandleTop, .resizeHandleBottom {
31
+ // height: 20px !important;
32
+ // }
33
+ }
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
2
- export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
3
- export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
4
- export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
5
- export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
2
+ export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
3
+ export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
4
+ export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
5
+ export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
6
6
  declare const customSortFns: {
7
- numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
8
- stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
9
- timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
10
- numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
7
+ numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
8
+ stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
9
+ timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
10
+ numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
11
11
  };
12
12
  export default customSortFns;
13
13
  export type SortFnType = keyof typeof customSortFns | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.3.18",
3
+ "version": "2.3.19",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",