denwa-react-shared 1.0.15 → 1.0.16

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.
@@ -104,3 +104,20 @@ export declare const translateImagesAlt: ({ data, mainLang, translateText, }: {
104
104
  mainLang: Languages;
105
105
  translateText: TranslateTextType;
106
106
  }) => Promise<IUploadImage[]>;
107
+ /**
108
+ * @description Сравнивает два массива ролей между собой на то, какой пользователь имеет приоритет
109
+ * @param userRoles - Массив с ролями пользователя
110
+ * @param comparedUserRoles - Массив с ролями пользователя, с которым сравниваем
111
+ * @param rolePriority - Объект ключ - значение, с приоритетностью ролей
112
+ */
113
+ export declare const compareRolesPriority: ({ userRoles, comparedUserRoles, rolePriority, }: {
114
+ userRoles: string[];
115
+ comparedUserRoles: string[];
116
+ rolePriority: Record<string, number>;
117
+ }) => {
118
+ maxUserRolePriority: number;
119
+ maxComparedUserRolePriority: number;
120
+ isPriorityHigher: boolean;
121
+ isPriorityEqual: boolean;
122
+ isPriorityLower: boolean;
123
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "denwa-react-shared",
3
3
  "private": false,
4
- "version": "1.0.15",
4
+ "version": "1.0.16",
5
5
  "type": "module",
6
6
  "author": "Denwa",
7
7
  "main": "dist/denwa-react-shared.umd.js",