@northern.tech/store 0.36.1 → 0.36.3
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.cjs.map +1 -1
- package/dist/actions.d.cts +123 -134
- package/dist/actions.d.ts +123 -134
- package/dist/actions.js.map +1 -1
- package/dist/api/general-api.cjs +3 -3
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.d.cts +9 -10
- package/dist/api/general-api.d.ts +9 -10
- package/dist/api/general-api.js.map +1 -1
- package/dist/api/users-api.cjs +2 -2
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.d.cts +1 -2
- package/dist/api/users-api.d.ts +1 -2
- package/dist/api/users-api.js.map +1 -1
- package/dist/appSlice/constants.cjs +0 -1
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +1 -1
- package/dist/appSlice/constants.d.ts +1 -1
- package/dist/appSlice/constants.js.map +1 -1
- package/dist/appSlice/index.cjs +2 -4
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +2 -2
- package/dist/appSlice/index.d.ts +2 -2
- package/dist/appSlice/index.js +2 -3
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.d.cts +1 -1
- package/dist/appSlice/mocks.d.ts +1 -1
- package/dist/appSlice/mocks.js.map +1 -1
- package/dist/appSlice/selectors.cjs +2 -6
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +35 -128
- package/dist/appSlice/selectors.d.ts +35 -128
- package/dist/appSlice/selectors.js +2 -5
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/thunks.cjs +0 -1
- package/dist/appSlice/thunks.d.cts +6 -31
- package/dist/appSlice/thunks.d.ts +6 -31
- package/dist/appSlice/thunks.js +2 -2
- package/dist/auth.cjs +2 -2
- 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.map +1 -1
- package/dist/commonConstants.d.cts +1 -1
- package/dist/commonConstants.d.ts +1 -1
- package/dist/commonSelectors.cjs +2 -2
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +164 -166
- package/dist/commonSelectors.d.ts +164 -166
- package/dist/commonSelectors.js.map +1 -1
- package/dist/{constants-CIx3fnBv.d.cts → constants-6kYRTdox.d.cts} +1 -1
- package/dist/{constants-BciiayPt.d.ts → constants-6kYRTdox.d.ts} +1 -1
- package/dist/{constants-BIIEMVoG.d.ts → constants-B_7FCJQX.d.cts} +3 -6
- package/dist/{constants-BFTS6mge.d.cts → constants-B_7FCJQX.d.ts} +3 -6
- package/dist/{constants-D41U_jbR.d.cts → constants-BwKiHHaB.d.cts} +1 -1
- package/dist/{constants-5cdwz1iH.d.ts → constants-BwKiHHaB.d.ts} +1 -1
- package/dist/{constants-DK7fI3Rh.d.cts → constants-Db_RBdlV.d.cts} +1 -1
- package/dist/{constants-BWEsNG5c.d.ts → constants-Db_RBdlV.d.ts} +1 -1
- package/dist/{constants-CNhpIMME.d.cts → constants-OZiiFKiA.d.cts} +1 -1
- package/dist/{constants-y2XVLQWf.d.ts → constants-OZiiFKiA.d.ts} +1 -1
- package/dist/{constants-CjO3_FOH.d.ts → constants-OcdoVk6f.d.ts} +3 -4
- package/dist/{constants-G3wymKIl.d.cts → constants-Sn4gnNA3.d.cts} +1 -1
- package/dist/{constants-Cpgyuy_r.d.ts → constants-Sn4gnNA3.d.ts} +1 -1
- package/dist/{constants-BrGIx40B.d.cts → constants-_p6w8uEp.d.cts} +3 -4
- package/dist/constants.cjs +0 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +8 -8
- package/dist/constants.d.ts +8 -8
- package/dist/constants.js.map +1 -1
- package/dist/deploymentsSlice/constants.d.cts +1 -1
- package/dist/deploymentsSlice/constants.d.ts +1 -1
- package/dist/deploymentsSlice/index.cjs +0 -1
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.d.cts +1 -1
- package/dist/deploymentsSlice/index.d.ts +1 -1
- package/dist/deploymentsSlice/index.js.map +1 -1
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.d.cts +1 -1
- package/dist/deploymentsSlice/mocks.d.ts +1 -1
- package/dist/deploymentsSlice/mocks.js.map +1 -1
- package/dist/deploymentsSlice/selectors.cjs +0 -1
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +15 -16
- package/dist/deploymentsSlice/selectors.d.ts +15 -16
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +21 -22
- package/dist/deploymentsSlice/thunks.d.ts +21 -22
- package/dist/devicesSlice/constants.d.cts +1 -1
- package/dist/devicesSlice/constants.d.ts +1 -1
- package/dist/devicesSlice/index.cjs +0 -1
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +1 -1
- package/dist/devicesSlice/index.d.ts +1 -1
- package/dist/devicesSlice/index.js.map +1 -1
- package/dist/devicesSlice/mocks.cjs +0 -1
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.js.map +1 -1
- package/dist/devicesSlice/selectors.cjs +0 -1
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +79 -81
- package/dist/devicesSlice/selectors.d.ts +79 -81
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +67 -69
- package/dist/devicesSlice/thunks.d.ts +67 -69
- package/dist/{index-DUvrw_Ed.d.ts → index-5Q-iI4EB.d.cts} +17 -20
- package/dist/index-BBsUj1a8.d.ts +68 -0
- package/dist/index-BLvjQfGj.d.ts +119 -0
- package/dist/{index-BP0uAq36.d.cts → index-Bb4yvvgG.d.ts} +25 -28
- package/dist/index-Bj3OArhr.d.cts +68 -0
- package/dist/{index-CT5hgXm9.d.cts → index-ByfjrTdH.d.ts} +16 -19
- package/dist/index-C8QadAm7.d.cts +119 -0
- package/dist/{index-BI9O8JWe.d.ts → index-CPdMUfRr.d.ts} +41 -44
- package/dist/index-CSk4ENmk.d.cts +149 -0
- package/dist/index-Cf81vLTi.d.ts +149 -0
- package/dist/index-DBUt8xVc.d.cts +61 -0
- package/dist/index-DBUt8xVc.d.ts +61 -0
- package/dist/index-DLDY7bNT.d.ts +165 -0
- package/dist/{index-B64X5ozM.d.cts → index-DbfM03Gj.d.cts} +42 -45
- package/dist/{index-CkwVnIqd.d.ts → index-EPmsL6Lb.d.cts} +26 -29
- package/dist/index-Zs9RnVoR.d.cts +165 -0
- package/dist/liststatehook.cjs +5 -6
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.d.cts +1 -1
- package/dist/liststatehook.d.ts +1 -1
- package/dist/liststatehook.js +1 -1
- package/dist/liststatehook.js.map +1 -1
- package/dist/locationutils.cjs +0 -1
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.d.cts +3 -3
- package/dist/locationutils.d.ts +3 -3
- package/dist/locationutils.js.map +1 -1
- package/dist/monitorSlice/constants.d.cts +1 -1
- package/dist/monitorSlice/constants.d.ts +1 -1
- package/dist/monitorSlice/index.cjs +0 -1
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.d.cts +1 -1
- package/dist/monitorSlice/index.d.ts +1 -1
- package/dist/monitorSlice/index.js.map +1 -1
- package/dist/monitorSlice/mocks.cjs +0 -1
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.d.cts +1 -1
- package/dist/monitorSlice/mocks.d.ts +1 -1
- package/dist/monitorSlice/mocks.js.map +1 -1
- package/dist/monitorSlice/selectors.d.cts +1 -1
- package/dist/monitorSlice/selectors.d.ts +1 -1
- package/dist/monitorSlice/thunks.cjs +1 -3
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +11 -13
- package/dist/monitorSlice/thunks.d.ts +11 -13
- package/dist/monitorSlice/thunks.js +1 -2
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/constants.cjs.map +1 -1
- package/dist/onboardingSlice/constants.d.cts +1 -1
- package/dist/onboardingSlice/constants.d.ts +1 -1
- package/dist/onboardingSlice/constants.js.map +1 -1
- package/dist/onboardingSlice/index.cjs +0 -1
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.d.cts +1 -1
- package/dist/onboardingSlice/index.d.ts +1 -1
- package/dist/onboardingSlice/index.js.map +1 -1
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/mocks.d.cts +1 -1
- package/dist/onboardingSlice/mocks.d.ts +1 -1
- package/dist/onboardingSlice/mocks.js.map +1 -1
- package/dist/onboardingSlice/selectors.d.cts +2 -2
- package/dist/onboardingSlice/selectors.d.ts +2 -2
- package/dist/onboardingSlice/thunks.d.cts +22 -23
- package/dist/onboardingSlice/thunks.d.ts +22 -23
- package/dist/organizationSlice/constants.d.cts +1 -1
- package/dist/organizationSlice/constants.d.ts +1 -1
- package/dist/organizationSlice/index.cjs +0 -1
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +1 -1
- package/dist/organizationSlice/index.d.ts +1 -1
- package/dist/organizationSlice/index.js.map +1 -1
- package/dist/organizationSlice/mocks.cjs +0 -1
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.d.cts +3 -4
- package/dist/organizationSlice/mocks.d.ts +3 -4
- package/dist/organizationSlice/mocks.js.map +1 -1
- package/dist/organizationSlice/selectors.cjs +0 -1
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +78 -81
- package/dist/organizationSlice/selectors.d.ts +78 -81
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +65 -105
- package/dist/organizationSlice/thunks.d.ts +65 -105
- package/dist/organizationSlice/types.d.cts +1 -1
- package/dist/organizationSlice/types.d.ts +1 -1
- package/dist/releasesSlice/constants.cjs.map +1 -1
- package/dist/releasesSlice/constants.d.cts +1 -1
- package/dist/releasesSlice/constants.d.ts +1 -1
- package/dist/releasesSlice/constants.js.map +1 -1
- package/dist/releasesSlice/index.cjs +0 -1
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +1 -1
- package/dist/releasesSlice/index.d.ts +1 -1
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/mocks.cjs +0 -1
- package/dist/releasesSlice/mocks.cjs.map +1 -1
- package/dist/releasesSlice/mocks.d.cts +3 -6
- package/dist/releasesSlice/mocks.d.ts +3 -6
- package/dist/releasesSlice/mocks.js.map +1 -1
- package/dist/releasesSlice/selectors.cjs +0 -1
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +107 -110
- package/dist/releasesSlice/selectors.d.ts +107 -110
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +39 -16
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +52 -61
- package/dist/releasesSlice/thunks.d.ts +52 -61
- package/dist/releasesSlice/thunks.js +38 -15
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/sockethook.cjs +3 -3
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.js.map +1 -1
- package/dist/{store-BhRxVhtL.d.cts → store-DBUTT4FF.d.cts} +139 -36
- package/dist/{store-BZo47jc-.d.ts → store-gkY5P9Uz.d.ts} +139 -36
- package/dist/store.cjs +0 -1
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +2 -3
- package/dist/store.d.ts +2 -3
- package/dist/store.js.map +1 -1
- package/dist/storehooks.cjs +9 -17
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.d.cts +6 -43
- package/dist/storehooks.d.ts +6 -43
- package/dist/storehooks.js +7 -15
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +51 -67
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +2 -2
- package/dist/thunks.d.ts +2 -2
- package/dist/thunks.js +45 -60
- package/dist/thunks.js.map +1 -1
- package/dist/{types-COdPU2QQ.d.cts → types-B33vKVhi.d.cts} +4 -4
- package/dist/{types-BPyM8Inu.d.ts → types-BjtmX60L.d.ts} +4 -4
- package/dist/useDeploymentDevice.cjs +2 -2
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js.map +1 -1
- package/dist/usersSlice/constants.d.cts +1 -1
- package/dist/usersSlice/constants.d.ts +1 -1
- package/dist/usersSlice/index.cjs +0 -1
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +1 -1
- package/dist/usersSlice/index.d.ts +1 -1
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/mocks.cjs +0 -1
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.d.cts +4 -6
- package/dist/usersSlice/mocks.d.ts +4 -6
- package/dist/usersSlice/mocks.js.map +1 -1
- package/dist/usersSlice/selectors.cjs +0 -1
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +44 -47
- package/dist/usersSlice/selectors.d.ts +44 -47
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/thunks.d.cts +92 -95
- package/dist/usersSlice/thunks.d.ts +92 -95
- package/dist/utils.cjs +2 -3
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +3 -3
- package/dist/utils.js.map +1 -1
- package/package.json +8 -8
- package/dist/index-B3IF6ur9.d.cts +0 -168
- package/dist/index-BFlHWzjv.d.cts +0 -152
- package/dist/index-BbaS7MzW.d.cts +0 -71
- package/dist/index-Bp1WpATs.d.ts +0 -154
- package/dist/index-C6wNUfiV.d.ts +0 -71
- package/dist/index-CJkrL0oA.d.ts +0 -64
- package/dist/index-DaD3yorF.d.ts +0 -168
- package/dist/index-DwACbyUg.d.cts +0 -154
- package/dist/index-UPc3wvVd.d.cts +0 -64
- package/dist/index-ez3oxfRo.d.ts +0 -152
- package/dist/utils-CHBWS_tH.d.ts +0 -105
- package/dist/utils-Do9z5TL1.d.cts +0 -105
- /package/dist/{chunk-CKQMccvm.cjs → rolldown-runtime-D6vf50IK.cjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as Addon } from "./constants-
|
|
2
|
-
import { T as SortOptions } from "./constants-
|
|
3
|
-
import { a as SSO_TYPES } from "./constants-
|
|
1
|
+
import { n as Addon } from "./constants-B_7FCJQX.cjs";
|
|
2
|
+
import { T as SortOptions } from "./constants-_p6w8uEp.cjs";
|
|
3
|
+
import { a as SSO_TYPES } from "./constants-OZiiFKiA.cjs";
|
|
4
4
|
import { AuditLog, BillingInfo, BillingProfile, ConstraintsInfo, Event, SamlMetadata, Tenant } from "@northern.tech/types/MenderTypes";
|
|
5
5
|
|
|
6
6
|
//#region src/organizationSlice/types.d.ts
|
|
@@ -85,4 +85,4 @@ type PricePreview = {
|
|
|
85
85
|
};
|
|
86
86
|
//#endregion
|
|
87
87
|
export { PricePreview as a, ProductTier as c, TenantList as d, Webhook as f, Organization as i, SSOConfig as l, AuditLogSelectionState as n, ProductConfig as o, Card as r, ProductPlan as s, AuditLog$1 as t, Tenant$1 as u };
|
|
88
|
-
//# sourceMappingURL=types-
|
|
88
|
+
//# sourceMappingURL=types-B33vKVhi.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as Addon } from "./constants-
|
|
2
|
-
import { T as SortOptions } from "./constants-
|
|
3
|
-
import { a as SSO_TYPES } from "./constants-
|
|
1
|
+
import { n as Addon } from "./constants-B_7FCJQX.js";
|
|
2
|
+
import { T as SortOptions } from "./constants-OcdoVk6f.js";
|
|
3
|
+
import { a as SSO_TYPES } from "./constants-OZiiFKiA.js";
|
|
4
4
|
import { AuditLog, BillingInfo, BillingProfile, ConstraintsInfo, Event, SamlMetadata, Tenant } from "@northern.tech/types/MenderTypes";
|
|
5
5
|
|
|
6
6
|
//#region src/organizationSlice/types.d.ts
|
|
@@ -85,4 +85,4 @@ type PricePreview = {
|
|
|
85
85
|
};
|
|
86
86
|
//#endregion
|
|
87
87
|
export { PricePreview as a, ProductTier as c, TenantList as d, Webhook as f, Organization as i, SSOConfig as l, AuditLogSelectionState as n, ProductConfig as o, Card as r, ProductPlan as s, AuditLog$1 as t, Tenant$1 as u };
|
|
88
|
-
//# sourceMappingURL=types-
|
|
88
|
+
//# sourceMappingURL=types-BjtmX60L.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
|
|
3
3
|
const require_devicesSlice_selectors = require("./devicesSlice/selectors.cjs");
|
|
4
4
|
const require_store = require("./store.cjs");
|
|
5
5
|
const require_thunks = require("./thunks.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let validator = require("validator");
|
|
8
|
-
validator =
|
|
8
|
+
validator = require_rolldown_runtime.__toESM(validator, 1);
|
|
9
9
|
//#region src/useDeploymentDevice.ts
|
|
10
10
|
const { isUUID } = validator.default;
|
|
11
11
|
const useDeploymentDevice = (deploymentName) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeploymentDevice.cjs","names":["useAppDispatch","useAppSelector","getDevicesById","getDeviceById"],"sources":["../src/useDeploymentDevice.ts"],"sourcesContent":["// Copyright 2023 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 { useEffect, useRef } from 'react';\n\nimport validator from 'validator';\n\nimport { getDevicesById } from './selectors';\nimport { useAppDispatch, useAppSelector } from './store';\nimport { getDeviceById } from './thunks';\n\nconst { isUUID } = validator;\n\nexport const useDeploymentDevice = (deploymentName: string) => {\n const isLoading = useRef(false);\n const dispatch = useAppDispatch();\n const devicesById = useAppSelector(getDevicesById);\n const hasDeviceInfo = !!devicesById[deploymentName];\n\n useEffect(() => {\n if (isLoading.current) {\n return;\n }\n isLoading.current = true;\n if (isUUID(deploymentName) && !hasDeviceInfo) {\n dispatch(getDeviceById(deploymentName))\n .unwrap()\n .then(() => (isLoading.current = false));\n }\n }, [deploymentName, dispatch, hasDeviceInfo]);\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAM,EAAE,WAAW,UAAA;AAEnB,MAAa,uBAAuB,mBAA2B;CAC7D,MAAM,aAAA,GAAA,MAAA,
|
|
1
|
+
{"version":3,"file":"useDeploymentDevice.cjs","names":["useAppDispatch","useAppSelector","getDevicesById","getDeviceById"],"sources":["../src/useDeploymentDevice.ts"],"sourcesContent":["// Copyright 2023 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 { useEffect, useRef } from 'react';\n\nimport validator from 'validator';\n\nimport { getDevicesById } from './selectors';\nimport { useAppDispatch, useAppSelector } from './store';\nimport { getDeviceById } from './thunks';\n\nconst { isUUID } = validator;\n\nexport const useDeploymentDevice = (deploymentName: string) => {\n const isLoading = useRef(false);\n const dispatch = useAppDispatch();\n const devicesById = useAppSelector(getDevicesById);\n const hasDeviceInfo = !!devicesById[deploymentName];\n\n useEffect(() => {\n if (isLoading.current) {\n return;\n }\n isLoading.current = true;\n if (isUUID(deploymentName) && !hasDeviceInfo) {\n dispatch(getDeviceById(deploymentName))\n .unwrap()\n .then(() => (isLoading.current = false));\n }\n }, [deploymentName, dispatch, hasDeviceInfo]);\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAM,EAAE,WAAW,UAAA;AAEnB,MAAa,uBAAuB,mBAA2B;CAC7D,MAAM,aAAA,GAAA,MAAA,OAAA,CAAmB,KAAK;CAC9B,MAAM,WAAWA,cAAAA,eAAe;CAEhC,MAAM,gBAAgB,CAAC,CADHC,cAAAA,eAAeC,+BAAAA,cACD,CAAC,CAAC;CAEpC,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,UAAU,SACZ;EAEF,UAAU,UAAU;EACpB,IAAI,OAAO,cAAc,KAAK,CAAC,eAC7B,SAASC,eAAAA,cAAc,cAAc,CAAC,CAAC,CACpC,OAAO,CAAC,CACR,WAAY,UAAU,UAAU,KAAM;CAE7C,GAAG;EAAC;EAAgB;EAAU;CAAa,CAAC;AAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeploymentDevice.js","names":[],"sources":["../src/useDeploymentDevice.ts"],"sourcesContent":["// Copyright 2023 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 { useEffect, useRef } from 'react';\n\nimport validator from 'validator';\n\nimport { getDevicesById } from './selectors';\nimport { useAppDispatch, useAppSelector } from './store';\nimport { getDeviceById } from './thunks';\n\nconst { isUUID } = validator;\n\nexport const useDeploymentDevice = (deploymentName: string) => {\n const isLoading = useRef(false);\n const dispatch = useAppDispatch();\n const devicesById = useAppSelector(getDevicesById);\n const hasDeviceInfo = !!devicesById[deploymentName];\n\n useEffect(() => {\n if (isLoading.current) {\n return;\n }\n isLoading.current = true;\n if (isUUID(deploymentName) && !hasDeviceInfo) {\n dispatch(getDeviceById(deploymentName))\n .unwrap()\n .then(() => (isLoading.current = false));\n }\n }, [deploymentName, dispatch, hasDeviceInfo]);\n};\n"],"mappings":";;;;;;AAqBA,MAAM,EAAE,WAAW;AAEnB,MAAa,uBAAuB,mBAA2B;CAC7D,MAAM,YAAY,OAAO,
|
|
1
|
+
{"version":3,"file":"useDeploymentDevice.js","names":[],"sources":["../src/useDeploymentDevice.ts"],"sourcesContent":["// Copyright 2023 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 { useEffect, useRef } from 'react';\n\nimport validator from 'validator';\n\nimport { getDevicesById } from './selectors';\nimport { useAppDispatch, useAppSelector } from './store';\nimport { getDeviceById } from './thunks';\n\nconst { isUUID } = validator;\n\nexport const useDeploymentDevice = (deploymentName: string) => {\n const isLoading = useRef(false);\n const dispatch = useAppDispatch();\n const devicesById = useAppSelector(getDevicesById);\n const hasDeviceInfo = !!devicesById[deploymentName];\n\n useEffect(() => {\n if (isLoading.current) {\n return;\n }\n isLoading.current = true;\n if (isUUID(deploymentName) && !hasDeviceInfo) {\n dispatch(getDeviceById(deploymentName))\n .unwrap()\n .then(() => (isLoading.current = false));\n }\n }, [deploymentName, dispatch, hasDeviceInfo]);\n};\n"],"mappings":";;;;;;AAqBA,MAAM,EAAE,WAAW;AAEnB,MAAa,uBAAuB,mBAA2B;CAC7D,MAAM,YAAY,OAAO,KAAK;CAC9B,MAAM,WAAW,eAAe;CAEhC,MAAM,gBAAgB,CAAC,CADH,eAAe,cACD,CAAC,CAAC;CAEpC,gBAAgB;EACd,IAAI,UAAU,SACZ;EAEF,UAAU,UAAU;EACpB,IAAI,OAAO,cAAc,KAAK,CAAC,eAC7B,SAAS,cAAc,cAAc,CAAC,CAAC,CACpC,OAAO,CAAC,CACR,WAAY,UAAU,UAAU,KAAM;CAE7C,GAAG;EAAC;EAAgB;EAAU;CAAa,CAAC;AAC9C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as USER_LOGOUT, c as itemUiPermissionsReducer, i as ReadState, l as settingsKeys, n as PermissionsArea, o as UiPermission, r as READ_STATES, s as checkPermissionsObject, t as OWN_USER_ID } from "../constants-
|
|
1
|
+
import { a as USER_LOGOUT, c as itemUiPermissionsReducer, i as ReadState, l as settingsKeys, n as PermissionsArea, o as UiPermission, r as READ_STATES, s as checkPermissionsObject, t as OWN_USER_ID } from "../constants-Sn4gnNA3.cjs";
|
|
2
2
|
export { OWN_USER_ID, PermissionsArea, READ_STATES, ReadState, USER_LOGOUT, UiPermission, checkPermissionsObject, itemUiPermissionsReducer, settingsKeys };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as USER_LOGOUT, c as itemUiPermissionsReducer, i as ReadState, l as settingsKeys, n as PermissionsArea, o as UiPermission, r as READ_STATES, s as checkPermissionsObject, t as OWN_USER_ID } from "../constants-
|
|
1
|
+
import { a as USER_LOGOUT, c as itemUiPermissionsReducer, i as ReadState, l as settingsKeys, n as PermissionsArea, o as UiPermission, r as READ_STATES, s as checkPermissionsObject, t as OWN_USER_ID } from "../constants-Sn4gnNA3.js";
|
|
2
2
|
export { OWN_USER_ID, PermissionsArea, READ_STATES, ReadState, USER_LOGOUT, UiPermission, checkPermissionsObject, itemUiPermissionsReducer, settingsKeys };
|
|
@@ -2,7 +2,6 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
require("../chunk-CKQMccvm.cjs");
|
|
6
5
|
const require_constants = require("../constants.cjs");
|
|
7
6
|
let _reduxjs_toolkit = require("@reduxjs/toolkit");
|
|
8
7
|
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["defaultPermissionSets","rolesById","READ_STATES"],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 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 { User as BackendUser, DeploymentPhase, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["defaultPermissionSets","rolesById","READ_STATES"],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 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 { User as BackendUser, DeploymentPhase, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-
|
|
1
|
+
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-CSk4ENmk.cjs";
|
|
2
2
|
export { CustomColumn, GlobalSettings, User, UserSession, UserSettings, UserSliceType, actions, _default as default, initialState, sliceName, usersSlice };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-
|
|
1
|
+
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-Cf81vLTi.js";
|
|
2
2
|
export { CustomColumn, GlobalSettings, User, UserSession, UserSettings, UserSliceType, actions, _default as default, initialState, sliceName, usersSlice };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 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 { User as BackendUser, DeploymentPhase, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":";;;AAsBA,MAAa,YAAY;AA+EzB,MAAa,eAA8B;CACzC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 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 { User as BackendUser, DeploymentPhase, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":"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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("../chunk-CKQMccvm.cjs");
|
|
3
2
|
const require_usersSlice_index = require("./index.cjs");
|
|
4
3
|
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
5
4
|
//#region src/usersSlice/mocks.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.cjs","names":["initialState","rolesByName","twoFAStates","rolesById","emptyRole","emptyUiPermissions","uiPermissionsById"],"sources":["../../src/usersSlice/mocks.ts"],"sourcesContent":["// Copyright 2025 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 { emptyRole, emptyUiPermissions, rolesById, rolesByName, twoFAStates, uiPermissionsById } from '../constants';\nimport { initialState } from './index';\n\nconst userId = 'a30a780b-b843-5344-80e3-0fd95a4f6fc3';\n\nexport const mockState = {\n ...initialState,\n byId: {\n a1: { email: 'a@b.com', id: 'a1', created_ts: '2019-01-01T10:30:00.000Z', roles: [rolesByName.admin], verified: true },\n [userId]: { email: 'a2@b.com', id: userId, created_ts: '2019-01-01T12:30:00.000Z', roles: [rolesByName.admin], tfa_status: twoFAStates.enabled }\n },\n currentUser: 'a1',\n globalSettings: { '2fa': 'enabled', id_attribute: undefined, previousFilters: [] },\n rolesById: {\n ...rolesById,\n test: {\n ...emptyRole,\n name: 'test',\n description: 'test description',\n editable: true,\n uiPermissions: {\n ...emptyUiPermissions,\n groups: { testGroup: [uiPermissionsById.read.value] },\n releases: { bar: [uiPermissionsById.read.value] }\n }\n }\n },\n settingsInitialized: true,\n userSettingsInitialized: true,\n userSettings: { '2fa': 'disabled', previousFilters: [], columnSelection: [], onboarding: { something: 'here' }, tooltips: {} }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mocks.cjs","names":["initialState","rolesByName","twoFAStates","rolesById","emptyRole","emptyUiPermissions","uiPermissionsById"],"sources":["../../src/usersSlice/mocks.ts"],"sourcesContent":["// Copyright 2025 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 { emptyRole, emptyUiPermissions, rolesById, rolesByName, twoFAStates, uiPermissionsById } from '../constants';\nimport { initialState } from './index';\n\nconst userId = 'a30a780b-b843-5344-80e3-0fd95a4f6fc3';\n\nexport const mockState = {\n ...initialState,\n byId: {\n a1: { email: 'a@b.com', id: 'a1', created_ts: '2019-01-01T10:30:00.000Z', roles: [rolesByName.admin], verified: true },\n [userId]: { email: 'a2@b.com', id: userId, created_ts: '2019-01-01T12:30:00.000Z', roles: [rolesByName.admin], tfa_status: twoFAStates.enabled }\n },\n currentUser: 'a1',\n globalSettings: { '2fa': 'enabled', id_attribute: undefined, previousFilters: [] },\n rolesById: {\n ...rolesById,\n test: {\n ...emptyRole,\n name: 'test',\n description: 'test description',\n editable: true,\n uiPermissions: {\n ...emptyUiPermissions,\n groups: { testGroup: [uiPermissionsById.read.value] },\n releases: { bar: [uiPermissionsById.read.value] }\n }\n }\n },\n settingsInitialized: true,\n userSettingsInitialized: true,\n userSettings: { '2fa': 'disabled', previousFilters: [], columnSelection: [], onboarding: { something: 'here' }, tooltips: {} }\n};\n"],"mappings":";;;;AAgBA,MAAM,SAAS;AAEf,MAAa,YAAY;CACvB,GAAGA,yBAAAA;CACH,MAAM;EACJ,IAAI;GAAE,OAAO;GAAW,IAAI;GAAM,YAAY;GAA4B,OAAO,CAACC,+BAAAA,YAAY,KAAK;GAAG,UAAU;EAAK;GACpH,SAAS;GAAE,OAAO;GAAY,IAAI;GAAQ,YAAY;GAA4B,OAAO,CAACA,+BAAAA,YAAY,KAAK;GAAG,YAAYC,+BAAAA,YAAY;EAAQ;CACjJ;CACA,aAAa;CACb,gBAAgB;EAAE,OAAO;EAAW,cAAc,KAAA;EAAW,iBAAiB,CAAC;CAAE;CACjF,WAAW;EACT,GAAGC,+BAAAA;EACH,MAAM;GACJ,GAAGC,+BAAAA;GACH,MAAM;GACN,aAAa;GACb,UAAU;GACV,eAAe;IACb,GAAGC,+BAAAA;IACH,QAAQ,EAAE,WAAW,CAACC,+BAAAA,kBAAkB,KAAK,KAAK,EAAE;IACpD,UAAU,EAAE,KAAK,CAACA,+BAAAA,kBAAkB,KAAK,KAAK,EAAE;GAClD;EACF;CACF;CACA,qBAAqB;CACrB,yBAAyB;CACzB,cAAc;EAAE,OAAO;EAAY,iBAAiB,CAAC;EAAG,iBAAiB,CAAC;EAAG,YAAY,EAAE,WAAW,OAAO;EAAG,UAAU,CAAC;CAAE;AAC/H"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { i as ReadState } from "../constants-
|
|
2
|
-
import { i as UserSession, t as CustomColumn } from "../index-
|
|
3
|
-
import * as _$_northern_tech_utils_constants0 from "@northern.tech/utils/constants";
|
|
4
|
-
import * as _$_northern_tech_types_types_gen0 from "@northern.tech/types/types.gen";
|
|
1
|
+
import { i as ReadState } from "../constants-Sn4gnNA3.cjs";
|
|
2
|
+
import { i as UserSession, t as CustomColumn } from "../index-CSk4ENmk.cjs";
|
|
5
3
|
|
|
6
4
|
//#region src/usersSlice/mocks.d.ts
|
|
7
5
|
declare const mockState: {
|
|
@@ -45,7 +43,7 @@ declare const mockState: {
|
|
|
45
43
|
userManagement: string[];
|
|
46
44
|
};
|
|
47
45
|
isCustom?: boolean;
|
|
48
|
-
permissions?:
|
|
46
|
+
permissions?: import("@northern.tech/types/types.gen").RolePermission[];
|
|
49
47
|
};
|
|
50
48
|
};
|
|
51
49
|
settingsInitialized: boolean;
|
|
@@ -61,7 +59,7 @@ declare const mockState: {
|
|
|
61
59
|
};
|
|
62
60
|
currentSession?: UserSession | object;
|
|
63
61
|
customColumns: CustomColumn[];
|
|
64
|
-
permissionSetsById: Record<string,
|
|
62
|
+
permissionSetsById: Record<string, import("@northern.tech/utils/constants").PermissionSet>;
|
|
65
63
|
qrCode: string | null;
|
|
66
64
|
rolesInitialized: boolean;
|
|
67
65
|
showConnectDeviceDialog: boolean;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { i as ReadState } from "../constants-
|
|
2
|
-
import { i as UserSession, t as CustomColumn } from "../index-
|
|
3
|
-
import * as _$_northern_tech_utils_constants0 from "@northern.tech/utils/constants";
|
|
4
|
-
import * as _$_northern_tech_types_types_gen0 from "@northern.tech/types/types.gen";
|
|
1
|
+
import { i as ReadState } from "../constants-Sn4gnNA3.js";
|
|
2
|
+
import { i as UserSession, t as CustomColumn } from "../index-Cf81vLTi.js";
|
|
5
3
|
|
|
6
4
|
//#region src/usersSlice/mocks.d.ts
|
|
7
5
|
declare const mockState: {
|
|
@@ -45,7 +43,7 @@ declare const mockState: {
|
|
|
45
43
|
userManagement: string[];
|
|
46
44
|
};
|
|
47
45
|
isCustom?: boolean;
|
|
48
|
-
permissions?:
|
|
46
|
+
permissions?: import("@northern.tech/types/types.gen").RolePermission[];
|
|
49
47
|
};
|
|
50
48
|
};
|
|
51
49
|
settingsInitialized: boolean;
|
|
@@ -61,7 +59,7 @@ declare const mockState: {
|
|
|
61
59
|
};
|
|
62
60
|
currentSession?: UserSession | object;
|
|
63
61
|
customColumns: CustomColumn[];
|
|
64
|
-
permissionSetsById: Record<string,
|
|
62
|
+
permissionSetsById: Record<string, import("@northern.tech/utils/constants").PermissionSet>;
|
|
65
63
|
qrCode: string | null;
|
|
66
64
|
rolesInitialized: boolean;
|
|
67
65
|
showConnectDeviceDialog: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.js","names":[],"sources":["../../src/usersSlice/mocks.ts"],"sourcesContent":["// Copyright 2025 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 { emptyRole, emptyUiPermissions, rolesById, rolesByName, twoFAStates, uiPermissionsById } from '../constants';\nimport { initialState } from './index';\n\nconst userId = 'a30a780b-b843-5344-80e3-0fd95a4f6fc3';\n\nexport const mockState = {\n ...initialState,\n byId: {\n a1: { email: 'a@b.com', id: 'a1', created_ts: '2019-01-01T10:30:00.000Z', roles: [rolesByName.admin], verified: true },\n [userId]: { email: 'a2@b.com', id: userId, created_ts: '2019-01-01T12:30:00.000Z', roles: [rolesByName.admin], tfa_status: twoFAStates.enabled }\n },\n currentUser: 'a1',\n globalSettings: { '2fa': 'enabled', id_attribute: undefined, previousFilters: [] },\n rolesById: {\n ...rolesById,\n test: {\n ...emptyRole,\n name: 'test',\n description: 'test description',\n editable: true,\n uiPermissions: {\n ...emptyUiPermissions,\n groups: { testGroup: [uiPermissionsById.read.value] },\n releases: { bar: [uiPermissionsById.read.value] }\n }\n }\n },\n settingsInitialized: true,\n userSettingsInitialized: true,\n userSettings: { '2fa': 'disabled', previousFilters: [], columnSelection: [], onboarding: { something: 'here' }, tooltips: {} }\n};\n"],"mappings":";;;AAgBA,MAAM,SAAS;AAEf,MAAa,YAAY;CACvB,GAAG;CACH,MAAM;EACJ,IAAI;GAAE,OAAO;GAAW,IAAI;GAAM,YAAY;GAA4B,OAAO,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"mocks.js","names":[],"sources":["../../src/usersSlice/mocks.ts"],"sourcesContent":["// Copyright 2025 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 { emptyRole, emptyUiPermissions, rolesById, rolesByName, twoFAStates, uiPermissionsById } from '../constants';\nimport { initialState } from './index';\n\nconst userId = 'a30a780b-b843-5344-80e3-0fd95a4f6fc3';\n\nexport const mockState = {\n ...initialState,\n byId: {\n a1: { email: 'a@b.com', id: 'a1', created_ts: '2019-01-01T10:30:00.000Z', roles: [rolesByName.admin], verified: true },\n [userId]: { email: 'a2@b.com', id: userId, created_ts: '2019-01-01T12:30:00.000Z', roles: [rolesByName.admin], tfa_status: twoFAStates.enabled }\n },\n currentUser: 'a1',\n globalSettings: { '2fa': 'enabled', id_attribute: undefined, previousFilters: [] },\n rolesById: {\n ...rolesById,\n test: {\n ...emptyRole,\n name: 'test',\n description: 'test description',\n editable: true,\n uiPermissions: {\n ...emptyUiPermissions,\n groups: { testGroup: [uiPermissionsById.read.value] },\n releases: { bar: [uiPermissionsById.read.value] }\n }\n }\n },\n settingsInitialized: true,\n userSettingsInitialized: true,\n userSettings: { '2fa': 'disabled', previousFilters: [], columnSelection: [], onboarding: { something: 'here' }, tooltips: {} }\n};\n"],"mappings":";;;AAgBA,MAAM,SAAS;AAEf,MAAa,YAAY;CACvB,GAAG;CACH,MAAM;EACJ,IAAI;GAAE,OAAO;GAAW,IAAI;GAAM,YAAY;GAA4B,OAAO,CAAC,YAAY,KAAK;GAAG,UAAU;EAAK;GACpH,SAAS;GAAE,OAAO;GAAY,IAAI;GAAQ,YAAY;GAA4B,OAAO,CAAC,YAAY,KAAK;GAAG,YAAY,YAAY;EAAQ;CACjJ;CACA,aAAa;CACb,gBAAgB;EAAE,OAAO;EAAW,cAAc,KAAA;EAAW,iBAAiB,CAAC;CAAE;CACjF,WAAW;EACT,GAAG;EACH,MAAM;GACJ,GAAG;GACH,MAAM;GACN,aAAa;GACb,UAAU;GACV,eAAe;IACb,GAAG;IACH,QAAQ,EAAE,WAAW,CAAC,kBAAkB,KAAK,KAAK,EAAE;IACpD,UAAU,EAAE,KAAK,CAAC,kBAAkB,KAAK,KAAK,EAAE;GAClD;EACF;CACF;CACA,qBAAqB;CACrB,yBAAyB;CACzB,cAAc;EAAE,OAAO;EAAY,iBAAiB,CAAC;EAAG,iBAAiB,CAAC;EAAG,YAAY,EAAE,WAAW,OAAO;EAAG,UAAU,CAAC;CAAE;AAC/H"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.cjs","names":["isDarkMode","READ_STATES","twoFAStates","defaultIdAttribute","DEVICE_ONLINE_CUTOFF"],"sources":["../../src/usersSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 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 { createSelector } from '@reduxjs/toolkit';\n\nimport { DEVICE_ONLINE_CUTOFF, defaultIdAttribute } from '../constants';\nimport { twoFAStates } from '../constants';\nimport type { RootState } from '../store';\nimport { isDarkMode } from '../utils';\nimport { READ_STATES } from './constants';\nimport type { User } from './index';\n\nconst emptyObject = {} as User;\n\nexport const getRolesById = (state: RootState) => state.users.rolesById;\nexport const getTooltipsById = (state: RootState) => state.users.tooltips.byId;\nexport const getGlobalSettings = (state: RootState) => state.users.globalSettings;\nexport const getGlobalSettingsInitialized = (state: RootState) => state.users.settingsInitialized;\nexport const getUserSettingsInitialized = (state: RootState) => state.users.userSettingsInitialized;\nconst getCurrentUserId = (state: RootState) => state.users.currentUser;\nexport const getUsersById = (state: RootState) => state.users.byId;\n\nexport const getUsersList = createSelector([getUsersById], usersById => Object.values(usersById));\nexport const getCurrentUser = createSelector([getUsersById, getCurrentUserId], (usersById, userId) =>\n userId ? (usersById[userId] ?? emptyObject) : emptyObject\n);\nexport const getUserSettings = (state: RootState) => state.users.userSettings;\nexport const getSelectedDeviceAttribute = createSelector([getUserSettings], ({ columnSelection }) =>\n columnSelection.map(attribute => ({ attribute: attribute.key, scope: attribute.scope }))\n);\nexport const getIsDarkMode = createSelector([getUserSettings], ({ mode }) => isDarkMode(mode ?? ''));\n\nexport const getReadAllHelptips = createSelector([getTooltipsById], tooltips =>\n Object.values(tooltips).every(({ readState }) => readState === READ_STATES.read)\n);\n\nexport const getTooltipsState = createSelector([getTooltipsById, getUserSettings], (byId, { tooltips = {} }) =>\n Object.entries(byId).reduce(\n (accu, [id, value]) => {\n accu[id] = { ...accu[id], ...value };\n return accu;\n },\n { ...tooltips }\n )\n);\n\nexport const getHas2FA = createSelector(\n [getCurrentUser],\n currentUser => currentUser.hasOwnProperty('tfa_status') && (currentUser as User).tfa_status === twoFAStates.enabled\n);\n\nexport const getIdAttribute = createSelector([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);\n\nexport const getOfflineThresholdSettings = createSelector([getGlobalSettings], ({ offlineThreshold }) => ({\n interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,\n intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName\n}));\n\nexport const getRolesList = createSelector([getRolesById], rolesById => Object.entries(rolesById).map(([value, role]) => ({ value, ...role })));\n\nexport const getCurrentSession = (state: RootState) => state.users.currentSession;\nexport const getRolesInitialized = (state: RootState) => state.users.rolesInitialized;\n\nexport const getSecurityAlertDismissedTimestamp = (state: RootState) => state.users.userSettings.securityAlertDismissedTimestamp;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"selectors.cjs","names":["isDarkMode","READ_STATES","twoFAStates","defaultIdAttribute","DEVICE_ONLINE_CUTOFF"],"sources":["../../src/usersSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 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 { createSelector } from '@reduxjs/toolkit';\n\nimport { DEVICE_ONLINE_CUTOFF, defaultIdAttribute } from '../constants';\nimport { twoFAStates } from '../constants';\nimport type { RootState } from '../store';\nimport { isDarkMode } from '../utils';\nimport { READ_STATES } from './constants';\nimport type { User } from './index';\n\nconst emptyObject = {} as User;\n\nexport const getRolesById = (state: RootState) => state.users.rolesById;\nexport const getTooltipsById = (state: RootState) => state.users.tooltips.byId;\nexport const getGlobalSettings = (state: RootState) => state.users.globalSettings;\nexport const getGlobalSettingsInitialized = (state: RootState) => state.users.settingsInitialized;\nexport const getUserSettingsInitialized = (state: RootState) => state.users.userSettingsInitialized;\nconst getCurrentUserId = (state: RootState) => state.users.currentUser;\nexport const getUsersById = (state: RootState) => state.users.byId;\n\nexport const getUsersList = createSelector([getUsersById], usersById => Object.values(usersById));\nexport const getCurrentUser = createSelector([getUsersById, getCurrentUserId], (usersById, userId) =>\n userId ? (usersById[userId] ?? emptyObject) : emptyObject\n);\nexport const getUserSettings = (state: RootState) => state.users.userSettings;\nexport const getSelectedDeviceAttribute = createSelector([getUserSettings], ({ columnSelection }) =>\n columnSelection.map(attribute => ({ attribute: attribute.key, scope: attribute.scope }))\n);\nexport const getIsDarkMode = createSelector([getUserSettings], ({ mode }) => isDarkMode(mode ?? ''));\n\nexport const getReadAllHelptips = createSelector([getTooltipsById], tooltips =>\n Object.values(tooltips).every(({ readState }) => readState === READ_STATES.read)\n);\n\nexport const getTooltipsState = createSelector([getTooltipsById, getUserSettings], (byId, { tooltips = {} }) =>\n Object.entries(byId).reduce(\n (accu, [id, value]) => {\n accu[id] = { ...accu[id], ...value };\n return accu;\n },\n { ...tooltips }\n )\n);\n\nexport const getHas2FA = createSelector(\n [getCurrentUser],\n currentUser => currentUser.hasOwnProperty('tfa_status') && (currentUser as User).tfa_status === twoFAStates.enabled\n);\n\nexport const getIdAttribute = createSelector([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);\n\nexport const getOfflineThresholdSettings = createSelector([getGlobalSettings], ({ offlineThreshold }) => ({\n interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,\n intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName\n}));\n\nexport const getRolesList = createSelector([getRolesById], rolesById => Object.entries(rolesById).map(([value, role]) => ({ value, ...role })));\n\nexport const getCurrentSession = (state: RootState) => state.users.currentSession;\nexport const getRolesInitialized = (state: RootState) => state.users.rolesInitialized;\n\nexport const getSecurityAlertDismissedTimestamp = (state: RootState) => state.users.userSettings.securityAlertDismissedTimestamp;\n"],"mappings":";;;;;;AAsBA,MAAM,cAAc,CAAC;AAErB,MAAa,gBAAgB,UAAqB,MAAM,MAAM;AAC9D,MAAa,mBAAmB,UAAqB,MAAM,MAAM,SAAS;AAC1E,MAAa,qBAAqB,UAAqB,MAAM,MAAM;AACnE,MAAa,gCAAgC,UAAqB,MAAM,MAAM;AAC9E,MAAa,8BAA8B,UAAqB,MAAM,MAAM;AAC5E,MAAM,oBAAoB,UAAqB,MAAM,MAAM;AAC3D,MAAa,gBAAgB,UAAqB,MAAM,MAAM;AAE9D,MAAa,gBAAA,GAAA,iBAAA,eAAA,CAA8B,CAAC,YAAY,IAAG,cAAa,OAAO,OAAO,SAAS,CAAC;AAChG,MAAa,kBAAA,GAAA,iBAAA,eAAA,CAAgC,CAAC,cAAc,gBAAgB,IAAI,WAAW,WACzF,SAAU,UAAU,WAAW,cAAe,WAChD;AACA,MAAa,mBAAmB,UAAqB,MAAM,MAAM;AACjE,MAAa,8BAAA,GAAA,iBAAA,eAAA,CAA4C,CAAC,eAAe,IAAI,EAAE,sBAC7E,gBAAgB,KAAI,eAAc;CAAE,WAAW,UAAU;CAAK,OAAO,UAAU;AAAM,EAAE,CACzF;AACA,MAAa,iBAAA,GAAA,iBAAA,eAAA,CAA+B,CAAC,eAAe,IAAI,EAAE,WAAWA,cAAAA,WAAW,QAAQ,EAAE,CAAC;AAEnG,MAAa,sBAAA,GAAA,iBAAA,eAAA,CAAoC,CAAC,eAAe,IAAG,aAClE,OAAO,OAAO,QAAQ,CAAC,CAAC,OAAO,EAAE,gBAAgB,cAAcC,kBAAAA,YAAY,IAAI,CACjF;AAEA,MAAa,oBAAA,GAAA,iBAAA,eAAA,CAAkC,CAAC,iBAAiB,eAAe,IAAI,MAAM,EAAE,WAAW,CAAC,QACtG,OAAO,QAAQ,IAAI,CAAC,CAAC,QAClB,MAAM,CAAC,IAAI,WAAW;CACrB,KAAK,MAAM;EAAE,GAAG,KAAK;EAAK,GAAG;CAAM;CACnC,OAAO;AACT,GACA,EAAE,GAAG,SAAS,CAChB,CACF;AAEA,MAAa,aAAA,GAAA,iBAAA,eAAA,CACX,CAAC,cAAc,IACf,gBAAe,YAAY,eAAe,YAAY,KAAM,YAAqB,eAAeC,+BAAAA,YAAY,OAC9G;AAEA,MAAa,kBAAA,GAAA,iBAAA,eAAA,CAAgC,CAAC,iBAAiB,IAAI,EAAE,eAAe,EAAE,GAAGC,kBAAAA,mBAAmB,QAAQ,YAAY;AAEhI,MAAa,+BAAA,GAAA,iBAAA,eAAA,CAA6C,CAAC,iBAAiB,IAAI,EAAE,wBAAwB;CACxG,UAAU,kBAAkB,YAAYC,kBAAAA,qBAAqB;CAC7D,cAAc,kBAAkB,gBAAgBA,kBAAAA,qBAAqB;AACvE,EAAE;AAEF,MAAa,gBAAA,GAAA,iBAAA,eAAA,CAA8B,CAAC,YAAY,IAAG,cAAa,OAAO,QAAQ,SAAS,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW;CAAE;CAAO,GAAG;AAAK,EAAE,CAAC;AAE9I,MAAa,qBAAqB,UAAqB,MAAM,MAAM;AACnE,MAAa,uBAAuB,UAAqB,MAAM,MAAM;AAErE,MAAa,sCAAsC,UAAqB,MAAM,MAAM,aAAa"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { i as ReadState } from "../constants-
|
|
2
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "../index-
|
|
3
|
-
import { i as ReleaseSliceType } from "../index-
|
|
4
|
-
import { n as OnboardingSliceType } from "../index-
|
|
5
|
-
import { o as DeploymentsSliceType } from "../index-
|
|
6
|
-
import { s as DeviceSliceType } from "../index-
|
|
7
|
-
import { t as AppSliceType } from "../index-
|
|
8
|
-
import { t as MonitorSliceType } from "../index-
|
|
9
|
-
import { t as OrganizationSliceType } from "../index-
|
|
10
|
-
import { r as RootState } from "../store-
|
|
11
|
-
import * as _$_northern_tech_utils_constants0 from "@northern.tech/utils/constants";
|
|
12
|
-
import * as _$_northern_tech_types_types_gen0 from "@northern.tech/types/types.gen";
|
|
13
|
-
import * as _$reselect from "reselect";
|
|
1
|
+
import { i as ReadState } from "../constants-Sn4gnNA3.cjs";
|
|
2
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "../index-CSk4ENmk.cjs";
|
|
3
|
+
import { i as ReleaseSliceType } from "../index-Zs9RnVoR.cjs";
|
|
4
|
+
import { n as OnboardingSliceType } from "../index-DBUt8xVc.cjs";
|
|
5
|
+
import { o as DeploymentsSliceType } from "../index-EPmsL6Lb.cjs";
|
|
6
|
+
import { s as DeviceSliceType } from "../index-DbfM03Gj.cjs";
|
|
7
|
+
import { t as AppSliceType } from "../index-C8QadAm7.cjs";
|
|
8
|
+
import { t as MonitorSliceType } from "../index-5Q-iI4EB.cjs";
|
|
9
|
+
import { t as OrganizationSliceType } from "../index-Bj3OArhr.cjs";
|
|
10
|
+
import { r as RootState } from "../store-DBUTT4FF.cjs";
|
|
14
11
|
|
|
15
12
|
//#region src/usersSlice/selectors.d.ts
|
|
16
|
-
declare const getRolesById: (state: RootState) => Record<string,
|
|
13
|
+
declare const getRolesById: (state: RootState) => Record<string, import("@northern.tech/utils/constants").Role>;
|
|
17
14
|
declare const getTooltipsById: (state: RootState) => Record<string, {
|
|
18
15
|
readState: ReadState;
|
|
19
16
|
}>;
|
|
@@ -48,8 +45,8 @@ declare const getUsersList: ((state: {
|
|
|
48
45
|
dependencyRecomputations: () => number;
|
|
49
46
|
resetDependencyRecomputations: () => void;
|
|
50
47
|
} & {
|
|
51
|
-
memoize: typeof
|
|
52
|
-
argsMemoize: typeof
|
|
48
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
49
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
53
50
|
};
|
|
54
51
|
declare const getCurrentUser: ((state: {
|
|
55
52
|
app: AppSliceType;
|
|
@@ -78,8 +75,8 @@ declare const getCurrentUser: ((state: {
|
|
|
78
75
|
dependencyRecomputations: () => number;
|
|
79
76
|
resetDependencyRecomputations: () => void;
|
|
80
77
|
} & {
|
|
81
|
-
memoize: typeof
|
|
82
|
-
argsMemoize: typeof
|
|
78
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
79
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
83
80
|
};
|
|
84
81
|
declare const getUserSettings: (state: RootState) => UserSettings;
|
|
85
82
|
declare const getSelectedDeviceAttribute: ((state: {
|
|
@@ -121,8 +118,8 @@ declare const getSelectedDeviceAttribute: ((state: {
|
|
|
121
118
|
dependencyRecomputations: () => number;
|
|
122
119
|
resetDependencyRecomputations: () => void;
|
|
123
120
|
} & {
|
|
124
|
-
memoize: typeof
|
|
125
|
-
argsMemoize: typeof
|
|
121
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
122
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
126
123
|
};
|
|
127
124
|
declare const getIsDarkMode: ((state: {
|
|
128
125
|
app: AppSliceType;
|
|
@@ -151,8 +148,8 @@ declare const getIsDarkMode: ((state: {
|
|
|
151
148
|
dependencyRecomputations: () => number;
|
|
152
149
|
resetDependencyRecomputations: () => void;
|
|
153
150
|
} & {
|
|
154
|
-
memoize: typeof
|
|
155
|
-
argsMemoize: typeof
|
|
151
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
152
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
156
153
|
};
|
|
157
154
|
declare const getReadAllHelptips: ((state: {
|
|
158
155
|
app: AppSliceType;
|
|
@@ -187,8 +184,8 @@ declare const getReadAllHelptips: ((state: {
|
|
|
187
184
|
dependencyRecomputations: () => number;
|
|
188
185
|
resetDependencyRecomputations: () => void;
|
|
189
186
|
} & {
|
|
190
|
-
memoize: typeof
|
|
191
|
-
argsMemoize: typeof
|
|
187
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
188
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
192
189
|
};
|
|
193
190
|
declare const getTooltipsState: ((state: {
|
|
194
191
|
app: AppSliceType;
|
|
@@ -223,8 +220,8 @@ declare const getTooltipsState: ((state: {
|
|
|
223
220
|
dependencyRecomputations: () => number;
|
|
224
221
|
resetDependencyRecomputations: () => void;
|
|
225
222
|
} & {
|
|
226
|
-
memoize: typeof
|
|
227
|
-
argsMemoize: typeof
|
|
223
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
224
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
228
225
|
};
|
|
229
226
|
declare const getHas2FA: ((state: {
|
|
230
227
|
app: AppSliceType;
|
|
@@ -274,16 +271,16 @@ declare const getHas2FA: ((state: {
|
|
|
274
271
|
dependencyRecomputations: () => number;
|
|
275
272
|
resetDependencyRecomputations: () => void;
|
|
276
273
|
} & {
|
|
277
|
-
memoize: typeof
|
|
278
|
-
argsMemoize: typeof
|
|
274
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
275
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
279
276
|
}];
|
|
280
277
|
recomputations: () => number;
|
|
281
278
|
resetRecomputations: () => void;
|
|
282
279
|
dependencyRecomputations: () => number;
|
|
283
280
|
resetDependencyRecomputations: () => void;
|
|
284
281
|
} & {
|
|
285
|
-
memoize: typeof
|
|
286
|
-
argsMemoize: typeof
|
|
282
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
283
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
287
284
|
};
|
|
288
285
|
declare const getIdAttribute: ((state: {
|
|
289
286
|
app: AppSliceType;
|
|
@@ -324,8 +321,8 @@ declare const getIdAttribute: ((state: {
|
|
|
324
321
|
dependencyRecomputations: () => number;
|
|
325
322
|
resetDependencyRecomputations: () => void;
|
|
326
323
|
} & {
|
|
327
|
-
memoize: typeof
|
|
328
|
-
argsMemoize: typeof
|
|
324
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
325
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
329
326
|
};
|
|
330
327
|
declare const getOfflineThresholdSettings: ((state: {
|
|
331
328
|
app: AppSliceType;
|
|
@@ -366,8 +363,8 @@ declare const getOfflineThresholdSettings: ((state: {
|
|
|
366
363
|
dependencyRecomputations: () => number;
|
|
367
364
|
resetDependencyRecomputations: () => void;
|
|
368
365
|
} & {
|
|
369
|
-
memoize: typeof
|
|
370
|
-
argsMemoize: typeof
|
|
366
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
367
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
371
368
|
};
|
|
372
369
|
declare const getRolesList: ((state: {
|
|
373
370
|
app: AppSliceType;
|
|
@@ -381,8 +378,8 @@ declare const getRolesList: ((state: {
|
|
|
381
378
|
}) => {
|
|
382
379
|
name: string;
|
|
383
380
|
description?: string;
|
|
384
|
-
permissions?: Array<
|
|
385
|
-
permission_sets_with_scope?: Array<
|
|
381
|
+
permissions?: Array<import("@northern.tech/types/types.gen").RolePermission>;
|
|
382
|
+
permission_sets_with_scope?: Array<import("@northern.tech/types/types.gen").PermissionSetWithScope>;
|
|
386
383
|
editable?: boolean;
|
|
387
384
|
isCustom?: boolean;
|
|
388
385
|
uiPermissions: Readonly<{
|
|
@@ -399,11 +396,11 @@ declare const getRolesList: ((state: {
|
|
|
399
396
|
resultsCount: () => number;
|
|
400
397
|
resetResultsCount: () => void;
|
|
401
398
|
} & {
|
|
402
|
-
resultFunc: (resultFuncArgs_0: Record<string,
|
|
399
|
+
resultFunc: (resultFuncArgs_0: Record<string, import("@northern.tech/utils/constants").Role>) => {
|
|
403
400
|
name: string;
|
|
404
401
|
description?: string;
|
|
405
|
-
permissions?: Array<
|
|
406
|
-
permission_sets_with_scope?: Array<
|
|
402
|
+
permissions?: Array<import("@northern.tech/types/types.gen").RolePermission>;
|
|
403
|
+
permission_sets_with_scope?: Array<import("@northern.tech/types/types.gen").PermissionSetWithScope>;
|
|
407
404
|
editable?: boolean;
|
|
408
405
|
isCustom?: boolean;
|
|
409
406
|
uiPermissions: Readonly<{
|
|
@@ -416,11 +413,11 @@ declare const getRolesList: ((state: {
|
|
|
416
413
|
}>;
|
|
417
414
|
value: string;
|
|
418
415
|
}[];
|
|
419
|
-
memoizedResultFunc: ((resultFuncArgs_0: Record<string,
|
|
416
|
+
memoizedResultFunc: ((resultFuncArgs_0: Record<string, import("@northern.tech/utils/constants").Role>) => {
|
|
420
417
|
name: string;
|
|
421
418
|
description?: string;
|
|
422
|
-
permissions?: Array<
|
|
423
|
-
permission_sets_with_scope?: Array<
|
|
419
|
+
permissions?: Array<import("@northern.tech/types/types.gen").RolePermission>;
|
|
420
|
+
permission_sets_with_scope?: Array<import("@northern.tech/types/types.gen").PermissionSetWithScope>;
|
|
424
421
|
editable?: boolean;
|
|
425
422
|
isCustom?: boolean;
|
|
426
423
|
uiPermissions: Readonly<{
|
|
@@ -440,8 +437,8 @@ declare const getRolesList: ((state: {
|
|
|
440
437
|
lastResult: () => {
|
|
441
438
|
name: string;
|
|
442
439
|
description?: string;
|
|
443
|
-
permissions?: Array<
|
|
444
|
-
permission_sets_with_scope?: Array<
|
|
440
|
+
permissions?: Array<import("@northern.tech/types/types.gen").RolePermission>;
|
|
441
|
+
permission_sets_with_scope?: Array<import("@northern.tech/types/types.gen").PermissionSetWithScope>;
|
|
445
442
|
editable?: boolean;
|
|
446
443
|
isCustom?: boolean;
|
|
447
444
|
uiPermissions: Readonly<{
|
|
@@ -454,14 +451,14 @@ declare const getRolesList: ((state: {
|
|
|
454
451
|
}>;
|
|
455
452
|
value: string;
|
|
456
453
|
}[];
|
|
457
|
-
dependencies: [(state: RootState) => Record<string,
|
|
454
|
+
dependencies: [(state: RootState) => Record<string, import("@northern.tech/utils/constants").Role>];
|
|
458
455
|
recomputations: () => number;
|
|
459
456
|
resetRecomputations: () => void;
|
|
460
457
|
dependencyRecomputations: () => number;
|
|
461
458
|
resetDependencyRecomputations: () => void;
|
|
462
459
|
} & {
|
|
463
|
-
memoize: typeof
|
|
464
|
-
argsMemoize: typeof
|
|
460
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
461
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
465
462
|
};
|
|
466
463
|
declare const getCurrentSession: (state: RootState) => object | UserSession | undefined;
|
|
467
464
|
declare const getRolesInitialized: (state: RootState) => boolean;
|