@northern.tech/store 0.45.1 → 0.46.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/dist/actions.d.cts +5 -5
- package/dist/actions.d.ts +5 -5
- package/dist/api/general-api.cjs +1 -1
- package/dist/api/general-api.js +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/appSlice/selectors.d.cts +3 -3
- package/dist/appSlice/selectors.d.ts +3 -3
- package/dist/appSlice/thunks.d.cts +1 -1
- package/dist/appSlice/thunks.d.ts +1 -1
- package/dist/auth.cjs +2 -1
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +2 -1
- package/dist/auth.js.map +1 -1
- package/dist/commonConstants.cjs +1 -1
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +1 -1
- package/dist/commonSelectors.d.cts +3 -3
- package/dist/commonSelectors.d.ts +3 -3
- package/dist/commonSelectors.js +1 -1
- package/dist/constants-B3NH1IQi.d.cts +23 -0
- package/dist/constants-B3NH1IQi.d.ts +23 -0
- package/dist/{constants-B3Jdkn2b.d.ts → constants-D8-yUk19.d.cts} +2 -1
- package/dist/{constants-B3Jdkn2b.d.cts → constants-D8-yUk19.d.ts} +2 -1
- package/dist/{constants-C_SC_VKE.cjs → constants-MVizYy89.cjs} +5 -2
- package/dist/{constants-C_SC_VKE.cjs.map → constants-MVizYy89.cjs.map} +1 -1
- package/dist/{constants-CerzXHnQ.js → constants-eWaA3HCq.js} +5 -2
- package/dist/{constants-CerzXHnQ.js.map → constants-eWaA3HCq.js.map} +1 -1
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.js +3 -3
- package/dist/deploymentsSlice/constants.cjs +1 -1
- package/dist/deploymentsSlice/constants.js +1 -1
- package/dist/deploymentsSlice/index.cjs +1 -1
- package/dist/deploymentsSlice/index.js +1 -1
- package/dist/deploymentsSlice/selectors.cjs +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +3 -3
- package/dist/deploymentsSlice/selectors.d.ts +3 -3
- package/dist/deploymentsSlice/selectors.js +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +1 -1
- package/dist/deploymentsSlice/thunks.d.ts +1 -1
- package/dist/devicesSlice/constants.cjs +1 -1
- package/dist/devicesSlice/constants.js +1 -1
- package/dist/devicesSlice/index.js +1 -1
- package/dist/devicesSlice/mocks.js +1 -1
- package/dist/devicesSlice/selectors.cjs +1 -1
- package/dist/devicesSlice/selectors.d.cts +3 -3
- package/dist/devicesSlice/selectors.d.ts +3 -3
- package/dist/devicesSlice/selectors.js +1 -1
- package/dist/devicesSlice/thunks.d.cts +1 -1
- package/dist/devicesSlice/thunks.d.ts +1 -1
- package/dist/{index-C8uiyxnb.d.ts → index-CGT1O9T5.d.ts} +13 -7
- package/dist/{index-DjSjrp5b.d.cts → index-Cf6_W5Y7.d.cts} +2 -2
- package/dist/{index-C0yQmQih.d.ts → index-DgiMpzq3.d.ts} +2 -2
- package/dist/{index-DiAjzARZ.d.cts → index-ExguKUh-.d.cts} +13 -7
- package/dist/locationutils.cjs +1 -1
- package/dist/locationutils.js +1 -1
- package/dist/monitorSlice/index.js +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/selectors.d.cts +1 -1
- package/dist/monitorSlice/selectors.d.ts +1 -1
- package/dist/monitorSlice/thunks.cjs +1 -1
- package/dist/monitorSlice/thunks.d.cts +1 -1
- package/dist/monitorSlice/thunks.d.ts +1 -1
- package/dist/monitorSlice/thunks.js +1 -1
- package/dist/onboardingSlice/selectors.d.cts +1 -1
- package/dist/onboardingSlice/selectors.d.ts +1 -1
- package/dist/onboardingSlice/thunks.d.cts +2 -2
- package/dist/onboardingSlice/thunks.d.ts +2 -2
- package/dist/organizationSlice/constants.cjs +1 -1
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.cjs +1 -1
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.cjs +1 -1
- package/dist/organizationSlice/selectors.d.cts +3 -3
- package/dist/organizationSlice/selectors.d.ts +3 -3
- package/dist/organizationSlice/selectors.js +1 -1
- package/dist/organizationSlice/thunks.d.cts +13 -13
- package/dist/organizationSlice/thunks.d.ts +13 -13
- package/dist/releasesSlice/constants.cjs +14 -7
- package/dist/releasesSlice/constants.cjs.map +1 -1
- package/dist/releasesSlice/constants.d.cts +2 -2
- package/dist/releasesSlice/constants.d.ts +2 -2
- package/dist/releasesSlice/constants.js +14 -7
- package/dist/releasesSlice/constants.js.map +1 -1
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +2 -2
- package/dist/releasesSlice/index.d.ts +2 -2
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +27 -27
- package/dist/releasesSlice/selectors.d.ts +27 -27
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +32 -14
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +14 -21
- package/dist/releasesSlice/thunks.d.ts +14 -21
- package/dist/releasesSlice/thunks.js +32 -14
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/sockethook.cjs +1 -1
- package/dist/sockethook.js +1 -1
- package/dist/{store-ByJVpIz9.d.cts → store-C-W8nPdd.d.cts} +3 -3
- package/dist/{store-BKVs6gSc.d.ts → store-CmvNnqoc.d.ts} +3 -3
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/store.js +1 -1
- package/dist/storehooks.cjs +1 -1
- package/dist/storehooks.d.cts +2 -2
- package/dist/storehooks.d.ts +2 -2
- package/dist/storehooks.js +1 -1
- package/dist/thunks.cjs +6 -4
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +6 -4
- package/dist/thunks.js.map +1 -1
- package/dist/usersSlice/constants.cjs +1 -1
- package/dist/usersSlice/constants.d.cts +1 -1
- package/dist/usersSlice/constants.d.ts +1 -1
- package/dist/usersSlice/constants.js +1 -1
- package/dist/usersSlice/index.cjs +1 -1
- package/dist/usersSlice/index.d.cts +1 -1
- package/dist/usersSlice/index.d.ts +1 -1
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.d.cts +2 -2
- package/dist/usersSlice/mocks.d.ts +2 -2
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.cjs +1 -1
- package/dist/usersSlice/selectors.d.cts +4 -4
- package/dist/usersSlice/selectors.d.ts +4 -4
- package/dist/usersSlice/selectors.js +1 -1
- package/dist/usersSlice/thunks.d.cts +39 -39
- package/dist/usersSlice/thunks.d.ts +3 -3
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/constants-CEwun8TL.d.cts +0 -18
- package/dist/constants-CEwun8TL.d.ts +0 -18
package/dist/actions.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ht as DeviceAuthState, ut as AlertChannelKey } from "./constants-Rl3FJzFf.cjs";
|
|
2
|
-
import { i as ReadState } from "./constants-
|
|
3
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User, t as CustomColumn } from "./index-
|
|
4
|
-
import {
|
|
2
|
+
import { i as ReadState } from "./constants-D8-yUk19.cjs";
|
|
3
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User, t as CustomColumn } from "./index-Cf6_W5Y7.cjs";
|
|
4
|
+
import { c as SoftwareList, i as Release, n as Manifest, r as ManifestsList } from "./index-ExguKUh-.cjs";
|
|
5
5
|
import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card } from "./types-B80ckxiy.cjs";
|
|
6
6
|
import { n as OnboardingSliceType, t as OnboardingApproach } from "./index-CoObjWL4.cjs";
|
|
7
7
|
import { i as DeploymentConfig, l as SelectionState, r as DeploymentByStatusKey, t as Deployment } from "./index-mvxjivTJ.cjs";
|
|
@@ -48,8 +48,8 @@ declare const _default: {
|
|
|
48
48
|
setDeltaJobsListState: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "releases/setDeltaJobsListState">;
|
|
49
49
|
setSelectedJob: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "releases/setSelectedJob">;
|
|
50
50
|
setActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"releases" | "delta" | "manifests", "releases/setActiveTab">;
|
|
51
|
-
receiveManifest: import("@reduxjs/toolkit").ActionCreatorWithPayload<
|
|
52
|
-
receiveManifests: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string,
|
|
51
|
+
receiveManifest: import("@reduxjs/toolkit").ActionCreatorWithPayload<Manifest, "releases/receiveManifest">;
|
|
52
|
+
receiveManifests: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, Manifest>, "releases/receiveManifests">;
|
|
53
53
|
receiveManifestTags: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("@northern.tech/types/types.gen").Tags, "releases/receiveManifestTags">;
|
|
54
54
|
removeManifest: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "releases/removeManifest">;
|
|
55
55
|
removeManifests: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "releases/removeManifests">;
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ht as DeviceAuthState, ut as AlertChannelKey } from "./constants-B_H4squx.js";
|
|
2
|
-
import { i as ReadState } from "./constants-
|
|
3
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User, t as CustomColumn } from "./index-
|
|
4
|
-
import {
|
|
2
|
+
import { i as ReadState } from "./constants-D8-yUk19.js";
|
|
3
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User, t as CustomColumn } from "./index-DgiMpzq3.js";
|
|
4
|
+
import { c as SoftwareList, i as Release, n as Manifest, r as ManifestsList } from "./index-CGT1O9T5.js";
|
|
5
5
|
import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card } from "./types-B3qGQoMx.js";
|
|
6
6
|
import { n as OnboardingSliceType, t as OnboardingApproach } from "./index-CoObjWL4.js";
|
|
7
7
|
import { i as DeploymentConfig, l as SelectionState, r as DeploymentByStatusKey, t as Deployment } from "./index-B8td4-rY.js";
|
|
@@ -48,8 +48,8 @@ declare const _default: {
|
|
|
48
48
|
setDeltaJobsListState: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "releases/setDeltaJobsListState">;
|
|
49
49
|
setSelectedJob: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "releases/setSelectedJob">;
|
|
50
50
|
setActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"releases" | "delta" | "manifests", "releases/setActiveTab">;
|
|
51
|
-
receiveManifest: import("@reduxjs/toolkit").ActionCreatorWithPayload<
|
|
52
|
-
receiveManifests: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string,
|
|
51
|
+
receiveManifest: import("@reduxjs/toolkit").ActionCreatorWithPayload<Manifest, "releases/receiveManifest">;
|
|
52
|
+
receiveManifests: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, Manifest>, "releases/receiveManifests">;
|
|
53
53
|
receiveManifestTags: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("@northern.tech/types/types.gen").Tags, "releases/receiveManifestTags">;
|
|
54
54
|
removeManifest: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "releases/removeManifest">;
|
|
55
55
|
removeManifests: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "releases/removeManifests">;
|
package/dist/api/general-api.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_rolldown_runtime = require("../rolldown-runtime-VH7oDXx4.cjs");
|
|
6
|
-
const require_constants = require("../constants-
|
|
6
|
+
const require_constants = require("../constants-MVizYy89.cjs");
|
|
7
7
|
const require_auth = require("../auth.cjs");
|
|
8
8
|
let universal_cookie = require("universal-cookie");
|
|
9
9
|
universal_cookie = require_rolldown_runtime.__toESM(universal_cookie, 1);
|
package/dist/api/general-api.js
CHANGED
package/dist/appSlice/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { o as UserSliceType } from "../index-
|
|
2
|
-
import {
|
|
1
|
+
import { o as UserSliceType } from "../index-Cf6_W5Y7.cjs";
|
|
2
|
+
import { a as ReleaseSliceType } from "../index-ExguKUh-.cjs";
|
|
3
3
|
import { n as OnboardingSliceType } from "../index-CoObjWL4.cjs";
|
|
4
4
|
import { o as DeploymentsSliceType } from "../index-mvxjivTJ.cjs";
|
|
5
5
|
import { c as DeviceSliceType } from "../index-DnKVKM0G.cjs";
|
|
6
6
|
import { a as Upload, i as SnackbarContent, n as SearchState, r as SentryConfig, t as AppSliceType } from "../index-DeOpb2oK.cjs";
|
|
7
7
|
import { t as MonitorSliceType } from "../index-Ctj2r57a.cjs";
|
|
8
8
|
import { t as OrganizationSliceType } from "../index-C_LGDJN2.cjs";
|
|
9
|
-
import { r as RootState } from "../store-
|
|
9
|
+
import { r as RootState } from "../store-C-W8nPdd.cjs";
|
|
10
10
|
//#region src/appSlice/selectors.d.ts
|
|
11
11
|
declare const getDocsVersion: (state: RootState) => string;
|
|
12
12
|
declare const getFeatures: (state: RootState) => Record<string, boolean>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { o as UserSliceType } from "../index-
|
|
2
|
-
import {
|
|
1
|
+
import { o as UserSliceType } from "../index-DgiMpzq3.js";
|
|
2
|
+
import { a as ReleaseSliceType } from "../index-CGT1O9T5.js";
|
|
3
3
|
import { n as OnboardingSliceType } from "../index-CoObjWL4.js";
|
|
4
4
|
import { o as DeploymentsSliceType } from "../index-B8td4-rY.js";
|
|
5
5
|
import { c as DeviceSliceType } from "../index-BpamudGf.js";
|
|
6
6
|
import { a as Upload, i as SnackbarContent, n as SearchState, r as SentryConfig, t as AppSliceType } from "../index-Bs0c1-WY.js";
|
|
7
7
|
import { t as MonitorSliceType } from "../index-BAGyeC-q.js";
|
|
8
8
|
import { t as OrganizationSliceType } from "../index-ChKTa1aL.js";
|
|
9
|
-
import { r as RootState } from "../store-
|
|
9
|
+
import { r as RootState } from "../store-CmvNnqoc.js";
|
|
10
10
|
//#region src/appSlice/selectors.d.ts
|
|
11
11
|
declare const getDocsVersion: (state: RootState) => string;
|
|
12
12
|
declare const getFeatures: (state: RootState) => Record<string, boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as SearchState } from "../index-DeOpb2oK.cjs";
|
|
2
|
-
import { r as RootState, t as AppDispatch } from "../store-
|
|
2
|
+
import { r as RootState, t as AppDispatch } from "../store-C-W8nPdd.cjs";
|
|
3
3
|
//#region src/appSlice/thunks.d.ts
|
|
4
4
|
declare const setFirstLoginAfterSignup: import("@reduxjs/toolkit").AsyncThunk<void, boolean, {
|
|
5
5
|
dispatch: AppDispatch;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as SearchState } from "../index-Bs0c1-WY.js";
|
|
2
|
-
import { r as RootState, t as AppDispatch } from "../store-
|
|
2
|
+
import { r as RootState, t as AppDispatch } from "../store-CmvNnqoc.js";
|
|
3
3
|
//#region src/appSlice/thunks.d.ts
|
|
4
4
|
declare const setFirstLoginAfterSignup: import("@reduxjs/toolkit").AsyncThunk<void, boolean, {
|
|
5
5
|
dispatch: AppDispatch;
|
package/dist/auth.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
3
|
-
const require_constants = require("./constants-
|
|
3
|
+
const require_constants = require("./constants-MVizYy89.cjs");
|
|
4
4
|
let universal_cookie = require("universal-cookie");
|
|
5
5
|
universal_cookie = require_rolldown_runtime.__toESM(universal_cookie, 1);
|
|
6
6
|
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
@@ -48,6 +48,7 @@ const cleanUp = () => {
|
|
|
48
48
|
cookies.remove("JWT", { path: "/" });
|
|
49
49
|
window.localStorage.removeItem("JWT");
|
|
50
50
|
window.localStorage.removeItem("oauth");
|
|
51
|
+
window.localStorage.removeItem(require_constants.settingsKeys.colorScheme);
|
|
51
52
|
};
|
|
52
53
|
const updateMaxAge = ({ expiresAt, token }) => {
|
|
53
54
|
const oAuthExpiration = Number(window.localStorage.getItem("oauth"));
|
package/dist/auth.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.cjs","names":["Cookies","maxSessionAge","TIMEOUTS"],"sources":["../src/auth.ts"],"sourcesContent":["// Copyright 2016 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport Cookies from 'universal-cookie';\n\nimport { TIMEOUTS, maxSessionAge } from './constants';\nimport type { UserSession } from './usersSlice';\n\nconst cookies = new Cookies();\n\nconst emptySession = Object.freeze({ token: '', expiresAt: undefined }) as Readonly<UserSession>;\n\nlet tokenCache = '';\n\nexport const getSessionInfo = (): UserSession => {\n let sessionInfo = { ...emptySession } as UserSession;\n try {\n sessionInfo = JSON.parse(window.localStorage.getItem('JWT') ?? '');\n } catch {\n // most likely not logged in - nothing to do here\n }\n\n // check for cookie first to handles sso login while an old/expired token may still exist in cache/ localStorage\n const jwtTokenFromCookie = cookies.get('JWT', { doNotParse: true }) ?? '';\n if (jwtTokenFromCookie) {\n setSessionInfo({ token: jwtTokenFromCookie });\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n return { token: jwtTokenFromCookie, expiresAt: undefined };\n }\n if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < new Date()) {\n cleanUp();\n return { ...emptySession };\n }\n sessionInfo.token = sessionInfo.token || '';\n tokenCache = sessionInfo.token;\n return sessionInfo;\n};\n\nexport const getToken = () => (tokenCache ? tokenCache : getSessionInfo().token);\n\nexport const setSessionInfo = ({ token, expiresAt }: UserSession) => {\n tokenCache = token;\n window.localStorage.setItem('JWT', JSON.stringify({ token, expiresAt }));\n};\n\nexport const cleanUp = () => {\n tokenCache = '';\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n window.localStorage.removeItem('JWT');\n window.localStorage.removeItem('oauth');\n};\n\nexport const updateMaxAge = ({ expiresAt, token }) => {\n const oAuthExpiration = Number(window.localStorage.getItem('oauth'));\n let updateWithOAuth = false;\n if (oAuthExpiration) {\n const soon = Date.now() + maxSessionAge * TIMEOUTS.oneSecond;\n updateWithOAuth = oAuthExpiration <= soon;\n if (updateWithOAuth) {\n window.localStorage.removeItem('oauth');\n }\n }\n if (token && expiresAt && (!oAuthExpiration || updateWithOAuth)) {\n const expiration = new Date();\n expiration.setSeconds(expiration.getSeconds() + maxSessionAge);\n setSessionInfo({ token, expiresAt: expiration.toISOString() });\n }\n};\n"],"mappings":";;;;;;;AAkBA,MAAM,UAAU,IAAIA,iBAAAA,QAAQ;AAE5B,MAAM,eAAe,OAAO,OAAO;CAAE,OAAO;CAAI,WAAW,KAAA;AAAU,CAAC;AAEtE,IAAI,aAAa;AAEjB,MAAa,uBAAoC;CAC/C,IAAI,cAAc,EAAE,GAAG,aAAa;CACpC,IAAI;EACF,cAAc,KAAK,MAAM,OAAO,aAAa,QAAQ,KAAK,KAAK,EAAE;CACnE,QAAQ,CAER;CAGA,MAAM,qBAAqB,QAAQ,IAAI,OAAO,EAAE,YAAY,KAAK,CAAC,KAAK;CACvE,IAAI,oBAAoB;EACtB,eAAe,EAAE,OAAO,mBAAmB,CAAC;EAC5C,QAAQ,OAAO,KAAK;EACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;EACnC,OAAO;GAAE,OAAO;GAAoB,WAAW,KAAA;EAAU;CAC3D;CACA,IAAI,YAAY,aAAa,IAAI,KAAK,YAAY,SAAS,oBAAI,IAAI,KAAK,GAAG;EACzE,QAAQ;EACR,OAAO,EAAE,GAAG,aAAa;CAC3B;CACA,YAAY,QAAQ,YAAY,SAAS;CACzC,aAAa,YAAY;CACzB,OAAO;AACT;AAEA,MAAa,iBAAkB,aAAa,aAAa,eAAe,CAAC,CAAC;AAE1E,MAAa,kBAAkB,EAAE,OAAO,gBAA6B;CACnE,aAAa;CACb,OAAO,aAAa,QAAQ,OAAO,KAAK,UAAU;EAAE;EAAO;CAAU,CAAC,CAAC;AACzE;AAEA,MAAa,gBAAgB;CAC3B,aAAa;CACb,QAAQ,OAAO,KAAK;CACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;CACnC,OAAO,aAAa,WAAW,KAAK;CACpC,OAAO,aAAa,WAAW,OAAO;
|
|
1
|
+
{"version":3,"file":"auth.cjs","names":["Cookies","settingsKeys","maxSessionAge","TIMEOUTS"],"sources":["../src/auth.ts"],"sourcesContent":["// Copyright 2016 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport Cookies from 'universal-cookie';\n\nimport { TIMEOUTS, maxSessionAge, settingsKeys } from './constants';\nimport type { UserSession } from './usersSlice';\n\nconst cookies = new Cookies();\n\nconst emptySession = Object.freeze({ token: '', expiresAt: undefined }) as Readonly<UserSession>;\n\nlet tokenCache = '';\n\nexport const getSessionInfo = (): UserSession => {\n let sessionInfo = { ...emptySession } as UserSession;\n try {\n sessionInfo = JSON.parse(window.localStorage.getItem('JWT') ?? '');\n } catch {\n // most likely not logged in - nothing to do here\n }\n\n // check for cookie first to handles sso login while an old/expired token may still exist in cache/ localStorage\n const jwtTokenFromCookie = cookies.get('JWT', { doNotParse: true }) ?? '';\n if (jwtTokenFromCookie) {\n setSessionInfo({ token: jwtTokenFromCookie });\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n return { token: jwtTokenFromCookie, expiresAt: undefined };\n }\n if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < new Date()) {\n cleanUp();\n return { ...emptySession };\n }\n sessionInfo.token = sessionInfo.token || '';\n tokenCache = sessionInfo.token;\n return sessionInfo;\n};\n\nexport const getToken = () => (tokenCache ? tokenCache : getSessionInfo().token);\n\nexport const setSessionInfo = ({ token, expiresAt }: UserSession) => {\n tokenCache = token;\n window.localStorage.setItem('JWT', JSON.stringify({ token, expiresAt }));\n};\n\nexport const cleanUp = () => {\n tokenCache = '';\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n window.localStorage.removeItem('JWT');\n window.localStorage.removeItem('oauth');\n window.localStorage.removeItem(settingsKeys.colorScheme);\n};\n\nexport const updateMaxAge = ({ expiresAt, token }) => {\n const oAuthExpiration = Number(window.localStorage.getItem('oauth'));\n let updateWithOAuth = false;\n if (oAuthExpiration) {\n const soon = Date.now() + maxSessionAge * TIMEOUTS.oneSecond;\n updateWithOAuth = oAuthExpiration <= soon;\n if (updateWithOAuth) {\n window.localStorage.removeItem('oauth');\n }\n }\n if (token && expiresAt && (!oAuthExpiration || updateWithOAuth)) {\n const expiration = new Date();\n expiration.setSeconds(expiration.getSeconds() + maxSessionAge);\n setSessionInfo({ token, expiresAt: expiration.toISOString() });\n }\n};\n"],"mappings":";;;;;;;AAkBA,MAAM,UAAU,IAAIA,iBAAAA,QAAQ;AAE5B,MAAM,eAAe,OAAO,OAAO;CAAE,OAAO;CAAI,WAAW,KAAA;AAAU,CAAC;AAEtE,IAAI,aAAa;AAEjB,MAAa,uBAAoC;CAC/C,IAAI,cAAc,EAAE,GAAG,aAAa;CACpC,IAAI;EACF,cAAc,KAAK,MAAM,OAAO,aAAa,QAAQ,KAAK,KAAK,EAAE;CACnE,QAAQ,CAER;CAGA,MAAM,qBAAqB,QAAQ,IAAI,OAAO,EAAE,YAAY,KAAK,CAAC,KAAK;CACvE,IAAI,oBAAoB;EACtB,eAAe,EAAE,OAAO,mBAAmB,CAAC;EAC5C,QAAQ,OAAO,KAAK;EACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;EACnC,OAAO;GAAE,OAAO;GAAoB,WAAW,KAAA;EAAU;CAC3D;CACA,IAAI,YAAY,aAAa,IAAI,KAAK,YAAY,SAAS,oBAAI,IAAI,KAAK,GAAG;EACzE,QAAQ;EACR,OAAO,EAAE,GAAG,aAAa;CAC3B;CACA,YAAY,QAAQ,YAAY,SAAS;CACzC,aAAa,YAAY;CACzB,OAAO;AACT;AAEA,MAAa,iBAAkB,aAAa,aAAa,eAAe,CAAC,CAAC;AAE1E,MAAa,kBAAkB,EAAE,OAAO,gBAA6B;CACnE,aAAa;CACb,OAAO,aAAa,QAAQ,OAAO,KAAK,UAAU;EAAE;EAAO;CAAU,CAAC,CAAC;AACzE;AAEA,MAAa,gBAAgB;CAC3B,aAAa;CACb,QAAQ,OAAO,KAAK;CACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;CACnC,OAAO,aAAa,WAAW,KAAK;CACpC,OAAO,aAAa,WAAW,OAAO;CACtC,OAAO,aAAa,WAAWC,kBAAAA,aAAa,WAAW;AACzD;AAEA,MAAa,gBAAgB,EAAE,WAAW,YAAY;CACpD,MAAM,kBAAkB,OAAO,OAAO,aAAa,QAAQ,OAAO,CAAC;CACnE,IAAI,kBAAkB;CACtB,IAAI,iBAAiB;EAEnB,kBAAkB,mBADL,KAAK,IAAI,IAAIC,+BAAAA,gBAAgBC,kBAAAA,SAAS;EAEnD,IAAI,iBACF,OAAO,aAAa,WAAW,OAAO;CAE1C;CACA,IAAI,SAAS,cAAc,CAAC,mBAAmB,kBAAkB;EAC/D,MAAM,6BAAa,IAAI,KAAK;EAC5B,WAAW,WAAW,WAAW,WAAW,IAAID,+BAAAA,aAAa;EAC7D,eAAe;GAAE;GAAO,WAAW,WAAW,YAAY;EAAE,CAAC;CAC/D;AACF"}
|
package/dist/auth.d.cts
CHANGED
package/dist/auth.d.ts
CHANGED
package/dist/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as maxSessionAge, Pt as TIMEOUTS } from "./constants-
|
|
1
|
+
import { M as maxSessionAge, Pt as TIMEOUTS, Q as settingsKeys } from "./constants-eWaA3HCq.js";
|
|
2
2
|
import Cookies from "universal-cookie";
|
|
3
3
|
//#region src/auth.ts
|
|
4
4
|
const cookies = new Cookies();
|
|
@@ -44,6 +44,7 @@ const cleanUp = () => {
|
|
|
44
44
|
cookies.remove("JWT", { path: "/" });
|
|
45
45
|
window.localStorage.removeItem("JWT");
|
|
46
46
|
window.localStorage.removeItem("oauth");
|
|
47
|
+
window.localStorage.removeItem(settingsKeys.colorScheme);
|
|
47
48
|
};
|
|
48
49
|
const updateMaxAge = ({ expiresAt, token }) => {
|
|
49
50
|
const oAuthExpiration = Number(window.localStorage.getItem("oauth"));
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","names":[],"sources":["../src/auth.ts"],"sourcesContent":["// Copyright 2016 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport Cookies from 'universal-cookie';\n\nimport { TIMEOUTS, maxSessionAge } from './constants';\nimport type { UserSession } from './usersSlice';\n\nconst cookies = new Cookies();\n\nconst emptySession = Object.freeze({ token: '', expiresAt: undefined }) as Readonly<UserSession>;\n\nlet tokenCache = '';\n\nexport const getSessionInfo = (): UserSession => {\n let sessionInfo = { ...emptySession } as UserSession;\n try {\n sessionInfo = JSON.parse(window.localStorage.getItem('JWT') ?? '');\n } catch {\n // most likely not logged in - nothing to do here\n }\n\n // check for cookie first to handles sso login while an old/expired token may still exist in cache/ localStorage\n const jwtTokenFromCookie = cookies.get('JWT', { doNotParse: true }) ?? '';\n if (jwtTokenFromCookie) {\n setSessionInfo({ token: jwtTokenFromCookie });\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n return { token: jwtTokenFromCookie, expiresAt: undefined };\n }\n if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < new Date()) {\n cleanUp();\n return { ...emptySession };\n }\n sessionInfo.token = sessionInfo.token || '';\n tokenCache = sessionInfo.token;\n return sessionInfo;\n};\n\nexport const getToken = () => (tokenCache ? tokenCache : getSessionInfo().token);\n\nexport const setSessionInfo = ({ token, expiresAt }: UserSession) => {\n tokenCache = token;\n window.localStorage.setItem('JWT', JSON.stringify({ token, expiresAt }));\n};\n\nexport const cleanUp = () => {\n tokenCache = '';\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n window.localStorage.removeItem('JWT');\n window.localStorage.removeItem('oauth');\n};\n\nexport const updateMaxAge = ({ expiresAt, token }) => {\n const oAuthExpiration = Number(window.localStorage.getItem('oauth'));\n let updateWithOAuth = false;\n if (oAuthExpiration) {\n const soon = Date.now() + maxSessionAge * TIMEOUTS.oneSecond;\n updateWithOAuth = oAuthExpiration <= soon;\n if (updateWithOAuth) {\n window.localStorage.removeItem('oauth');\n }\n }\n if (token && expiresAt && (!oAuthExpiration || updateWithOAuth)) {\n const expiration = new Date();\n expiration.setSeconds(expiration.getSeconds() + maxSessionAge);\n setSessionInfo({ token, expiresAt: expiration.toISOString() });\n }\n};\n"],"mappings":";;;AAkBA,MAAM,UAAU,IAAI,QAAQ;AAE5B,MAAM,eAAe,OAAO,OAAO;CAAE,OAAO;CAAI,WAAW,KAAA;AAAU,CAAC;AAEtE,IAAI,aAAa;AAEjB,MAAa,uBAAoC;CAC/C,IAAI,cAAc,EAAE,GAAG,aAAa;CACpC,IAAI;EACF,cAAc,KAAK,MAAM,OAAO,aAAa,QAAQ,KAAK,KAAK,EAAE;CACnE,QAAQ,CAER;CAGA,MAAM,qBAAqB,QAAQ,IAAI,OAAO,EAAE,YAAY,KAAK,CAAC,KAAK;CACvE,IAAI,oBAAoB;EACtB,eAAe,EAAE,OAAO,mBAAmB,CAAC;EAC5C,QAAQ,OAAO,KAAK;EACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;EACnC,OAAO;GAAE,OAAO;GAAoB,WAAW,KAAA;EAAU;CAC3D;CACA,IAAI,YAAY,aAAa,IAAI,KAAK,YAAY,SAAS,oBAAI,IAAI,KAAK,GAAG;EACzE,QAAQ;EACR,OAAO,EAAE,GAAG,aAAa;CAC3B;CACA,YAAY,QAAQ,YAAY,SAAS;CACzC,aAAa,YAAY;CACzB,OAAO;AACT;AAEA,MAAa,iBAAkB,aAAa,aAAa,eAAe,CAAC,CAAC;AAE1E,MAAa,kBAAkB,EAAE,OAAO,gBAA6B;CACnE,aAAa;CACb,OAAO,aAAa,QAAQ,OAAO,KAAK,UAAU;EAAE;EAAO;CAAU,CAAC,CAAC;AACzE;AAEA,MAAa,gBAAgB;CAC3B,aAAa;CACb,QAAQ,OAAO,KAAK;CACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;CACnC,OAAO,aAAa,WAAW,KAAK;CACpC,OAAO,aAAa,WAAW,OAAO;
|
|
1
|
+
{"version":3,"file":"auth.js","names":[],"sources":["../src/auth.ts"],"sourcesContent":["// Copyright 2016 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport Cookies from 'universal-cookie';\n\nimport { TIMEOUTS, maxSessionAge, settingsKeys } from './constants';\nimport type { UserSession } from './usersSlice';\n\nconst cookies = new Cookies();\n\nconst emptySession = Object.freeze({ token: '', expiresAt: undefined }) as Readonly<UserSession>;\n\nlet tokenCache = '';\n\nexport const getSessionInfo = (): UserSession => {\n let sessionInfo = { ...emptySession } as UserSession;\n try {\n sessionInfo = JSON.parse(window.localStorage.getItem('JWT') ?? '');\n } catch {\n // most likely not logged in - nothing to do here\n }\n\n // check for cookie first to handles sso login while an old/expired token may still exist in cache/ localStorage\n const jwtTokenFromCookie = cookies.get('JWT', { doNotParse: true }) ?? '';\n if (jwtTokenFromCookie) {\n setSessionInfo({ token: jwtTokenFromCookie });\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n return { token: jwtTokenFromCookie, expiresAt: undefined };\n }\n if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < new Date()) {\n cleanUp();\n return { ...emptySession };\n }\n sessionInfo.token = sessionInfo.token || '';\n tokenCache = sessionInfo.token;\n return sessionInfo;\n};\n\nexport const getToken = () => (tokenCache ? tokenCache : getSessionInfo().token);\n\nexport const setSessionInfo = ({ token, expiresAt }: UserSession) => {\n tokenCache = token;\n window.localStorage.setItem('JWT', JSON.stringify({ token, expiresAt }));\n};\n\nexport const cleanUp = () => {\n tokenCache = '';\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n window.localStorage.removeItem('JWT');\n window.localStorage.removeItem('oauth');\n window.localStorage.removeItem(settingsKeys.colorScheme);\n};\n\nexport const updateMaxAge = ({ expiresAt, token }) => {\n const oAuthExpiration = Number(window.localStorage.getItem('oauth'));\n let updateWithOAuth = false;\n if (oAuthExpiration) {\n const soon = Date.now() + maxSessionAge * TIMEOUTS.oneSecond;\n updateWithOAuth = oAuthExpiration <= soon;\n if (updateWithOAuth) {\n window.localStorage.removeItem('oauth');\n }\n }\n if (token && expiresAt && (!oAuthExpiration || updateWithOAuth)) {\n const expiration = new Date();\n expiration.setSeconds(expiration.getSeconds() + maxSessionAge);\n setSessionInfo({ token, expiresAt: expiration.toISOString() });\n }\n};\n"],"mappings":";;;AAkBA,MAAM,UAAU,IAAI,QAAQ;AAE5B,MAAM,eAAe,OAAO,OAAO;CAAE,OAAO;CAAI,WAAW,KAAA;AAAU,CAAC;AAEtE,IAAI,aAAa;AAEjB,MAAa,uBAAoC;CAC/C,IAAI,cAAc,EAAE,GAAG,aAAa;CACpC,IAAI;EACF,cAAc,KAAK,MAAM,OAAO,aAAa,QAAQ,KAAK,KAAK,EAAE;CACnE,QAAQ,CAER;CAGA,MAAM,qBAAqB,QAAQ,IAAI,OAAO,EAAE,YAAY,KAAK,CAAC,KAAK;CACvE,IAAI,oBAAoB;EACtB,eAAe,EAAE,OAAO,mBAAmB,CAAC;EAC5C,QAAQ,OAAO,KAAK;EACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;EACnC,OAAO;GAAE,OAAO;GAAoB,WAAW,KAAA;EAAU;CAC3D;CACA,IAAI,YAAY,aAAa,IAAI,KAAK,YAAY,SAAS,oBAAI,IAAI,KAAK,GAAG;EACzE,QAAQ;EACR,OAAO,EAAE,GAAG,aAAa;CAC3B;CACA,YAAY,QAAQ,YAAY,SAAS;CACzC,aAAa,YAAY;CACzB,OAAO;AACT;AAEA,MAAa,iBAAkB,aAAa,aAAa,eAAe,CAAC,CAAC;AAE1E,MAAa,kBAAkB,EAAE,OAAO,gBAA6B;CACnE,aAAa;CACb,OAAO,aAAa,QAAQ,OAAO,KAAK,UAAU;EAAE;EAAO;CAAU,CAAC,CAAC;AACzE;AAEA,MAAa,gBAAgB;CAC3B,aAAa;CACb,QAAQ,OAAO,KAAK;CACpB,QAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;CACnC,OAAO,aAAa,WAAW,KAAK;CACpC,OAAO,aAAa,WAAW,OAAO;CACtC,OAAO,aAAa,WAAW,aAAa,WAAW;AACzD;AAEA,MAAa,gBAAgB,EAAE,WAAW,YAAY;CACpD,MAAM,kBAAkB,OAAO,OAAO,aAAa,QAAQ,OAAO,CAAC;CACnE,IAAI,kBAAkB;CACtB,IAAI,iBAAiB;EAEnB,kBAAkB,mBADL,KAAK,IAAI,IAAI,gBAAgB,SAAS;EAEnD,IAAI,iBACF,OAAO,aAAa,WAAW,OAAO;CAE1C;CACA,IAAI,SAAS,cAAc,CAAC,mBAAmB,kBAAkB;EAC/D,MAAM,6BAAa,IAAI,KAAK;EAC5B,WAAW,WAAW,WAAW,WAAW,IAAI,aAAa;EAC7D,eAAe;GAAE;GAAO,WAAW,WAAW,YAAY;EAAE,CAAC;CAC/D;AACF"}
|
package/dist/commonConstants.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_constants = require("./constants-
|
|
2
|
+
const require_constants = require("./constants-MVizYy89.cjs");
|
|
3
3
|
exports.ATTRIBUTE_SCOPE_LABELS = require_constants.ATTRIBUTE_SCOPE_LABELS;
|
|
4
4
|
exports.DEVICE_LIST_MAXIMUM_LENGTH = require_constants.DEVICE_LIST_MAXIMUM_LENGTH;
|
|
5
5
|
exports.DEVICE_ONLINE_CUTOFF = require_constants.DEVICE_ONLINE_CUTOFF;
|
package/dist/commonConstants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { At as DEVICE_ONLINE_CUTOFF, Bt as productOrder, Ft as UNGROUPED_GROUP, It as countries, Lt as credentialTypes, Mt as MAX_PAGE_SIZE, Nt as ORCHESTRATOR_MANIFEST_ATTRIBUTE_PREFIX, Ot as ATTRIBUTE_SCOPE_LABELS, Pt as TIMEOUTS, Rt as defaultIdAttribute, Vt as timeUnits, jt as EXTERNAL_PROVIDER, kt as DEVICE_LIST_MAXIMUM_LENGTH, zt as emptyWebhook } from "./constants-
|
|
1
|
+
import { At as DEVICE_ONLINE_CUTOFF, Bt as productOrder, Ft as UNGROUPED_GROUP, It as countries, Lt as credentialTypes, Mt as MAX_PAGE_SIZE, Nt as ORCHESTRATOR_MANIFEST_ATTRIBUTE_PREFIX, Ot as ATTRIBUTE_SCOPE_LABELS, Pt as TIMEOUTS, Rt as defaultIdAttribute, Vt as timeUnits, jt as EXTERNAL_PROVIDER, kt as DEVICE_LIST_MAXIMUM_LENGTH, zt as emptyWebhook } from "./constants-eWaA3HCq.js";
|
|
2
2
|
export { ATTRIBUTE_SCOPE_LABELS, DEVICE_LIST_MAXIMUM_LENGTH, DEVICE_ONLINE_CUTOFF, EXTERNAL_PROVIDER, MAX_PAGE_SIZE, ORCHESTRATOR_MANIFEST_ATTRIBUTE_PREFIX, TIMEOUTS, UNGROUPED_GROUP, countries, credentialTypes, defaultIdAttribute, emptyWebhook, productOrder, timeUnits };
|
package/dist/commonSelectors.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
3
3
|
const require_appSlice_constants = require("./appSlice/constants.cjs");
|
|
4
|
-
const require_constants = require("./constants-
|
|
4
|
+
const require_constants = require("./constants-MVizYy89.cjs");
|
|
5
5
|
const require_onboardingSlice_constants = require("./onboardingSlice/constants.cjs");
|
|
6
6
|
const require_appSlice_selectors = require("./appSlice/selectors.cjs");
|
|
7
7
|
const require_deploymentsSlice_selectors = require("./deploymentsSlice/selectors.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AvailablePlans } from "./constants-nKSWZ8oD.cjs";
|
|
2
2
|
import { S as Role } from "./constants-Rl3FJzFf.cjs";
|
|
3
|
-
import { a as UserSettings, n as GlobalSettings, o as UserSliceType, r as User } from "./index-
|
|
4
|
-
import {
|
|
3
|
+
import { a as UserSettings, n as GlobalSettings, o as UserSliceType, r as User } from "./index-Cf6_W5Y7.cjs";
|
|
4
|
+
import { a as ReleaseSliceType, i as Release } from "./index-ExguKUh-.cjs";
|
|
5
5
|
import { i as Organization, n as AuditLogSelectionState } from "./types-B80ckxiy.cjs";
|
|
6
6
|
import { n as OnboardingSliceType, t as OnboardingApproach } from "./index-CoObjWL4.cjs";
|
|
7
7
|
import { l as SelectionState, o as DeploymentsSliceType, s as DeviceDeployment, t as Deployment } from "./index-mvxjivTJ.cjs";
|
|
@@ -9,7 +9,7 @@ import { c as DeviceSliceType, i as DeviceGroup, n as DeviceComponents, t as Dev
|
|
|
9
9
|
import { t as AppSliceType } from "./index-DeOpb2oK.cjs";
|
|
10
10
|
import { t as MonitorSliceType } from "./index-Ctj2r57a.cjs";
|
|
11
11
|
import { t as OrganizationSliceType } from "./index-C_LGDJN2.cjs";
|
|
12
|
-
import { r as RootState } from "./store-
|
|
12
|
+
import { r as RootState } from "./store-C-W8nPdd.cjs";
|
|
13
13
|
import { AuditLog } from "@northern.tech/types/types.gen";
|
|
14
14
|
//#region src/commonSelectors.d.ts
|
|
15
15
|
declare const getIsEnterprise: ((state: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AvailablePlans } from "./constants-nKSWZ8oD.js";
|
|
2
2
|
import { S as Role } from "./constants-B_H4squx.js";
|
|
3
|
-
import { a as UserSettings, n as GlobalSettings, o as UserSliceType, r as User } from "./index-
|
|
4
|
-
import {
|
|
3
|
+
import { a as UserSettings, n as GlobalSettings, o as UserSliceType, r as User } from "./index-DgiMpzq3.js";
|
|
4
|
+
import { a as ReleaseSliceType, i as Release } from "./index-CGT1O9T5.js";
|
|
5
5
|
import { i as Organization, n as AuditLogSelectionState } from "./types-B3qGQoMx.js";
|
|
6
6
|
import { n as OnboardingSliceType, t as OnboardingApproach } from "./index-CoObjWL4.js";
|
|
7
7
|
import { l as SelectionState, o as DeploymentsSliceType, s as DeviceDeployment, t as Deployment } from "./index-B8td4-rY.js";
|
|
@@ -9,7 +9,7 @@ import { c as DeviceSliceType, i as DeviceGroup, n as DeviceComponents, t as Dev
|
|
|
9
9
|
import { t as AppSliceType } from "./index-Bs0c1-WY.js";
|
|
10
10
|
import { t as MonitorSliceType } from "./index-BAGyeC-q.js";
|
|
11
11
|
import { t as OrganizationSliceType } from "./index-ChKTa1aL.js";
|
|
12
|
-
import { r as RootState } from "./store-
|
|
12
|
+
import { r as RootState } from "./store-CmvNnqoc.js";
|
|
13
13
|
import { AuditLog } from "@northern.tech/types/types.gen";
|
|
14
14
|
//#region src/commonSelectors.d.ts
|
|
15
15
|
declare const getIsEnterprise: ((state: {
|
package/dist/commonSelectors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ADDONS, PLANS, defaultReports } from "./appSlice/constants.js";
|
|
2
|
-
import { F as rolesByName, Ft as UNGROUPED_GROUP, L as serviceProviderRolesById, Ot as ATTRIBUTE_SCOPE_LABELS, P as rolesById, U as uiPermissionsById, c as DEVICE_ISSUE_OPTIONS, o as ATTRIBUTE_SCOPES, t as ALL_DEVICES } from "./constants-
|
|
2
|
+
import { F as rolesByName, Ft as UNGROUPED_GROUP, L as serviceProviderRolesById, Ot as ATTRIBUTE_SCOPE_LABELS, P as rolesById, U as uiPermissionsById, c as DEVICE_ISSUE_OPTIONS, o as ATTRIBUTE_SCOPES, t as ALL_DEVICES } from "./constants-eWaA3HCq.js";
|
|
3
3
|
import { onboardingSteps } from "./onboardingSlice/constants.js";
|
|
4
4
|
import { getFeatures, getSearchedDevices } from "./appSlice/selectors.js";
|
|
5
5
|
import { getDeploymentsById, getDeploymentsSelectionState, getSelectedDeploymentDeviceIds } from "./deploymentsSlice/selectors.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/releasesSlice/constants.d.ts
|
|
2
|
+
declare const ARTIFACT_GENERATION_TYPE: {
|
|
3
|
+
SINGLE_FILE: string;
|
|
4
|
+
};
|
|
5
|
+
declare const currentArtifact = "artifact_name";
|
|
6
|
+
declare const softwareIndicator = ".version";
|
|
7
|
+
declare const rootfsImageVersion = "rootfs-image.version";
|
|
8
|
+
declare const manifestVersion = "data-partition.mender-orchestrator-manifest.version";
|
|
9
|
+
declare const softwareTitleMap: {
|
|
10
|
+
"rootfs-image.version": {
|
|
11
|
+
title: string;
|
|
12
|
+
priority: number;
|
|
13
|
+
key: string;
|
|
14
|
+
};
|
|
15
|
+
"data-partition.mender-orchestrator-manifest.version": {
|
|
16
|
+
title: string;
|
|
17
|
+
priority: number;
|
|
18
|
+
key: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { softwareIndicator as a, rootfsImageVersion as i, currentArtifact as n, softwareTitleMap as o, manifestVersion as r, ARTIFACT_GENERATION_TYPE as t };
|
|
23
|
+
//# sourceMappingURL=constants-B3NH1IQi.d.cts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/releasesSlice/constants.d.ts
|
|
2
|
+
declare const ARTIFACT_GENERATION_TYPE: {
|
|
3
|
+
SINGLE_FILE: string;
|
|
4
|
+
};
|
|
5
|
+
declare const currentArtifact = "artifact_name";
|
|
6
|
+
declare const softwareIndicator = ".version";
|
|
7
|
+
declare const rootfsImageVersion = "rootfs-image.version";
|
|
8
|
+
declare const manifestVersion = "data-partition.mender-orchestrator-manifest.version";
|
|
9
|
+
declare const softwareTitleMap: {
|
|
10
|
+
"rootfs-image.version": {
|
|
11
|
+
title: string;
|
|
12
|
+
priority: number;
|
|
13
|
+
key: string;
|
|
14
|
+
};
|
|
15
|
+
"data-partition.mender-orchestrator-manifest.version": {
|
|
16
|
+
title: string;
|
|
17
|
+
priority: number;
|
|
18
|
+
key: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { softwareIndicator as a, rootfsImageVersion as i, currentArtifact as n, softwareTitleMap as o, manifestVersion as r, ARTIFACT_GENERATION_TYPE as t };
|
|
23
|
+
//# sourceMappingURL=constants-B3NH1IQi.d.ts.map
|
|
@@ -41,6 +41,7 @@ declare const checkPermissionsObject: (permissions: any, requiredPermission: any
|
|
|
41
41
|
declare const USER_LOGOUT = "USER_LOGOUT";
|
|
42
42
|
declare const OWN_USER_ID = "me";
|
|
43
43
|
declare const settingsKeys: {
|
|
44
|
+
colorScheme: string;
|
|
44
45
|
initialized: string;
|
|
45
46
|
};
|
|
46
47
|
declare const READ_STATES: {
|
|
@@ -51,4 +52,4 @@ declare const READ_STATES: {
|
|
|
51
52
|
type ReadState = keyof typeof READ_STATES;
|
|
52
53
|
//#endregion
|
|
53
54
|
export { USER_LOGOUT as a, itemUiPermissionsReducer as c, ReadState as i, settingsKeys as l, PermissionsArea as n, UiPermission as o, READ_STATES as r, checkPermissionsObject as s, OWN_USER_ID as t };
|
|
54
|
-
//# sourceMappingURL=constants-
|
|
55
|
+
//# sourceMappingURL=constants-D8-yUk19.d.cts.map
|
|
@@ -41,6 +41,7 @@ declare const checkPermissionsObject: (permissions: any, requiredPermission: any
|
|
|
41
41
|
declare const USER_LOGOUT = "USER_LOGOUT";
|
|
42
42
|
declare const OWN_USER_ID = "me";
|
|
43
43
|
declare const settingsKeys: {
|
|
44
|
+
colorScheme: string;
|
|
44
45
|
initialized: string;
|
|
45
46
|
};
|
|
46
47
|
declare const READ_STATES: {
|
|
@@ -51,4 +52,4 @@ declare const READ_STATES: {
|
|
|
51
52
|
type ReadState = keyof typeof READ_STATES;
|
|
52
53
|
//#endregion
|
|
53
54
|
export { USER_LOGOUT as a, itemUiPermissionsReducer as c, ReadState as i, settingsKeys as l, PermissionsArea as n, UiPermission as o, READ_STATES as r, checkPermissionsObject as s, OWN_USER_ID as t };
|
|
54
|
-
//# sourceMappingURL=constants-
|
|
55
|
+
//# sourceMappingURL=constants-D8-yUk19.d.ts.map
|
|
@@ -669,7 +669,10 @@ const checkSinglePermission = (permission, requiredPermission) => requiredPermis
|
|
|
669
669
|
const checkPermissionsObject = (permissions, requiredPermission, scopedAccess, superAccess) => permissions[superAccess]?.some((permission) => checkSinglePermission(permission, requiredPermission)) || permissions[scopedAccess]?.some((permission) => checkSinglePermission(permission, requiredPermission));
|
|
670
670
|
const USER_LOGOUT = "USER_LOGOUT";
|
|
671
671
|
const OWN_USER_ID = "me";
|
|
672
|
-
const settingsKeys = {
|
|
672
|
+
const settingsKeys = {
|
|
673
|
+
colorScheme: "colorScheme",
|
|
674
|
+
initialized: "settings-initialized"
|
|
675
|
+
};
|
|
673
676
|
const READ_STATES = {
|
|
674
677
|
read: "read",
|
|
675
678
|
seen: "seen",
|
|
@@ -971,4 +974,4 @@ Object.defineProperty(exports, "timeUnits", {
|
|
|
971
974
|
}
|
|
972
975
|
});
|
|
973
976
|
|
|
974
|
-
//# sourceMappingURL=constants-
|
|
977
|
+
//# sourceMappingURL=constants-MVizYy89.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants-C_SC_VKE.cjs","names":["ATTRIBUTE_SCOPES","AWS","Azure","DEVICE_LIST_DEFAULTS","SORTING_OPTIONS","DEVICE_FILTERING_OPTIONS","useradmApiUrl","uiPermissionsById"],"sources":["../src/commonConstants.tsx","../src/deploymentsSlice/constants.ts","../src/devicesSlice/constants.ts","../src/organizationSlice/constants.ts","../src/usersSlice/constants.ts"],"sourcesContent":["// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\nimport type { Integration } from '@northern.tech/types/MenderTypes';\n\nimport type { DEVICE_FILTERING_OPTIONS } from './constants';\nimport { ATTRIBUTE_SCOPES } from './constants';\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport type FilterOperator = keyof typeof DEVICE_FILTERING_OPTIONS;\n\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport interface IdAttribute {\n attribute: string;\n scope: string;\n}\nexport const defaultIdAttribute: Readonly<IdAttribute> = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nexport const ORCHESTRATOR_MANIFEST_ATTRIBUTE_PREFIX = 'mender-orchestrator-manifest.';\n\n// displayed labels for attribute scopes that diverge from the internal scope values: the system scope shows as\n// `default`, while orchestrator manifest attributes (inventory scope) show as `system`\nexport const ATTRIBUTE_SCOPE_LABELS = {\n default: 'default',\n system: 'system'\n} as const;\n\nexport const productOrder = ['micro', 'standard', 'system'];\n\nexport const credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n twinTitle: '',\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n} as const;\n\nexport interface Webhook extends Integration {\n provider: 'webhook';\n}\n\nexport const emptyWebhook: Webhook = {\n description: '',\n provider: 'webhook',\n credentials: {\n type: EXTERNAL_PROVIDER.webhook.credentialsType,\n [EXTERNAL_PROVIDER.webhook.credentialsType]: {\n secret: '',\n url: ''\n }\n }\n};\n\ninterface CountryType {\n code: string;\n label: string;\n}\nexport const MAX_PAGE_SIZE = 500;\nconst regionNames = new Intl.DisplayNames(['en'], { type: 'region' });\nexport const countries: readonly CountryType[] = [\n 'AD',\n 'AE',\n 'AF',\n 'AG',\n 'AI',\n 'AL',\n 'AM',\n 'AO',\n 'AQ',\n 'AR',\n 'AS',\n 'AT',\n 'AU',\n 'AW',\n 'AX',\n 'AZ',\n 'BA',\n 'BB',\n 'BD',\n 'BE',\n 'BF',\n 'BG',\n 'BH',\n 'BI',\n 'BJ',\n 'BL',\n 'BM',\n 'BN',\n 'BO',\n 'BR',\n 'BS',\n 'BT',\n 'BV',\n 'BW',\n 'BY',\n 'BZ',\n 'CA',\n 'CC',\n 'CD',\n 'CF',\n 'CG',\n 'CH',\n 'CI',\n 'CK',\n 'CL',\n 'CM',\n 'CN',\n 'CO',\n 'CR',\n 'CU',\n 'CV',\n 'CW',\n 'CX',\n 'CY',\n 'CZ',\n 'DE',\n 'DJ',\n 'DK',\n 'DM',\n 'DO',\n 'DZ',\n 'EC',\n 'EE',\n 'EG',\n 'EH',\n 'ER',\n 'ES',\n 'ET',\n 'FI',\n 'FJ',\n 'FK',\n 'FM',\n 'FO',\n 'FR',\n 'GA',\n 'GB',\n 'GD',\n 'GE',\n 'GF',\n 'GG',\n 'GH',\n 'GI',\n 'GL',\n 'GM',\n 'GN',\n 'GP',\n 'GQ',\n 'GR',\n 'GS',\n 'GT',\n 'GU',\n 'GW',\n 'GY',\n 'HK',\n 'HM',\n 'HN',\n 'HR',\n 'HT',\n 'HU',\n 'ID',\n 'IE',\n 'IL',\n 'IM',\n 'IN',\n 'IO',\n 'IQ',\n 'IR',\n 'IS',\n 'IT',\n 'JE',\n 'JM',\n 'JO',\n 'JP',\n 'KE',\n 'KG',\n 'KH',\n 'KI',\n 'KM',\n 'KN',\n 'KP',\n 'KR',\n 'KW',\n 'KY',\n 'KZ',\n 'LA',\n 'LB',\n 'LC',\n 'LI',\n 'LK',\n 'LR',\n 'LS',\n 'LT',\n 'LU',\n 'LV',\n 'LY',\n 'MA',\n 'MC',\n 'MD',\n 'ME',\n 'MF',\n 'MG',\n 'MH',\n 'MK',\n 'ML',\n 'MM',\n 'MN',\n 'MO',\n 'MP',\n 'MQ',\n 'MR',\n 'MS',\n 'MT',\n 'MU',\n 'MV',\n 'MW',\n 'MX',\n 'MY',\n 'MZ',\n 'NA',\n 'NC',\n 'NE',\n 'NF',\n 'NG',\n 'NI',\n 'NL',\n 'NO',\n 'NP',\n 'NR',\n 'NU',\n 'NZ',\n 'OM',\n 'PA',\n 'PE',\n 'PF',\n 'PG',\n 'PH',\n 'PK',\n 'PL',\n 'PM',\n 'PN',\n 'PR',\n 'PS',\n 'PT',\n 'PW',\n 'PY',\n 'QA',\n 'RE',\n 'RO',\n 'RS',\n 'RU',\n 'RW',\n 'SA',\n 'SB',\n 'SC',\n 'SD',\n 'SE',\n 'SG',\n 'SH',\n 'SI',\n 'SJ',\n 'SK',\n 'SL',\n 'SM',\n 'SN',\n 'SO',\n 'SR',\n 'SS',\n 'ST',\n 'SV',\n 'SX',\n 'SY',\n 'SZ',\n 'TC',\n 'TD',\n 'TF',\n 'TG',\n 'TH',\n 'TJ',\n 'TK',\n 'TL',\n 'TM',\n 'TN',\n 'TO',\n 'TR',\n 'TT',\n 'TV',\n 'TW',\n 'TZ',\n 'UA',\n 'UG',\n 'US',\n 'UY',\n 'UZ',\n 'VA',\n 'VC',\n 'VE',\n 'VG',\n 'VI',\n 'VN',\n 'VU',\n 'WF',\n 'WS',\n 'XK',\n 'YE',\n 'YT',\n 'ZA',\n 'ZM',\n 'ZW'\n]\n .map(code => ({ code, label: regionNames.of(code) }))\n .sort((a, b) => a.label.localeCompare(b.label));\n","// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { DeploymentStatistics } from '@northern.tech/types/MenderTypes';\n\nimport { DEVICE_LIST_DEFAULTS, SORTING_OPTIONS } from '../constants';\n\nconst alreadyInstalled = 'already-installed';\n\nexport const deploymentSubstates = {\n aborted: 'aborted',\n alreadyInstalled,\n decommissioned: 'decommissioned',\n downloading: 'downloading',\n failure: 'failure',\n installing: 'installing',\n noartifact: 'noartifact',\n artifact_too_big: 'artifact_too_big',\n incompatible_tier: 'incompatible_tier',\n pause_before_committing: 'pause_before_committing',\n pause_before_installing: 'pause_before_installing',\n pause_before_rebooting: 'pause_before_rebooting',\n pending: 'pending',\n rebooting: 'rebooting',\n success: 'success'\n};\n\nexport type DeploymentSubstateMapping = {\n failures: string[];\n inprogress: string[];\n paused: string[];\n pending: string[];\n skipped?: string[];\n successes: string[];\n};\n\nexport const deploymentStatesToSubstates: DeploymentSubstateMapping = {\n failures: [deploymentSubstates.failure, deploymentSubstates.aborted, deploymentSubstates.decommissioned],\n inprogress: [deploymentSubstates.downloading, deploymentSubstates.installing, deploymentSubstates.rebooting],\n paused: [deploymentSubstates.pause_before_installing, deploymentSubstates.pause_before_rebooting, deploymentSubstates.pause_before_committing],\n pending: [deploymentSubstates.pending],\n successes: [\n deploymentSubstates.success,\n deploymentSubstates.alreadyInstalled,\n deploymentSubstates.noartifact,\n deploymentSubstates.artifact_too_big,\n deploymentSubstates.incompatible_tier\n ]\n};\n\nexport const deploymentStatesToSubstatesWithSkipped: DeploymentSubstateMapping = {\n ...deploymentStatesToSubstates,\n failures: [deploymentSubstates.failure],\n skipped: [\n deploymentSubstates.aborted,\n deploymentSubstates.noartifact,\n deploymentSubstates.artifact_too_big,\n deploymentSubstates.alreadyInstalled,\n deploymentSubstates.decommissioned,\n deploymentSubstates.incompatible_tier\n ],\n successes: [deploymentSubstates.success]\n};\nexport const installationSubstatesMap = {\n download: {\n title: 'download',\n done: 'downloaded',\n successIndicators: [deploymentSubstates.installing, deploymentSubstates.rebooting, ...deploymentStatesToSubstates.paused, deploymentSubstates.success],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactInstall_Enter'\n },\n install: {\n title: 'install',\n done: 'installed',\n successIndicators: [\n deploymentSubstates.rebooting,\n deploymentSubstates.pause_before_rebooting,\n deploymentSubstates.pause_before_committing,\n deploymentSubstates.success\n ],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactReboot_Enter'\n },\n reboot: {\n title: 'reboot',\n done: 'rebooted',\n successIndicators: [deploymentSubstates.pause_before_committing, deploymentSubstates.success],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactCommit_Enter'\n },\n commit: {\n title: 'commit',\n done: 'committed',\n successIndicators: deploymentStatesToSubstates.successes,\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: undefined\n }\n};\n\nexport const DEPLOYMENT_STATES = {\n finished: 'finished',\n inprogress: 'inprogress',\n pending: 'pending',\n scheduled: 'scheduled'\n} as const;\n\nexport const listDefaultsByState = {\n [DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },\n [DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },\n [DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },\n [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },\n sort: { direction: SORTING_OPTIONS.desc }\n};\n\nexport const DEFAULT_PENDING_INPROGRESS_COUNT = 10;\nexport const DEPLOYMENT_ROUTES = {\n active: {\n key: 'active',\n route: '/deployments/active',\n states: [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress],\n title: 'Active'\n },\n finished: {\n key: 'finished',\n route: '/deployments/finished',\n states: [DEPLOYMENT_STATES.finished],\n title: 'Finished'\n },\n scheduled: {\n key: 'scheduled',\n route: '/deployments/scheduled',\n states: [DEPLOYMENT_STATES.scheduled],\n title: 'Scheduled'\n }\n} as const;\nexport const DEPLOYMENT_TYPES = {\n software: 'software',\n configuration: 'configuration'\n};\nexport const defaultStats = {\n [deploymentSubstates.aborted]: 0,\n [deploymentSubstates.alreadyInstalled]: 0,\n [deploymentSubstates.decommissioned]: 0,\n [deploymentSubstates.downloading]: 0,\n [deploymentSubstates.failure]: 0,\n [deploymentSubstates.installing]: 0,\n [deploymentSubstates.noartifact]: 0,\n [deploymentSubstates.pause_before_committing]: 0,\n [deploymentSubstates.pause_before_installing]: 0,\n [deploymentSubstates.pause_before_rebooting]: 0,\n [deploymentSubstates.pending]: 0,\n [deploymentSubstates.rebooting]: 0,\n [deploymentSubstates.success]: 0\n};\nexport const deploymentDisplayStates = {\n finished: 'Finished',\n scheduled: 'Scheduled',\n skipped: 'Skipped',\n paused: 'Paused',\n pending: 'Pending',\n inprogress: 'In Progress',\n success: 'Success',\n successes: 'Success',\n failure: 'Fail',\n failures: 'Fail'\n};\n\nexport const deploymentPrototype = {\n devices: {},\n name: undefined,\n statistics: { status: {} } as DeploymentStatistics\n};\n\nexport const pauseMap = {\n [deploymentSubstates.pause_before_installing]: {\n title: installationSubstatesMap.download.done,\n followUp: installationSubstatesMap.download.pauseConfigurationIndicator\n },\n [deploymentSubstates.pause_before_rebooting]: {\n title: installationSubstatesMap.install.done,\n followUp: installationSubstatesMap.install.pauseConfigurationIndicator\n },\n [deploymentSubstates.pause_before_committing]: {\n title: installationSubstatesMap.reboot.done,\n followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator\n }\n};\n","// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { DEVICE_STATES, FilterOperator } from '../constants';\nimport { DEVICE_FILTERING_OPTIONS } from '../constants';\n\nexport const emptyFilter = { key: null, value: '', operator: DEVICE_FILTERING_OPTIONS.$eq.key as FilterOperator, scope: 'inventory' };\n\n// see https://github.com/mendersoftware/go-lib-micro/tree/master/ws\n// for the description of proto_header and the consts\n// *Note*: this needs to be aligned with mender-connect and deviceconnect.\nexport const DEVICE_MESSAGE_PROTOCOLS = {\n Shell: 1\n};\nexport const DEVICE_MESSAGE_TYPES = {\n Delay: 'delay',\n New: 'new',\n Ping: 'ping',\n Pong: 'pong',\n Resize: 'resize',\n Shell: 'shell',\n Stop: 'stop'\n};\n\n// we can't include the dismiss state with the rest since this would include dismissed devices in several queries\nexport const DEVICE_DISMISSAL_STATE = 'dismiss';\n\nexport type DeviceAuthState = (typeof DEVICE_STATES)[keyof typeof DEVICE_STATES];\n\nexport const DEVICE_CONNECT_STATES = {\n connected: 'connected',\n disconnected: 'disconnected',\n unknown: 'unknown'\n};\n\nexport const geoAttributes = ['geo-lat', 'geo-lon'].map(attribute => ({ attribute, scope: 'inventory' }));\n\nexport const REPORT_CHART_SIZE_LIMIT = 6;\n","// Copyright 2020 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { useradmApiUrl } from '../constants';\n\nexport const XML_METADATA_FORMAT = 'xml';\nexport const JSON_METADATA_FORMAT = 'json';\n\nexport const getSamlStartUrl = id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/login`;\nexport const getOidcStartUrl = id => `${window.location.origin}${useradmApiUrl}/oidc/${id}/start`;\n\nexport const SSO_TYPES = {\n saml: {\n id: 'saml',\n type: 'saml',\n title: 'SAML',\n metadataFormat: XML_METADATA_FORMAT,\n editorLanguage: XML_METADATA_FORMAT,\n contentType: 'application/samlmetadata+xml',\n getStartUrl: getSamlStartUrl,\n configDetails: [\n { key: 'entityID', label: 'Entity ID', getValue: id => `${window.location.origin}${useradmApiUrl}/sso/sp/metadata/${id}` },\n { key: 'acs', label: 'ACS URL', getValue: id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/acs` },\n { key: 'startURL', label: 'Start URL', getValue: getSamlStartUrl }\n ]\n },\n oidc: {\n id: 'oidc',\n type: 'oidc',\n title: 'OpenID Connect',\n metadataFormat: JSON_METADATA_FORMAT,\n editorLanguage: JSON_METADATA_FORMAT,\n contentType: 'application/json',\n getStartUrl: getOidcStartUrl,\n configDetails: [{ key: 'startURL', label: 'Start Url', getValue: getOidcStartUrl }]\n }\n} as const;\n\nexport type ContentType = (typeof SSO_TYPES)[keyof typeof SSO_TYPES]['contentType'];\n\nexport const auditlogTypes = {\n artifact: { title: 'Artifact', queryParameter: 'object_type', value: 'artifact' },\n deployment: { title: 'Deployment', queryParameter: 'object_deployment_name', value: 'deployment' },\n device: { title: 'Device', queryParameter: 'object_id', value: 'device' },\n user_access_token: { title: 'Personal Access Token', queryParameter: 'user_access_token', value: 'user_access_token' },\n user: { title: 'User', queryParameter: 'object_id', value: 'user' },\n tenant: { title: 'Tenant', queryParameter: 'object_id', value: 'tenant' }\n};\n\nexport const AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];\nexport const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];\n\nexport const TENANT_LIST_DEFAULT = {\n page: 1,\n perPage: 20\n};\n","'use strict';\n\n// Copyright 2015 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { uiPermissionsById } from '../constants';\n\nexport type UiPermission = {\n explanations: object;\n permissionLevel: number;\n permissionSets: Record<string, string>;\n title: string;\n value: string;\n verbs: string[];\n};\n\ntype ExcessiveAccessConfig = {\n selector: string;\n warning: string;\n};\n\ntype EndpointDefinition = {\n path: RegExp;\n types: string[];\n uiPermissions: UiPermission[];\n};\n\n/**\n * _uiPermissions_ represent the possible permissions/ rights that can be given for the area\n * _endpoints_ represent the possible endpoints this definition might be affecting in the UI and what\n * functionality might be affected\n *\n */\nexport type PermissionsArea = {\n endpoints: EndpointDefinition[];\n excessiveAccessConfig?: ExcessiveAccessConfig;\n explanation: string;\n filter?: (object) => string[];\n key: string;\n placeholder?: string;\n scope?: string;\n title: string;\n uiPermissions: UiPermission[];\n};\n\nexport const itemUiPermissionsReducer = (accu, { item, uiPermissions }) => (item ? { ...accu, [item]: uiPermissions } : accu);\n\nconst checkSinglePermission = (permission, requiredPermission) =>\n requiredPermission === permission || uiPermissionsById[permission].permissionLevel > uiPermissionsById[requiredPermission].permissionLevel;\n\nexport const checkPermissionsObject = (permissions, requiredPermission, scopedAccess, superAccess) =>\n permissions[superAccess]?.some(permission => checkSinglePermission(permission, requiredPermission)) ||\n permissions[scopedAccess]?.some(permission => checkSinglePermission(permission, requiredPermission));\n\nexport const USER_LOGOUT = 'USER_LOGOUT';\n\nexport const OWN_USER_ID = 'me';\n\nexport const settingsKeys = { initialized: 'settings-initialized' };\n\nexport const READ_STATES = {\n read: 'read',\n seen: 'seen',\n unread: 'unread'\n} as const;\nexport type ReadState = keyof typeof READ_STATES;\n"],"mappings":";;;;AAoBA,MAAa,YAAY;CACvB,MAAM;CACN,SAAS;CACT,OAAO;AACT;AAEA,MAAa,kBAAkB;CAAE,IAAI;CAAmB,MAAM;AAAa;AAE3E,MAAa,6BAA6B;AAI1C,MAAM,YAAY;AAClB,MAAa,WAAW;CACtB,iBAAiB;CACjB,eAAe;CACf,aAAa,KAAM;CACnB;CACA,YAAY,IAAI;C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,aAAa,CAAC,IAAI,GAAG,EAAE,MAAM,SAAS,CAAC;AACpE,MAAa,YAAoC;CAC/C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;C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zC,uBAAuB,cAAcC,+BAAAA,kBAAkB,WAAW,CAAC,kBAAkBA,+BAAAA,kBAAkB,mBAAmB,CAAC;AAE7H,MAAa,0BAA0B,aAAa,oBAAoB,cAAc,gBACpF,YAAY,YAAY,EAAE,MAAK,eAAc,sBAAsB,YAAY,kBAAkB,CAAC,KAClG,YAAY,aAAa,EAAE,MAAK,eAAc,sBAAsB,YAAY,kBAAkB,CAAC;AAErG,MAAa,cAAc;AAE3B,MAAa,cAAc;AAE3B,MAAa,eAAe,EAAE,aAAa,uBAAuB;AAElE,MAAa,cAAc;CACzB,MAAM;CACN,MAAM;CACN,QAAQ;AACV"}
|
|
1
|
+
{"version":3,"file":"constants-MVizYy89.cjs","names":["ATTRIBUTE_SCOPES","AWS","Azure","DEVICE_LIST_DEFAULTS","SORTING_OPTIONS","DEVICE_FILTERING_OPTIONS","useradmApiUrl","uiPermissionsById"],"sources":["../src/commonConstants.tsx","../src/deploymentsSlice/constants.ts","../src/devicesSlice/constants.ts","../src/organizationSlice/constants.ts","../src/usersSlice/constants.ts"],"sourcesContent":["// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\nimport type { Integration } from '@northern.tech/types/MenderTypes';\n\nimport type { DEVICE_FILTERING_OPTIONS } from './constants';\nimport { ATTRIBUTE_SCOPES } from './constants';\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport type FilterOperator = keyof typeof DEVICE_FILTERING_OPTIONS;\n\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport interface IdAttribute {\n attribute: string;\n scope: string;\n}\nexport const defaultIdAttribute: Readonly<IdAttribute> = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nexport const ORCHESTRATOR_MANIFEST_ATTRIBUTE_PREFIX = 'mender-orchestrator-manifest.';\n\n// displayed labels for attribute scopes that diverge from the internal scope values: the system scope shows as\n// `default`, while orchestrator manifest attributes (inventory scope) show as `system`\nexport const ATTRIBUTE_SCOPE_LABELS = {\n default: 'default',\n system: 'system'\n} as const;\n\nexport const productOrder = ['micro', 'standard', 'system'];\n\nexport const credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n twinTitle: '',\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n} as const;\n\nexport interface Webhook extends Integration {\n provider: 'webhook';\n}\n\nexport const emptyWebhook: Webhook = {\n description: '',\n provider: 'webhook',\n credentials: {\n type: EXTERNAL_PROVIDER.webhook.credentialsType,\n [EXTERNAL_PROVIDER.webhook.credentialsType]: {\n secret: '',\n url: ''\n }\n }\n};\n\ninterface CountryType {\n code: string;\n label: string;\n}\nexport const MAX_PAGE_SIZE = 500;\nconst regionNames = new Intl.DisplayNames(['en'], { type: 'region' });\nexport const countries: readonly CountryType[] = [\n 'AD',\n 'AE',\n 'AF',\n 'AG',\n 'AI',\n 'AL',\n 'AM',\n 'AO',\n 'AQ',\n 'AR',\n 'AS',\n 'AT',\n 'AU',\n 'AW',\n 'AX',\n 'AZ',\n 'BA',\n 'BB',\n 'BD',\n 'BE',\n 'BF',\n 'BG',\n 'BH',\n 'BI',\n 'BJ',\n 'BL',\n 'BM',\n 'BN',\n 'BO',\n 'BR',\n 'BS',\n 'BT',\n 'BV',\n 'BW',\n 'BY',\n 'BZ',\n 'CA',\n 'CC',\n 'CD',\n 'CF',\n 'CG',\n 'CH',\n 'CI',\n 'CK',\n 'CL',\n 'CM',\n 'CN',\n 'CO',\n 'CR',\n 'CU',\n 'CV',\n 'CW',\n 'CX',\n 'CY',\n 'CZ',\n 'DE',\n 'DJ',\n 'DK',\n 'DM',\n 'DO',\n 'DZ',\n 'EC',\n 'EE',\n 'EG',\n 'EH',\n 'ER',\n 'ES',\n 'ET',\n 'FI',\n 'FJ',\n 'FK',\n 'FM',\n 'FO',\n 'FR',\n 'GA',\n 'GB',\n 'GD',\n 'GE',\n 'GF',\n 'GG',\n 'GH',\n 'GI',\n 'GL',\n 'GM',\n 'GN',\n 'GP',\n 'GQ',\n 'GR',\n 'GS',\n 'GT',\n 'GU',\n 'GW',\n 'GY',\n 'HK',\n 'HM',\n 'HN',\n 'HR',\n 'HT',\n 'HU',\n 'ID',\n 'IE',\n 'IL',\n 'IM',\n 'IN',\n 'IO',\n 'IQ',\n 'IR',\n 'IS',\n 'IT',\n 'JE',\n 'JM',\n 'JO',\n 'JP',\n 'KE',\n 'KG',\n 'KH',\n 'KI',\n 'KM',\n 'KN',\n 'KP',\n 'KR',\n 'KW',\n 'KY',\n 'KZ',\n 'LA',\n 'LB',\n 'LC',\n 'LI',\n 'LK',\n 'LR',\n 'LS',\n 'LT',\n 'LU',\n 'LV',\n 'LY',\n 'MA',\n 'MC',\n 'MD',\n 'ME',\n 'MF',\n 'MG',\n 'MH',\n 'MK',\n 'ML',\n 'MM',\n 'MN',\n 'MO',\n 'MP',\n 'MQ',\n 'MR',\n 'MS',\n 'MT',\n 'MU',\n 'MV',\n 'MW',\n 'MX',\n 'MY',\n 'MZ',\n 'NA',\n 'NC',\n 'NE',\n 'NF',\n 'NG',\n 'NI',\n 'NL',\n 'NO',\n 'NP',\n 'NR',\n 'NU',\n 'NZ',\n 'OM',\n 'PA',\n 'PE',\n 'PF',\n 'PG',\n 'PH',\n 'PK',\n 'PL',\n 'PM',\n 'PN',\n 'PR',\n 'PS',\n 'PT',\n 'PW',\n 'PY',\n 'QA',\n 'RE',\n 'RO',\n 'RS',\n 'RU',\n 'RW',\n 'SA',\n 'SB',\n 'SC',\n 'SD',\n 'SE',\n 'SG',\n 'SH',\n 'SI',\n 'SJ',\n 'SK',\n 'SL',\n 'SM',\n 'SN',\n 'SO',\n 'SR',\n 'SS',\n 'ST',\n 'SV',\n 'SX',\n 'SY',\n 'SZ',\n 'TC',\n 'TD',\n 'TF',\n 'TG',\n 'TH',\n 'TJ',\n 'TK',\n 'TL',\n 'TM',\n 'TN',\n 'TO',\n 'TR',\n 'TT',\n 'TV',\n 'TW',\n 'TZ',\n 'UA',\n 'UG',\n 'US',\n 'UY',\n 'UZ',\n 'VA',\n 'VC',\n 'VE',\n 'VG',\n 'VI',\n 'VN',\n 'VU',\n 'WF',\n 'WS',\n 'XK',\n 'YE',\n 'YT',\n 'ZA',\n 'ZM',\n 'ZW'\n]\n .map(code => ({ code, label: regionNames.of(code) }))\n .sort((a, b) => a.label.localeCompare(b.label));\n","// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { DeploymentStatistics } from '@northern.tech/types/MenderTypes';\n\nimport { DEVICE_LIST_DEFAULTS, SORTING_OPTIONS } from '../constants';\n\nconst alreadyInstalled = 'already-installed';\n\nexport const deploymentSubstates = {\n aborted: 'aborted',\n alreadyInstalled,\n decommissioned: 'decommissioned',\n downloading: 'downloading',\n failure: 'failure',\n installing: 'installing',\n noartifact: 'noartifact',\n artifact_too_big: 'artifact_too_big',\n incompatible_tier: 'incompatible_tier',\n pause_before_committing: 'pause_before_committing',\n pause_before_installing: 'pause_before_installing',\n pause_before_rebooting: 'pause_before_rebooting',\n pending: 'pending',\n rebooting: 'rebooting',\n success: 'success'\n};\n\nexport type DeploymentSubstateMapping = {\n failures: string[];\n inprogress: string[];\n paused: string[];\n pending: string[];\n skipped?: string[];\n successes: string[];\n};\n\nexport const deploymentStatesToSubstates: DeploymentSubstateMapping = {\n failures: [deploymentSubstates.failure, deploymentSubstates.aborted, deploymentSubstates.decommissioned],\n inprogress: [deploymentSubstates.downloading, deploymentSubstates.installing, deploymentSubstates.rebooting],\n paused: [deploymentSubstates.pause_before_installing, deploymentSubstates.pause_before_rebooting, deploymentSubstates.pause_before_committing],\n pending: [deploymentSubstates.pending],\n successes: [\n deploymentSubstates.success,\n deploymentSubstates.alreadyInstalled,\n deploymentSubstates.noartifact,\n deploymentSubstates.artifact_too_big,\n deploymentSubstates.incompatible_tier\n ]\n};\n\nexport const deploymentStatesToSubstatesWithSkipped: DeploymentSubstateMapping = {\n ...deploymentStatesToSubstates,\n failures: [deploymentSubstates.failure],\n skipped: [\n deploymentSubstates.aborted,\n deploymentSubstates.noartifact,\n deploymentSubstates.artifact_too_big,\n deploymentSubstates.alreadyInstalled,\n deploymentSubstates.decommissioned,\n deploymentSubstates.incompatible_tier\n ],\n successes: [deploymentSubstates.success]\n};\nexport const installationSubstatesMap = {\n download: {\n title: 'download',\n done: 'downloaded',\n successIndicators: [deploymentSubstates.installing, deploymentSubstates.rebooting, ...deploymentStatesToSubstates.paused, deploymentSubstates.success],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactInstall_Enter'\n },\n install: {\n title: 'install',\n done: 'installed',\n successIndicators: [\n deploymentSubstates.rebooting,\n deploymentSubstates.pause_before_rebooting,\n deploymentSubstates.pause_before_committing,\n deploymentSubstates.success\n ],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactReboot_Enter'\n },\n reboot: {\n title: 'reboot',\n done: 'rebooted',\n successIndicators: [deploymentSubstates.pause_before_committing, deploymentSubstates.success],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactCommit_Enter'\n },\n commit: {\n title: 'commit',\n done: 'committed',\n successIndicators: deploymentStatesToSubstates.successes,\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: undefined\n }\n};\n\nexport const DEPLOYMENT_STATES = {\n finished: 'finished',\n inprogress: 'inprogress',\n pending: 'pending',\n scheduled: 'scheduled'\n} as const;\n\nexport const listDefaultsByState = {\n [DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },\n [DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },\n [DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },\n [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },\n sort: { direction: SORTING_OPTIONS.desc }\n};\n\nexport const DEFAULT_PENDING_INPROGRESS_COUNT = 10;\nexport const DEPLOYMENT_ROUTES = {\n active: {\n key: 'active',\n route: '/deployments/active',\n states: [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress],\n title: 'Active'\n },\n finished: {\n key: 'finished',\n route: '/deployments/finished',\n states: [DEPLOYMENT_STATES.finished],\n title: 'Finished'\n },\n scheduled: {\n key: 'scheduled',\n route: '/deployments/scheduled',\n states: [DEPLOYMENT_STATES.scheduled],\n title: 'Scheduled'\n }\n} as const;\nexport const DEPLOYMENT_TYPES = {\n software: 'software',\n configuration: 'configuration'\n};\nexport const defaultStats = {\n [deploymentSubstates.aborted]: 0,\n [deploymentSubstates.alreadyInstalled]: 0,\n [deploymentSubstates.decommissioned]: 0,\n [deploymentSubstates.downloading]: 0,\n [deploymentSubstates.failure]: 0,\n [deploymentSubstates.installing]: 0,\n [deploymentSubstates.noartifact]: 0,\n [deploymentSubstates.pause_before_committing]: 0,\n [deploymentSubstates.pause_before_installing]: 0,\n [deploymentSubstates.pause_before_rebooting]: 0,\n [deploymentSubstates.pending]: 0,\n [deploymentSubstates.rebooting]: 0,\n [deploymentSubstates.success]: 0\n};\nexport const deploymentDisplayStates = {\n finished: 'Finished',\n scheduled: 'Scheduled',\n skipped: 'Skipped',\n paused: 'Paused',\n pending: 'Pending',\n inprogress: 'In Progress',\n success: 'Success',\n successes: 'Success',\n failure: 'Fail',\n failures: 'Fail'\n};\n\nexport const deploymentPrototype = {\n devices: {},\n name: undefined,\n statistics: { status: {} } as DeploymentStatistics\n};\n\nexport const pauseMap = {\n [deploymentSubstates.pause_before_installing]: {\n title: installationSubstatesMap.download.done,\n followUp: installationSubstatesMap.download.pauseConfigurationIndicator\n },\n [deploymentSubstates.pause_before_rebooting]: {\n title: installationSubstatesMap.install.done,\n followUp: installationSubstatesMap.install.pauseConfigurationIndicator\n },\n [deploymentSubstates.pause_before_committing]: {\n title: installationSubstatesMap.reboot.done,\n followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator\n }\n};\n","// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { DEVICE_STATES, FilterOperator } from '../constants';\nimport { DEVICE_FILTERING_OPTIONS } from '../constants';\n\nexport const emptyFilter = { key: null, value: '', operator: DEVICE_FILTERING_OPTIONS.$eq.key as FilterOperator, scope: 'inventory' };\n\n// see https://github.com/mendersoftware/go-lib-micro/tree/master/ws\n// for the description of proto_header and the consts\n// *Note*: this needs to be aligned with mender-connect and deviceconnect.\nexport const DEVICE_MESSAGE_PROTOCOLS = {\n Shell: 1\n};\nexport const DEVICE_MESSAGE_TYPES = {\n Delay: 'delay',\n New: 'new',\n Ping: 'ping',\n Pong: 'pong',\n Resize: 'resize',\n Shell: 'shell',\n Stop: 'stop'\n};\n\n// we can't include the dismiss state with the rest since this would include dismissed devices in several queries\nexport const DEVICE_DISMISSAL_STATE = 'dismiss';\n\nexport type DeviceAuthState = (typeof DEVICE_STATES)[keyof typeof DEVICE_STATES];\n\nexport const DEVICE_CONNECT_STATES = {\n connected: 'connected',\n disconnected: 'disconnected',\n unknown: 'unknown'\n};\n\nexport const geoAttributes = ['geo-lat', 'geo-lon'].map(attribute => ({ attribute, scope: 'inventory' }));\n\nexport const REPORT_CHART_SIZE_LIMIT = 6;\n","// Copyright 2020 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { useradmApiUrl } from '../constants';\n\nexport const XML_METADATA_FORMAT = 'xml';\nexport const JSON_METADATA_FORMAT = 'json';\n\nexport const getSamlStartUrl = id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/login`;\nexport const getOidcStartUrl = id => `${window.location.origin}${useradmApiUrl}/oidc/${id}/start`;\n\nexport const SSO_TYPES = {\n saml: {\n id: 'saml',\n type: 'saml',\n title: 'SAML',\n metadataFormat: XML_METADATA_FORMAT,\n editorLanguage: XML_METADATA_FORMAT,\n contentType: 'application/samlmetadata+xml',\n getStartUrl: getSamlStartUrl,\n configDetails: [\n { key: 'entityID', label: 'Entity ID', getValue: id => `${window.location.origin}${useradmApiUrl}/sso/sp/metadata/${id}` },\n { key: 'acs', label: 'ACS URL', getValue: id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/acs` },\n { key: 'startURL', label: 'Start URL', getValue: getSamlStartUrl }\n ]\n },\n oidc: {\n id: 'oidc',\n type: 'oidc',\n title: 'OpenID Connect',\n metadataFormat: JSON_METADATA_FORMAT,\n editorLanguage: JSON_METADATA_FORMAT,\n contentType: 'application/json',\n getStartUrl: getOidcStartUrl,\n configDetails: [{ key: 'startURL', label: 'Start Url', getValue: getOidcStartUrl }]\n }\n} as const;\n\nexport type ContentType = (typeof SSO_TYPES)[keyof typeof SSO_TYPES]['contentType'];\n\nexport const auditlogTypes = {\n artifact: { title: 'Artifact', queryParameter: 'object_type', value: 'artifact' },\n deployment: { title: 'Deployment', queryParameter: 'object_deployment_name', value: 'deployment' },\n device: { title: 'Device', queryParameter: 'object_id', value: 'device' },\n user_access_token: { title: 'Personal Access Token', queryParameter: 'user_access_token', value: 'user_access_token' },\n user: { title: 'User', queryParameter: 'object_id', value: 'user' },\n tenant: { title: 'Tenant', queryParameter: 'object_id', value: 'tenant' }\n};\n\nexport const AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];\nexport const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];\n\nexport const TENANT_LIST_DEFAULT = {\n page: 1,\n perPage: 20\n};\n","'use strict';\n\n// Copyright 2015 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { uiPermissionsById } from '../constants';\n\nexport type UiPermission = {\n explanations: object;\n permissionLevel: number;\n permissionSets: Record<string, string>;\n title: string;\n value: string;\n verbs: string[];\n};\n\ntype ExcessiveAccessConfig = {\n selector: string;\n warning: string;\n};\n\ntype EndpointDefinition = {\n path: RegExp;\n types: string[];\n uiPermissions: UiPermission[];\n};\n\n/**\n * _uiPermissions_ represent the possible permissions/ rights that can be given for the area\n * _endpoints_ represent the possible endpoints this definition might be affecting in the UI and what\n * functionality might be affected\n *\n */\nexport type PermissionsArea = {\n endpoints: EndpointDefinition[];\n excessiveAccessConfig?: ExcessiveAccessConfig;\n explanation: string;\n filter?: (object) => string[];\n key: string;\n placeholder?: string;\n scope?: string;\n title: string;\n uiPermissions: UiPermission[];\n};\n\nexport const itemUiPermissionsReducer = (accu, { item, uiPermissions }) => (item ? { ...accu, [item]: uiPermissions } : accu);\n\nconst checkSinglePermission = (permission, requiredPermission) =>\n requiredPermission === permission || uiPermissionsById[permission].permissionLevel > uiPermissionsById[requiredPermission].permissionLevel;\n\nexport const checkPermissionsObject = (permissions, requiredPermission, scopedAccess, superAccess) =>\n permissions[superAccess]?.some(permission => checkSinglePermission(permission, requiredPermission)) ||\n permissions[scopedAccess]?.some(permission => checkSinglePermission(permission, requiredPermission));\n\nexport const USER_LOGOUT = 'USER_LOGOUT';\n\nexport const OWN_USER_ID = 'me';\n\nexport const settingsKeys = { colorScheme: 'colorScheme', initialized: 'settings-initialized' };\n\nexport const READ_STATES = {\n read: 'read',\n seen: 'seen',\n unread: 'unread'\n} as const;\nexport type ReadState = keyof typeof READ_STATES;\n"],"mappings":";;;;AAoBA,MAAa,YAAY;CACvB,MAAM;CACN,SAAS;CACT,OAAO;AACT;AAEA,MAAa,kBAAkB;CAAE,IAAI;CAAmB,MAAM;AAAa;AAE3E,MAAa,6BAA6B;AAI1C,MAAM,YAAY;AAClB,MAAa,WAAW;CACtB,iBAAiB;CACjB,eAAe;CACf,aAAa,KAAM;CACnB;CACA,YAAY,IAAI;CAChB,cAAc,IAAI;CAClB,aAAa,IAAI;CACjB,gBAAgB,KAAK;CACrB,aAAa,KAAK;AACpB;AAEA,MAAa,uBAAuB;CAAE,UAAU;CAAG,cAAc,UAAU;AAAK;AAMhF,MAAa,qBAA4C,OAAO,OAAO;CAAE,WAAW;CAAM,OAAOA,+BAAAA,iBAAiB;AAAS,CAAC;AAE5H,MAAa,yCAAyC;AAItD,MAAa,yBAAyB;CACpC,SAAS;CACT,QAAQ;AACV;AAEA,MAAa,eAAe;CAAC;CAAS;CAAY;AAAQ;AAE1D,MAAa,kBAAkB;CAC7B,KAAK;CACL,MAAM;CACN,KAAK;CACL,MAAM;AACR;AACA,MAAa,oBAAoB;CAC/B,YAAY;EACV,iBAAiB,gBAAgB;EACjC,MAAMC,QAAAA;EACN,OAAO;EACP,WAAW;EACX,UAAU;EACV,SAAS;EACT,YAAY;EACZ,YAAY,iBAAA,GAAA,kBAAA,IAAA,CAAA,kBAAA,UAAA,EAAA,UAAE,yFAAwF,CAAA;CACxG;CACA,WAAW;EACT,iBAAiB,gBAAgB;EACjC,MAAMC,QAAAA;EACN,OAAO;EACP,WAAW;EACX,UAAU;EACV,SAAS;EACT,YAAY;EACZ,YACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD,EAAA,UAAA;GAAM;GACwI;GAE1I,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;IACE,MAAK;IACL,QAAO;IACP,KAAI;IACL,UAAA;GAEE,CAAA;GACJ;EAEG,EAAA,CAAA;CAEV;CACA,SAAS;EACP,iBAAiB,gBAAgB;EACjC,YAAY;EACZ,WAAW;EAEX,SAAS;EACT,UAAU;CACZ;AACF;AAMA,MAAa,eAAwB;CACnC,aAAa;CACb,UAAU;CACV,aAAa;EACX,MAAM,kBAAkB,QAAQ;GAC/B,kBAAkB,QAAQ,kBAAkB;GAC3C,QAAQ;GACR,KAAK;EACP;CACF;AACF;AAMA,MAAa,gBAAgB;AAC7B,MAAM,cAAc,IAAI,KAAK,aAAa,CAAC,IAAI,GAAG,EAAE,MAAM,SAAS,CAAC;AACpE,MAAa,YAAoC;CAC/C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CACE,KAAI,UAAS;CAAE;CAAM,OAAO,YAAY,GAAG,IAAI;AAAE,EAAE,CAAC,CACpD,MAAM,GAAG,MAAM,EAAE,MAAM,cAAc,EAAE,KAAK,CAAC;ACjXhD,MAAa,sBAAsB;CACjC,SAAS;CACT;CACA,gBAAgB;CAChB,aAAa;CACb,SAAS;CACT,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,mBAAmB;CACnB,yBAAyB;CACzB,yBAAyB;CACzB,wBAAwB;CACxB,SAAS;CACT,WAAW;CACX,SAAS;AACX;AAWA,MAAa,8BAAyD;CACpE,UAAU;EAAC,oBAAoB;EAAS,oBAAoB;EAAS,oBAAoB;CAAc;CACvG,YAAY;EAAC,oBAAoB;EAAa,oBAAoB;EAAY,oBAAoB;CAAS;CAC3G,QAAQ;EAAC,oBAAoB;EAAyB,oBAAoB;EAAwB,oBAAoB;C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AAY,gBAAgB;EAAe,OAAO;CAAW;CAChF,YAAY;EAAE,OAAO;EAAc,gBAAgB;EAA0B,OAAO;CAAa;CACjG,QAAQ;EAAE,OAAO;EAAU,gBAAgB;EAAa,OAAO;CAAS;CACxE,mBAAmB;EAAE,OAAO;EAAyB,gBAAgB;EAAqB,OAAO;CAAoB;CACrH,MAAM;EAAE,OAAO;EAAQ,gBAAgB;EAAa,OAAO;CAAO;CAClE,QAAQ;EAAE,OAAO;EAAU,gBAAgB;EAAa,OAAO;CAAS;AAC1E;AAEA,MAAa,mBAAmB;CAAC,cAAc;CAAU,cAAc;CAAY,cAAc;CAAQ,cAAc;CAAmB,cAAc;AAAI;AAC5J,MAAa,sBAAsB,CAAC,cAAc,MAAM,cAAc,MAAM;AAE5E,MAAa,sBAAsB;CACjC,MAAM;CACN,SAAS;AACX;;;ACVA,MAAa,4BAA4B,MAAM,EAAE,MAAM,oBAAqB,OAAO;CAAE,GAAG;EAAO,OAAO;AAAc,IAAI;AAExH,MAAM,yBAAyB,YAAY,uBACzC,uBAAuB,cAAcC,+BAAAA,kBAAkB,WAAW,CAAC,kBAAkBA,+BAAAA,kBAAkB,mBAAmB,CAAC;AAE7H,MAAa,0BAA0B,aAAa,oBAAoB,cAAc,gBACpF,YAAY,YAAY,EAAE,MAAK,eAAc,sBAAsB,YAAY,kBAAkB,CAAC,KAClG,YAAY,aAAa,EAAE,MAAK,eAAc,sBAAsB,YAAY,kBAAkB,CAAC;AAErG,MAAa,cAAc;AAE3B,MAAa,cAAc;AAE3B,MAAa,eAAe;CAAE,aAAa;CAAe,aAAa;AAAuB;AAE9F,MAAa,cAAc;CACzB,MAAM;CACN,MAAM;CACN,QAAQ;AACV"}
|
|
@@ -669,7 +669,10 @@ const checkSinglePermission = (permission, requiredPermission) => requiredPermis
|
|
|
669
669
|
const checkPermissionsObject = (permissions, requiredPermission, scopedAccess, superAccess) => permissions[superAccess]?.some((permission) => checkSinglePermission(permission, requiredPermission)) || permissions[scopedAccess]?.some((permission) => checkSinglePermission(permission, requiredPermission));
|
|
670
670
|
const USER_LOGOUT = "USER_LOGOUT";
|
|
671
671
|
const OWN_USER_ID = "me";
|
|
672
|
-
const settingsKeys = {
|
|
672
|
+
const settingsKeys = {
|
|
673
|
+
colorScheme: "colorScheme",
|
|
674
|
+
initialized: "settings-initialized"
|
|
675
|
+
};
|
|
673
676
|
const READ_STATES = {
|
|
674
677
|
read: "read",
|
|
675
678
|
seen: "seen",
|
|
@@ -678,4 +681,4 @@ const READ_STATES = {
|
|
|
678
681
|
//#endregion
|
|
679
682
|
export { AUDIT_LOGS_TYPES as $, iotManagerBaseURL as A, DEVICE_ONLINE_CUTOFF as At, tenantadmApiUrlv2 as B, productOrder as Bt, deviceConnect as C, deploymentStatesToSubstatesWithSkipped as Ct, inventoryApiUrl as D, pauseMap as Dt, headerNames as E, listDefaultsByState as Et, rolesByName as F, UNGROUPED_GROUP as Ft, useradmApiUrlv1 as G, uiPermissionsByArea as H, scopedPermissionAreas as I, countries as It, READ_STATES as J, useradmApiUrlv2 as K, serviceProviderRolesById as L, credentialTypes as Lt, maxSessionAge as M, MAX_PAGE_SIZE as Mt, monitorApiUrlv1 as N, ORCHESTRATOR_MANIFEST_ATTRIBUTE_PREFIX as Nt, inventoryApiUrlV2 as O, ATTRIBUTE_SCOPE_LABELS as Ot, rolesById as P, TIMEOUTS as Pt, settingsKeys as Q, ssoIdpApiUrlv1 as R, defaultIdAttribute as Rt, deviceConfig as S, deploymentStatesToSubstates as St, emptyUiPermissions as T, installationSubstatesMap as Tt, uiPermissionsById as U, twoFAStates as V, timeUnits as Vt, useradmApiUrl as W, checkPermissionsObject as X, USER_LOGOUT as Y, itemUiPermissionsReducer as Z, defaultPermissionSets as _, DEPLOYMENT_STATES as _t, APPLICATION_JWT_CONTENT_TYPE as a, auditlogTypes as at, deploymentsApiUrlV2 as b, deploymentDisplayStates as bt, DEVICE_ISSUE_OPTIONS as c, DEVICE_CONNECT_STATES as ct, PermissionTypes as d, DEVICE_MESSAGE_TYPES as dt, JSON_METADATA_FORMAT as et, SORTING_OPTIONS as f, REPORT_CHART_SIZE_LIMIT as ft, auditLogsApiUrl as g, DEPLOYMENT_ROUTES as gt, apiUrl as h, DEFAULT_PENDING_INPROGRESS_COUNT as ht, APPLICATION_JSON_CONTENT_TYPE as i, XML_METADATA_FORMAT as it, limitDefault as j, EXTERNAL_PROVIDER as jt, inventoryApiUrlV2alpha1 as k, DEVICE_LIST_MAXIMUM_LENGTH as kt, DEVICE_LIST_DEFAULTS as l, DEVICE_DISMISSAL_STATE as lt, apiRoot as m, geoAttributes as mt, ALL_DEVICE_STATES as n, SSO_TYPES as nt, ATTRIBUTE_SCOPES as o, getOidcStartUrl as ot, alertChannels as p, emptyFilter as pt, OWN_USER_ID as q, ALL_RELEASES as r, TENANT_LIST_DEFAULT as rt, DEVICE_FILTERING_OPTIONS as s, getSamlStartUrl as st, ALL_DEVICES as t, SP_AUDIT_LOGS_TYPES as tt, DEVICE_STATES as u, DEVICE_MESSAGE_PROTOCOLS as ut, deploymentsApiUrl as v, DEPLOYMENT_TYPES as vt, emptyRole as w, deploymentSubstates as wt, deviceAuthV2 as x, deploymentPrototype as xt, deploymentsApiUrlV1alpha1 as y, defaultStats as yt, tenantadmApiUrlv1 as z, emptyWebhook as zt };
|
|
680
683
|
|
|
681
|
-
//# sourceMappingURL=constants-
|
|
684
|
+
//# sourceMappingURL=constants-eWaA3HCq.js.map
|