@cloud-ru/uikit-product-utils 7.0.3 → 8.0.1
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 +22 -0
- package/dist/cjs/components/index.d.ts +0 -1
- package/dist/cjs/components/index.js +0 -1
- package/dist/cjs/config.d.ts +2 -0
- package/dist/cjs/config.js +18 -0
- package/dist/cjs/hooks/index.d.ts +0 -1
- package/dist/cjs/hooks/index.js +0 -1
- package/dist/cjs/utils/getAdaptive.d.ts +1 -1
- package/dist/cjs/utils/getAdaptive.js +2 -2
- package/dist/esm/components/index.d.ts +0 -1
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/config.d.ts +2 -0
- package/dist/esm/config.js +2 -0
- package/dist/esm/hooks/index.d.ts +0 -1
- package/dist/esm/hooks/index.js +0 -1
- package/dist/esm/utils/getAdaptive.d.ts +1 -1
- package/dist/esm/utils/getAdaptive.js +2 -2
- package/package.json +20 -4
- package/src/components/index.ts +0 -1
- package/src/config.ts +2 -0
- package/src/hooks/index.ts +0 -1
- package/src/utils/getAdaptive.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 8.0.1 (2025-11-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **FF-7533:** mobile layout type for small tablets ([22fc805](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/22fc805273e29253c6e54f2587d121999744b1ff))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 8.0.0 (2025-11-24)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### BREAKING CHANGES
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
* **FF-7631:** special entry for useConfig ([21d4aea](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/21d4aea1e3ea05b517f66080af8f2eefaf999cfb))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## 7.0.3 (2025-11-13)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ConfigProvider"), exports);
|
|
18
17
|
__exportStar(require("./ForThemeMode"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./components/ConfigProvider"), exports);
|
|
18
|
+
__exportStar(require("./hooks/useConfig"), exports);
|
|
@@ -6,7 +6,6 @@ export * from './useForceUpdate';
|
|
|
6
6
|
export * from './useForceUpdateOnPageLoadedCompletely';
|
|
7
7
|
export * from './useEventHandler';
|
|
8
8
|
export * from './useUniqueId';
|
|
9
|
-
export * from './useConfig';
|
|
10
9
|
export * from './useTextProvider';
|
|
11
10
|
export * from './useAdaptive';
|
|
12
11
|
export * from './useDisplayMode';
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -22,7 +22,6 @@ __exportStar(require("./useForceUpdate"), exports);
|
|
|
22
22
|
__exportStar(require("./useForceUpdateOnPageLoadedCompletely"), exports);
|
|
23
23
|
__exportStar(require("./useEventHandler"), exports);
|
|
24
24
|
__exportStar(require("./useUniqueId"), exports);
|
|
25
|
-
__exportStar(require("./useConfig"), exports);
|
|
26
25
|
__exportStar(require("./useTextProvider"), exports);
|
|
27
26
|
__exportStar(require("./useAdaptive"), exports);
|
|
28
27
|
__exportStar(require("./useDisplayMode"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptiveQueriesTitle } from '../constants/adaptive';
|
|
2
2
|
import { LayoutType, MatchMediaGeneric } from '../types/adaptive';
|
|
3
|
-
export declare function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
|
|
3
|
+
export declare function getAdaptive({ isMobile, isTablet }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
|
|
4
4
|
layoutType: LayoutType;
|
|
5
5
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAdaptive = getAdaptive;
|
|
4
4
|
const getUserAgentInfo_1 = require("./getUserAgentInfo");
|
|
5
|
-
function getAdaptive({ isMobile }) {
|
|
5
|
+
function getAdaptive({ isMobile, isTablet }) {
|
|
6
6
|
const { device } = (0, getUserAgentInfo_1.getUserAgentInfo)();
|
|
7
7
|
let layoutType;
|
|
8
8
|
switch (device.type) {
|
|
@@ -10,7 +10,7 @@ function getAdaptive({ isMobile }) {
|
|
|
10
10
|
layoutType = 'mobile';
|
|
11
11
|
break;
|
|
12
12
|
case 'tablet':
|
|
13
|
-
layoutType = 'tablet';
|
|
13
|
+
layoutType = isMobile || isTablet ? 'mobile' : 'tablet';
|
|
14
14
|
break;
|
|
15
15
|
default:
|
|
16
16
|
layoutType = isMobile ? 'desktopSmall' : 'desktop';
|
|
@@ -6,7 +6,6 @@ export * from './useForceUpdate';
|
|
|
6
6
|
export * from './useForceUpdateOnPageLoadedCompletely';
|
|
7
7
|
export * from './useEventHandler';
|
|
8
8
|
export * from './useUniqueId';
|
|
9
|
-
export * from './useConfig';
|
|
10
9
|
export * from './useTextProvider';
|
|
11
10
|
export * from './useAdaptive';
|
|
12
11
|
export * from './useDisplayMode';
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -6,7 +6,6 @@ export * from './useForceUpdate';
|
|
|
6
6
|
export * from './useForceUpdateOnPageLoadedCompletely';
|
|
7
7
|
export * from './useEventHandler';
|
|
8
8
|
export * from './useUniqueId';
|
|
9
|
-
export * from './useConfig';
|
|
10
9
|
export * from './useTextProvider';
|
|
11
10
|
export * from './useAdaptive';
|
|
12
11
|
export * from './useDisplayMode';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptiveQueriesTitle } from '../constants/adaptive';
|
|
2
2
|
import { LayoutType, MatchMediaGeneric } from '../types/adaptive';
|
|
3
|
-
export declare function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
|
|
3
|
+
export declare function getAdaptive({ isMobile, isTablet }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
|
|
4
4
|
layoutType: LayoutType;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUserAgentInfo } from './getUserAgentInfo';
|
|
2
|
-
export function getAdaptive({ isMobile }) {
|
|
2
|
+
export function getAdaptive({ isMobile, isTablet }) {
|
|
3
3
|
const { device } = getUserAgentInfo();
|
|
4
4
|
let layoutType;
|
|
5
5
|
switch (device.type) {
|
|
@@ -7,7 +7,7 @@ export function getAdaptive({ isMobile }) {
|
|
|
7
7
|
layoutType = 'mobile';
|
|
8
8
|
break;
|
|
9
9
|
case 'tablet':
|
|
10
|
-
layoutType = 'tablet';
|
|
10
|
+
layoutType = isMobile || isTablet ? 'mobile' : 'tablet';
|
|
11
11
|
break;
|
|
12
12
|
default:
|
|
13
13
|
layoutType = isMobile ? 'desktopSmall' : 'desktop';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-utils",
|
|
3
3
|
"title": "Utils",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.1",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -9,9 +9,25 @@
|
|
|
9
9
|
],
|
|
10
10
|
"description": "",
|
|
11
11
|
"types": "./dist/esm/index.d.ts",
|
|
12
|
+
"typesVersions": {
|
|
13
|
+
"*": {
|
|
14
|
+
".": [
|
|
15
|
+
"./dist/esm/index.d.ts"
|
|
16
|
+
],
|
|
17
|
+
"uikit-config": [
|
|
18
|
+
"./dist/esm/config.d.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
12
22
|
"exports": {
|
|
13
|
-
"
|
|
14
|
-
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./dist/esm/index.js",
|
|
25
|
+
"require": "./dist/cjs/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./uikit-config": {
|
|
28
|
+
"import": "./dist/esm/config.js",
|
|
29
|
+
"require": "./dist/cjs/config.js"
|
|
30
|
+
}
|
|
15
31
|
},
|
|
16
32
|
"files": [
|
|
17
33
|
"dist/esm",
|
|
@@ -68,5 +84,5 @@
|
|
|
68
84
|
"optional": true
|
|
69
85
|
}
|
|
70
86
|
},
|
|
71
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "8968606769e5da46db696dfa70d7ad999564388d"
|
|
72
88
|
}
|
package/src/components/index.ts
CHANGED
package/src/config.ts
ADDED
package/src/hooks/index.ts
CHANGED
|
@@ -6,7 +6,6 @@ export * from './useForceUpdate';
|
|
|
6
6
|
export * from './useForceUpdateOnPageLoadedCompletely';
|
|
7
7
|
export * from './useEventHandler';
|
|
8
8
|
export * from './useUniqueId';
|
|
9
|
-
export * from './useConfig';
|
|
10
9
|
export * from './useTextProvider';
|
|
11
10
|
export * from './useAdaptive';
|
|
12
11
|
export * from './useDisplayMode';
|
package/src/utils/getAdaptive.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AdaptiveQueriesTitle } from '../constants/adaptive';
|
|
|
2
2
|
import { LayoutType, MatchMediaGeneric } from '../types/adaptive';
|
|
3
3
|
import { getUserAgentInfo } from './getUserAgentInfo';
|
|
4
4
|
|
|
5
|
-
export function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle>) {
|
|
5
|
+
export function getAdaptive({ isMobile, isTablet }: MatchMediaGeneric<AdaptiveQueriesTitle>) {
|
|
6
6
|
const { device } = getUserAgentInfo();
|
|
7
7
|
|
|
8
8
|
let layoutType: LayoutType;
|
|
@@ -12,7 +12,7 @@ export function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle
|
|
|
12
12
|
layoutType = 'mobile';
|
|
13
13
|
break;
|
|
14
14
|
case 'tablet':
|
|
15
|
-
layoutType = 'tablet';
|
|
15
|
+
layoutType = isMobile || isTablet ? 'mobile' : 'tablet';
|
|
16
16
|
break;
|
|
17
17
|
default:
|
|
18
18
|
layoutType = isMobile ? 'desktopSmall' : 'desktop';
|