@jetbrains/ring-ui 5.0.83 → 5.0.84
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/components/global/get-uid.js +6 -1
- package/dist/global/get-uid.js +6 -1
- package/package.json +16 -16
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const idCounters = {};
|
|
2
|
+
function generateSalt() {
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
4
|
+
return (Number(new Date()) * Math.random()).toString(36).substring(0, 4);
|
|
5
|
+
}
|
|
6
|
+
const salt = generateSalt();
|
|
2
7
|
export default function getUID(name) {
|
|
3
8
|
if (!name) {
|
|
4
9
|
throw Error('Argument "name" is required in getUID()');
|
|
@@ -7,5 +12,5 @@ export default function getUID(name) {
|
|
|
7
12
|
idCounters[name] = 0;
|
|
8
13
|
}
|
|
9
14
|
const id = String(idCounters[name]++);
|
|
10
|
-
return name
|
|
15
|
+
return `${name}${id}-${salt}`;
|
|
11
16
|
}
|
package/dist/global/get-uid.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const idCounters = {};
|
|
2
|
+
function generateSalt() {
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
4
|
+
return (Number(new Date()) * Math.random()).toString(36).substring(0, 4);
|
|
5
|
+
}
|
|
6
|
+
const salt = generateSalt();
|
|
2
7
|
function getUID(name) {
|
|
3
8
|
if (!name) {
|
|
4
9
|
throw Error('Argument "name" is required in getUID()');
|
|
@@ -7,7 +12,7 @@ function getUID(name) {
|
|
|
7
12
|
idCounters[name] = 0;
|
|
8
13
|
}
|
|
9
14
|
const id = String(idCounters[name]++);
|
|
10
|
-
return name
|
|
15
|
+
return `${name}${id}-${salt}`;
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
export { getUID as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.84",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
"@rollup/plugin-babel": "^6.0.3",
|
|
82
82
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
83
83
|
"@rollup/plugin-replace": "^5.0.2",
|
|
84
|
-
"@storybook/addon-a11y": "6.5.
|
|
85
|
-
"@storybook/addon-docs": "6.5.
|
|
86
|
-
"@storybook/addon-essentials": "6.5.
|
|
87
|
-
"@storybook/addon-storyshots": "6.5.
|
|
88
|
-
"@storybook/addon-storyshots-puppeteer": "6.5.
|
|
89
|
-
"@storybook/addon-storysource": "6.5.
|
|
84
|
+
"@storybook/addon-a11y": "6.5.15",
|
|
85
|
+
"@storybook/addon-docs": "6.5.15",
|
|
86
|
+
"@storybook/addon-essentials": "6.5.15",
|
|
87
|
+
"@storybook/addon-storyshots": "6.5.15",
|
|
88
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.15",
|
|
89
|
+
"@storybook/addon-storysource": "6.5.15",
|
|
90
90
|
"@storybook/addons": "6.5.14",
|
|
91
|
-
"@storybook/builder-webpack5": "6.5.
|
|
92
|
-
"@storybook/client-api": "6.5.
|
|
93
|
-
"@storybook/core": "6.5.
|
|
94
|
-
"@storybook/html": "6.5.
|
|
91
|
+
"@storybook/builder-webpack5": "6.5.15",
|
|
92
|
+
"@storybook/client-api": "6.5.15",
|
|
93
|
+
"@storybook/core": "6.5.15",
|
|
94
|
+
"@storybook/html": "6.5.15",
|
|
95
95
|
"@storybook/manager-webpack5": "6.5.14",
|
|
96
|
-
"@storybook/react": "6.5.
|
|
96
|
+
"@storybook/react": "6.5.15",
|
|
97
97
|
"@storybook/source-loader": "6.5.14",
|
|
98
98
|
"@storybook/theming": "6.5.14",
|
|
99
99
|
"@testing-library/react": "^13.4.0",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@types/react-dom": "^18.0.9",
|
|
108
108
|
"@types/sinon": "^10.0.13",
|
|
109
109
|
"@types/sinon-chai": "^3.2.9",
|
|
110
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
111
|
-
"@typescript-eslint/parser": "^5.
|
|
110
|
+
"@typescript-eslint/eslint-plugin": "^5.47.0",
|
|
111
|
+
"@typescript-eslint/parser": "^5.47.0",
|
|
112
112
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
113
113
|
"angular": "^1.8.3",
|
|
114
114
|
"angular-mocks": "^1.8.3",
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"classnames": "^2.3.2",
|
|
216
216
|
"combokeys": "^3.0.1",
|
|
217
217
|
"compile-code-loader": "^1.0.0",
|
|
218
|
-
"css-loader": "^6.7.
|
|
218
|
+
"css-loader": "^6.7.3",
|
|
219
219
|
"csstype": "^3.1.1",
|
|
220
220
|
"date-fns": "^2.29.3",
|
|
221
221
|
"deep-equal": "^2.1.0",
|
|
@@ -259,5 +259,5 @@
|
|
|
259
259
|
"node": ">=14.0",
|
|
260
260
|
"npm": ">=6.0.0"
|
|
261
261
|
},
|
|
262
|
-
"gitHead": "
|
|
262
|
+
"gitHead": "f0130a92836a5f891fb37169b9e5b42d46fab135"
|
|
263
263
|
}
|