@douyinfe/semi-foundation 2.38.3-alpha.2-path-settimeout → 2.38.3-alpha.3-patch-fix-2932

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.
@@ -2,7 +2,7 @@ declare const cssClasses: {
2
2
  PREFIX: string;
3
3
  };
4
4
  declare const strings: {
5
- BOUNDARY_SET: ("start" | "end")[];
5
+ BOUNDARY_SET: ("end" | "start")[];
6
6
  POSITION_SET: string[];
7
7
  MODE_SET: string[];
8
8
  MODE_MAP: {
@@ -111,12 +111,11 @@ class SliderFoundation extends _foundation.default {
111
111
  */
112
112
  this.handleMousePos = (clientX, clientY) => {
113
113
  const parentRect = this._adapter.getParentRect();
114
- const scrollParent = this._adapter.getScrollParentVal();
115
114
  const parentX = parentRect ? parentRect.left : 0;
116
115
  const parentY = parentRect ? parentRect.top : 0;
117
116
  return {
118
- x: clientX - parentX + scrollParent.scrollLeft,
119
- y: clientY - parentY + scrollParent.scrollTop
117
+ x: clientX - parentX,
118
+ y: clientY - parentY
120
119
  };
121
120
  };
122
121
  /**
@@ -75,6 +75,6 @@ export declare function getValueOrKey(data: any): any;
75
75
  export declare function normalizeValue(value: any, withObject: boolean): any;
76
76
  export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
77
77
  export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
78
- export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
78
+ export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
79
79
  export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
80
80
  export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
@@ -18,7 +18,7 @@ declare const strings: {
18
18
  DRAG_AREA_ILLEGAL: string;
19
19
  TRIGGER_AUTO: "auto";
20
20
  TRIGGER_CUSTOM: "custom";
21
- UPLOAD_TRIGGER: ("custom" | "auto")[];
21
+ UPLOAD_TRIGGER: ("auto" | "custom")[];
22
22
  VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
23
23
  PROMPT_POSITION: readonly ["left", "right", "bottom"];
24
24
  };
@@ -2,7 +2,7 @@ declare const cssClasses: {
2
2
  PREFIX: string;
3
3
  };
4
4
  declare const strings: {
5
- BOUNDARY_SET: ("start" | "end")[];
5
+ BOUNDARY_SET: ("end" | "start")[];
6
6
  POSITION_SET: string[];
7
7
  MODE_SET: string[];
8
8
  MODE_MAP: {
@@ -103,12 +103,11 @@ export default class SliderFoundation extends BaseFoundation {
103
103
  */
104
104
  this.handleMousePos = (clientX, clientY) => {
105
105
  const parentRect = this._adapter.getParentRect();
106
- const scrollParent = this._adapter.getScrollParentVal();
107
106
  const parentX = parentRect ? parentRect.left : 0;
108
107
  const parentY = parentRect ? parentRect.top : 0;
109
108
  return {
110
- x: clientX - parentX + scrollParent.scrollLeft,
111
- y: clientY - parentY + scrollParent.scrollTop
109
+ x: clientX - parentX,
110
+ y: clientY - parentY
112
111
  };
113
112
  };
114
113
  /**
@@ -75,6 +75,6 @@ export declare function getValueOrKey(data: any): any;
75
75
  export declare function normalizeValue(value: any, withObject: boolean): any;
76
76
  export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
77
77
  export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
78
- export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
78
+ export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
79
79
  export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
80
80
  export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
@@ -18,7 +18,7 @@ declare const strings: {
18
18
  DRAG_AREA_ILLEGAL: string;
19
19
  TRIGGER_AUTO: "auto";
20
20
  TRIGGER_CUSTOM: "custom";
21
- UPLOAD_TRIGGER: ("custom" | "auto")[];
21
+ UPLOAD_TRIGGER: ("auto" | "custom")[];
22
22
  VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
23
23
  PROMPT_POSITION: readonly ["left", "right", "bottom"];
24
24
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.38.3-alpha.2-path-settimeout",
3
+ "version": "2.38.3-alpha.3-patch-fix-2932",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@douyinfe/semi-animation": "2.38.3-alpha.2-path-settimeout",
10
+ "@douyinfe/semi-animation": "2.38.3-alpha.3-patch-fix-2932",
11
11
  "async-validator": "^3.5.0",
12
12
  "classnames": "^2.2.6",
13
13
  "date-fns": "^2.29.3",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "6ee0dec58c24d51eec631bc922854834afc548cf",
26
+ "gitHead": "007aa8cccc50de0a7ee68b53bc6e1a62eed8e952",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -221,10 +221,9 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
221
221
  */
222
222
  handleMousePos = (clientX: number, clientY: number) => {
223
223
  const parentRect = this._adapter.getParentRect();
224
- const scrollParent = this._adapter.getScrollParentVal();
225
224
  const parentX = parentRect ? parentRect.left : 0;
226
225
  const parentY = parentRect ? parentRect.top : 0;
227
- return { x: clientX - parentX + scrollParent.scrollLeft, y: clientY - parentY + scrollParent.scrollTop };
226
+ return { x: clientX - parentX, y: clientY - parentY };
228
227
  };
229
228
 
230
229
  /**
@@ -378,7 +377,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
378
377
  * @memberof SliderFoundation
379
378
  */
380
379
  outPutValue = (inputValue: SliderProps['value']) => {
381
- const checkHowManyDecimals = (num: number)=>{
380
+ const checkHowManyDecimals = (num: number) => {
382
381
  const reg = /^\d+(\.\d+)?$/;
383
382
  if (reg.test(String(num))) {
384
383
  return num.toString().split('.')[1]?.length ?? 0;
@@ -386,10 +385,10 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
386
385
  return 0;
387
386
  };
388
387
  const step = this._adapter.getProp('step');
389
- const transWay = (()=>{
388
+ const transWay = (() => {
390
389
  const decimals = checkHowManyDecimals(step);
391
390
  const multipler = Math.pow(10, decimals);
392
- return (value: number)=>{
391
+ return (value: number) => {
393
392
  return Math.round(value * multipler) / multipler;
394
393
  };
395
394
  })();