@mui/utils 5.15.9 → 5.15.12
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/CHANGELOG.md +375 -133
- package/formatMuiErrorMessage/formatMuiErrorMessage.d.ts +1 -1
- package/formatMuiErrorMessage/formatMuiErrorMessage.js +1 -1
- package/index.js +1 -1
- package/legacy/formatMuiErrorMessage/formatMuiErrorMessage.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/useTimeout/useTimeout.js +4 -4
- package/modern/formatMuiErrorMessage/formatMuiErrorMessage.js +1 -1
- package/modern/index.js +1 -1
- package/modern/useTimeout/useTimeout.js +4 -4
- package/node/formatMuiErrorMessage/formatMuiErrorMessage.js +1 -1
- package/node/index.js +1 -1
- package/node/useTimeout/useTimeout.js +4 -4
- package/package.json +1 -1
- package/useTimeout/useTimeout.d.ts +1 -1
- package/useTimeout/useTimeout.js +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WARNING: Don't import this directly.
|
|
3
|
-
* Use `MuiError` from `@mui-
|
|
3
|
+
* Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.
|
|
4
4
|
* @param {number} code
|
|
5
5
|
*/
|
|
6
6
|
export default function formatMuiErrorMessage(code: number): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WARNING: Don't import this directly.
|
|
3
|
-
* Use `MuiError` from `@mui-
|
|
3
|
+
* Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.
|
|
4
4
|
* @param {number} code
|
|
5
5
|
*/
|
|
6
6
|
export default function formatMuiErrorMessage(code) {
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WARNING: Don't import this directly.
|
|
3
|
-
* Use `MuiError` from `@mui-
|
|
3
|
+
* Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.
|
|
4
4
|
* @param {number} code
|
|
5
5
|
*/
|
|
6
6
|
export default function formatMuiErrorMessage(code) {
|
package/legacy/index.js
CHANGED
|
@@ -8,11 +8,11 @@ export var Timeout = /*#__PURE__*/function () {
|
|
|
8
8
|
function Timeout() {
|
|
9
9
|
var _this = this;
|
|
10
10
|
_classCallCheck(this, Timeout);
|
|
11
|
-
this.currentId =
|
|
11
|
+
this.currentId = null;
|
|
12
12
|
this.clear = function () {
|
|
13
|
-
if (_this.currentId !==
|
|
13
|
+
if (_this.currentId !== null) {
|
|
14
14
|
clearTimeout(_this.currentId);
|
|
15
|
-
_this.currentId =
|
|
15
|
+
_this.currentId = null;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
this.disposeEffect = function () {
|
|
@@ -29,7 +29,7 @@ export var Timeout = /*#__PURE__*/function () {
|
|
|
29
29
|
var _this2 = this;
|
|
30
30
|
this.clear();
|
|
31
31
|
this.currentId = setTimeout(function () {
|
|
32
|
-
_this2.currentId =
|
|
32
|
+
_this2.currentId = null;
|
|
33
33
|
fn();
|
|
34
34
|
}, delay);
|
|
35
35
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WARNING: Don't import this directly.
|
|
3
|
-
* Use `MuiError` from `@mui-
|
|
3
|
+
* Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.
|
|
4
4
|
* @param {number} code
|
|
5
5
|
*/
|
|
6
6
|
export default function formatMuiErrorMessage(code) {
|
package/modern/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import useLazyRef from '../useLazyRef/useLazyRef';
|
|
|
4
4
|
import useOnMount from '../useOnMount/useOnMount';
|
|
5
5
|
export class Timeout {
|
|
6
6
|
constructor() {
|
|
7
|
-
this.currentId =
|
|
7
|
+
this.currentId = null;
|
|
8
8
|
this.clear = () => {
|
|
9
|
-
if (this.currentId !==
|
|
9
|
+
if (this.currentId !== null) {
|
|
10
10
|
clearTimeout(this.currentId);
|
|
11
|
-
this.currentId =
|
|
11
|
+
this.currentId = null;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
this.disposeEffect = () => {
|
|
@@ -24,7 +24,7 @@ export class Timeout {
|
|
|
24
24
|
start(delay, fn) {
|
|
25
25
|
this.clear();
|
|
26
26
|
this.currentId = setTimeout(() => {
|
|
27
|
-
this.currentId =
|
|
27
|
+
this.currentId = null;
|
|
28
28
|
fn();
|
|
29
29
|
}, delay);
|
|
30
30
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = formatMuiErrorMessage;
|
|
7
7
|
/**
|
|
8
8
|
* WARNING: Don't import this directly.
|
|
9
|
-
* Use `MuiError` from `@mui-
|
|
9
|
+
* Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.
|
|
10
10
|
* @param {number} code
|
|
11
11
|
*/
|
|
12
12
|
function formatMuiErrorMessage(code) {
|
package/node/index.js
CHANGED
|
@@ -11,11 +11,11 @@ var _useLazyRef = _interopRequireDefault(require("../useLazyRef/useLazyRef"));
|
|
|
11
11
|
var _useOnMount = _interopRequireDefault(require("../useOnMount/useOnMount"));
|
|
12
12
|
class Timeout {
|
|
13
13
|
constructor() {
|
|
14
|
-
this.currentId =
|
|
14
|
+
this.currentId = null;
|
|
15
15
|
this.clear = () => {
|
|
16
|
-
if (this.currentId !==
|
|
16
|
+
if (this.currentId !== null) {
|
|
17
17
|
clearTimeout(this.currentId);
|
|
18
|
-
this.currentId =
|
|
18
|
+
this.currentId = null;
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
this.disposeEffect = () => {
|
|
@@ -31,7 +31,7 @@ class Timeout {
|
|
|
31
31
|
start(delay, fn) {
|
|
32
32
|
this.clear();
|
|
33
33
|
this.currentId = setTimeout(() => {
|
|
34
|
-
this.currentId =
|
|
34
|
+
this.currentId = null;
|
|
35
35
|
fn();
|
|
36
36
|
}, delay);
|
|
37
37
|
}
|
package/package.json
CHANGED
package/useTimeout/useTimeout.js
CHANGED
|
@@ -4,11 +4,11 @@ import useLazyRef from '../useLazyRef/useLazyRef';
|
|
|
4
4
|
import useOnMount from '../useOnMount/useOnMount';
|
|
5
5
|
export class Timeout {
|
|
6
6
|
constructor() {
|
|
7
|
-
this.currentId =
|
|
7
|
+
this.currentId = null;
|
|
8
8
|
this.clear = () => {
|
|
9
|
-
if (this.currentId !==
|
|
9
|
+
if (this.currentId !== null) {
|
|
10
10
|
clearTimeout(this.currentId);
|
|
11
|
-
this.currentId =
|
|
11
|
+
this.currentId = null;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
this.disposeEffect = () => {
|
|
@@ -24,7 +24,7 @@ export class Timeout {
|
|
|
24
24
|
start(delay, fn) {
|
|
25
25
|
this.clear();
|
|
26
26
|
this.currentId = setTimeout(() => {
|
|
27
|
-
this.currentId =
|
|
27
|
+
this.currentId = null;
|
|
28
28
|
fn();
|
|
29
29
|
}, delay);
|
|
30
30
|
}
|