@northern.tech/store 0.46.5 → 0.48.0
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 +6 -6
- package/dist/actions.d.ts +6 -6
- package/dist/api/general-api.cjs +2 -2
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.js +1 -1
- package/dist/api/general-api.js.map +1 -1
- package/dist/appSlice/constants.cjs +3 -4
- 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 +1 -2
- package/dist/appSlice/constants.js.map +1 -1
- package/dist/appSlice/index.d.cts +1 -1
- package/dist/appSlice/index.d.ts +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/appSlice/mocks.d.cts +1 -1
- package/dist/appSlice/mocks.d.ts +1 -1
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +2 -130
- package/dist/appSlice/selectors.d.ts +2 -130
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/thunks.d.cts +2 -2
- package/dist/appSlice/thunks.d.ts +2 -2
- package/dist/auth.cjs +3 -3
- 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 +4 -3
- package/dist/commonConstants.d.cts +2 -2
- package/dist/commonConstants.d.ts +2 -2
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +1 -1
- package/dist/commonSelectors.d.cts +80 -373
- package/dist/commonSelectors.d.ts +80 -373
- package/dist/commonSelectors.js +1 -1
- package/dist/constants-3gsHyxWr.d.ts +109 -0
- package/dist/{constants-B3NH1IQi.d.ts → constants-DOnQ-UzD.d.cts} +2 -3
- package/dist/{constants-B3NH1IQi.d.cts → constants-DOnQ-UzD.d.ts} +2 -3
- package/dist/{constants-MVizYy89.cjs → constants-DsOnY5o5.cjs} +1 -279
- package/dist/constants-DsOnY5o5.cjs.map +1 -0
- package/dist/constants-hMMMdt0R.d.cts +109 -0
- package/dist/{constants-nKSWZ8oD.d.ts → constants-tC3RR_Oo.d.cts} +2 -3
- package/dist/{constants-nKSWZ8oD.d.cts → constants-tC3RR_Oo.d.ts} +2 -3
- package/dist/{constants-D5hACLhF.js → constants-yul-O5hD.js} +3 -269
- package/dist/constants-yul-O5hD.js.map +1 -0
- package/dist/constants.cjs +6 -6
- package/dist/constants.d.cts +4 -4
- package/dist/constants.d.ts +4 -4
- package/dist/constants.js +2 -2
- 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.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +2 -97
- package/dist/deploymentsSlice/selectors.d.ts +2 -97
- package/dist/deploymentsSlice/selectors.js +1 -1
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +13 -13
- package/dist/deploymentsSlice/thunks.d.ts +13 -13
- package/dist/devicesSlice/constants.cjs +1 -1
- package/dist/devicesSlice/constants.d.cts +1 -1
- package/dist/devicesSlice/constants.d.ts +1 -1
- package/dist/devicesSlice/constants.js +1 -1
- package/dist/devicesSlice/index.d.cts +1 -1
- package/dist/devicesSlice/index.d.ts +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.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +2 -887
- package/dist/devicesSlice/selectors.d.ts +2 -887
- package/dist/devicesSlice/selectors.js +1 -1
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +4 -4
- package/dist/devicesSlice/thunks.d.ts +4 -4
- package/dist/{index-fGVC5s1C.d.cts → index-B9jUHGsM.d.cts} +2 -2
- package/dist/{index-xxqlerg5.d.ts → index-BMi8ZqpV.d.ts} +2 -2
- package/dist/{index-BKU1G9-x.d.cts → index-BoZjwQHk.d.cts} +2 -2
- package/dist/{index-BfmRpbiJ.d.cts → index-C-6WkMAo.d.cts} +2 -2
- package/dist/{index-CRqnH_go.d.ts → index-CD39K38q.d.ts} +2 -2
- package/dist/{index-KxRmyFLr.d.cts → index-D8O1HJ8Q.d.cts} +2 -2
- package/dist/{index-BMsafOyJ.d.ts → index-DXfbW2gi.d.ts} +2 -2
- package/dist/{index-HjOSTTGF.d.cts → index-Dd_guNwA.d.cts} +2 -2
- package/dist/{index-CqhXqGLt.d.cts → index-DlTiYWBe.d.cts} +2 -2
- package/dist/{index-BVNS-Aut.d.ts → index-I82Wu-Ah.d.ts} +2 -2
- package/dist/{index--SKVGToc.d.ts → index-KQNyWRoG.d.ts} +2 -2
- package/dist/{index-D9GJhX1I.d.ts → index-uhmZ9qaP.d.ts} +2 -2
- package/dist/locationutils.cjs +1 -1
- package/dist/locationutils.d.cts +2 -2
- package/dist/locationutils.d.ts +2 -2
- package/dist/locationutils.js +1 -1
- package/dist/mockState.cjs +24 -0
- package/dist/mockState.cjs.map +1 -0
- package/dist/mockState.d.cts +7 -0
- package/dist/mockState.d.ts +7 -0
- package/dist/mockState.js +23 -0
- package/dist/mockState.js.map +1 -0
- package/dist/monitorSlice/constants.d.cts +1 -1
- package/dist/monitorSlice/constants.d.ts +1 -1
- package/dist/monitorSlice/index.d.cts +1 -1
- package/dist/monitorSlice/index.d.ts +1 -1
- package/dist/monitorSlice/index.js +1 -1
- package/dist/monitorSlice/mocks.d.cts +1 -1
- package/dist/monitorSlice/mocks.d.ts +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/selectors.cjs.map +1 -1
- package/dist/monitorSlice/selectors.d.cts +2 -10
- package/dist/monitorSlice/selectors.d.ts +2 -10
- package/dist/monitorSlice/selectors.js.map +1 -1
- package/dist/monitorSlice/thunks.cjs +2 -3
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +4 -4
- package/dist/monitorSlice/thunks.d.ts +4 -4
- package/dist/monitorSlice/thunks.js +3 -2
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/selectors.cjs.map +1 -1
- package/dist/onboardingSlice/selectors.d.cts +2 -6
- package/dist/onboardingSlice/selectors.d.ts +2 -6
- package/dist/onboardingSlice/selectors.js.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +3 -3
- package/dist/onboardingSlice/thunks.d.ts +3 -3
- 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.d.cts +1 -1
- package/dist/organizationSlice/index.d.ts +1 -1
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.d.cts +3 -3
- package/dist/organizationSlice/mocks.d.ts +3 -3
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.cjs +1 -1
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +2 -472
- package/dist/organizationSlice/selectors.d.ts +2 -472
- package/dist/organizationSlice/selectors.js +1 -1
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +25 -21
- package/dist/organizationSlice/thunks.d.ts +25 -21
- package/dist/organizationSlice/types.d.cts +1 -1
- package/dist/organizationSlice/types.d.ts +1 -1
- package/dist/releasesSlice/constants.cjs +0 -2
- 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 +1 -2
- package/dist/releasesSlice/constants.js.map +1 -1
- package/dist/releasesSlice/index.d.cts +1 -1
- package/dist/releasesSlice/index.d.ts +1 -1
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +2 -795
- package/dist/releasesSlice/selectors.d.ts +2 -795
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +18 -18
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +4 -4
- package/dist/releasesSlice/thunks.d.ts +4 -4
- package/dist/releasesSlice/thunks.js +3 -2
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/selectors-CH-yXu-7.d.cts +84 -0
- package/dist/selectors-CQYkG1VI.d.cts +9 -0
- package/dist/selectors-CR0q7rXC.d.cts +593 -0
- package/dist/selectors-CdCZGn7e.d.cts +99 -0
- package/dist/selectors-CdllyZyW.d.cts +363 -0
- package/dist/selectors-CftbLtXH.d.cts +14 -0
- package/dist/selectors-D2j3_Mnp.d.ts +363 -0
- package/dist/selectors-D78O3T1o.d.ts +99 -0
- package/dist/selectors-D9t4It2i.d.ts +84 -0
- package/dist/selectors-D_UFk4Uz.d.ts +14 -0
- package/dist/selectors-DuHGqmMJ.d.cts +712 -0
- package/dist/selectors-SvKXGJM5.d.ts +712 -0
- package/dist/selectors-eYLuQW4M.d.ts +593 -0
- package/dist/selectors-elCimAHX.d.ts +9 -0
- package/dist/selectors-qClZ9EXM.d.ts +374 -0
- package/dist/selectors-rto0SO4z.d.cts +374 -0
- package/dist/selectors.d.cts +9 -9
- package/dist/selectors.d.ts +9 -9
- package/dist/sockethook.cjs +4 -4
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.js +2 -1
- package/dist/sockethook.js.map +1 -1
- package/dist/{store-DLp6ajT8.d.ts → store-BQcycBPp.d.ts} +15 -34
- package/dist/{store-Dw8Uo_Df.d.cts → store-CrLzRDCx.d.cts} +14 -33
- package/dist/store.cjs +2 -4
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +2 -2
- package/dist/store.d.ts +2 -2
- package/dist/store.js +2 -4
- package/dist/store.js.map +1 -1
- package/dist/thunks.cjs +39 -43
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +19 -22
- package/dist/thunks.js.map +1 -1
- package/dist/{types-DY0J79yF.d.ts → types-DB1IOQX8.d.ts} +3 -3
- package/dist/{types-B67YW1jV.d.cts → types-DtTmD7Yn.d.cts} +3 -3
- package/dist/usersSlice/constants.cjs +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 +1 -1
- package/dist/usersSlice/mocks.d.ts +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.cjs +3 -3
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +2 -466
- package/dist/usersSlice/selectors.d.ts +2 -466
- package/dist/usersSlice/selectors.js +2 -2
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/thunks.d.cts +88 -88
- package/dist/usersSlice/thunks.d.ts +88 -88
- package/dist/utils.cjs +5 -8
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +4 -6
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/constants-BJuY-ODE.d.ts +0 -124
- package/dist/constants-C2O55iZu.d.cts +0 -124
- package/dist/constants-D5hACLhF.js.map +0 -1
- package/dist/constants-MVizYy89.cjs.map +0 -1
- package/dist/storehooks.cjs +0 -249
- package/dist/storehooks.cjs.map +0 -1
- package/dist/storehooks.d.cts +0 -49
- package/dist/storehooks.d.ts +0 -49
- package/dist/storehooks.js +0 -241
- package/dist/storehooks.js.map +0 -1
|
@@ -1,97 +1,2 @@
|
|
|
1
|
-
import { o as
|
|
2
|
-
|
|
3
|
-
import { n as OnboardingSliceType } from "../index-CoObjWL4.cjs";
|
|
4
|
-
import { l as SelectionState, n as DeploymentByStatus, o as DeploymentsSliceType, t as Deployment } from "../index-mvxjivTJ.cjs";
|
|
5
|
-
import { c as DeviceSliceType } from "../index-KxRmyFLr.cjs";
|
|
6
|
-
import { t as AppSliceType } from "../index-BKU1G9-x.cjs";
|
|
7
|
-
import { t as MonitorSliceType } from "../index-BfmRpbiJ.cjs";
|
|
8
|
-
import { t as OrganizationSliceType } from "../index-HjOSTTGF.cjs";
|
|
9
|
-
import { r as RootState } from "../store-Dw8Uo_Df.cjs";
|
|
10
|
-
//#region src/deploymentsSlice/selectors.d.ts
|
|
11
|
-
export declare const getDeploymentsById: (state: RootState) => Record<string, Deployment>;
|
|
12
|
-
export declare const getDeploymentsByStatus: (state: RootState) => DeploymentByStatus;
|
|
13
|
-
export declare const getSelectedDeploymentDeviceIds: (state: RootState) => string[];
|
|
14
|
-
export declare const getDeploymentsSelectionState: (state: RootState) => SelectionState;
|
|
15
|
-
export declare const getDeploymentById: ((state: any, deploymentId: any) => Deployment) & {
|
|
16
|
-
clearCache: () => void;
|
|
17
|
-
resultsCount: () => number;
|
|
18
|
-
resetResultsCount: () => void;
|
|
19
|
-
} & {
|
|
20
|
-
resultFunc: (resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: any) => Deployment;
|
|
21
|
-
memoizedResultFunc: ((resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: any) => Deployment) & {
|
|
22
|
-
clearCache: () => void;
|
|
23
|
-
resultsCount: () => number;
|
|
24
|
-
resetResultsCount: () => void;
|
|
25
|
-
};
|
|
26
|
-
lastResult: () => Deployment;
|
|
27
|
-
dependencies: [(state: RootState) => Record<string, Deployment>, (_: any, deploymentId: any) => any];
|
|
28
|
-
recomputations: () => number;
|
|
29
|
-
resetRecomputations: () => void;
|
|
30
|
-
dependencyRecomputations: () => number;
|
|
31
|
-
resetDependencyRecomputations: () => void;
|
|
32
|
-
} & {
|
|
33
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
34
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
35
|
-
};
|
|
36
|
-
export declare const getMappedDeploymentSelection: ((state: any, deploymentsState: any) => any) & {
|
|
37
|
-
clearCache: () => void;
|
|
38
|
-
resultsCount: () => number;
|
|
39
|
-
resetResultsCount: () => void;
|
|
40
|
-
} & {
|
|
41
|
-
resultFunc: (resultFuncArgs_0: SelectionState, resultFuncArgs_1: any, resultFuncArgs_2: Record<string, Deployment>) => any;
|
|
42
|
-
memoizedResultFunc: ((resultFuncArgs_0: SelectionState, resultFuncArgs_1: any, resultFuncArgs_2: Record<string, Deployment>) => any) & {
|
|
43
|
-
clearCache: () => void;
|
|
44
|
-
resultsCount: () => number;
|
|
45
|
-
resetResultsCount: () => void;
|
|
46
|
-
};
|
|
47
|
-
lastResult: () => any;
|
|
48
|
-
dependencies: [(state: RootState) => SelectionState, (_: any, deploymentsState: any) => any, (state: RootState) => Record<string, Deployment>];
|
|
49
|
-
recomputations: () => number;
|
|
50
|
-
resetRecomputations: () => void;
|
|
51
|
-
dependencyRecomputations: () => number;
|
|
52
|
-
resetDependencyRecomputations: () => void;
|
|
53
|
-
} & {
|
|
54
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
55
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
56
|
-
};
|
|
57
|
-
export declare const DEPLOYMENT_CUTOFF = 3;
|
|
58
|
-
export declare const getRecentDeployments: ((state: {
|
|
59
|
-
app: AppSliceType;
|
|
60
|
-
devices: DeviceSliceType;
|
|
61
|
-
deployments: DeploymentsSliceType;
|
|
62
|
-
monitor: MonitorSliceType;
|
|
63
|
-
onboarding: OnboardingSliceType;
|
|
64
|
-
organization: OrganizationSliceType;
|
|
65
|
-
releases: ReleaseSliceType;
|
|
66
|
-
users: UserSliceType;
|
|
67
|
-
}) => {
|
|
68
|
-
total: number;
|
|
69
|
-
}) & {
|
|
70
|
-
clearCache: () => void;
|
|
71
|
-
resultsCount: () => number;
|
|
72
|
-
resetResultsCount: () => void;
|
|
73
|
-
} & {
|
|
74
|
-
resultFunc: (resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: DeploymentByStatus) => {
|
|
75
|
-
total: number;
|
|
76
|
-
};
|
|
77
|
-
memoizedResultFunc: ((resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: DeploymentByStatus) => {
|
|
78
|
-
total: number;
|
|
79
|
-
}) & {
|
|
80
|
-
clearCache: () => void;
|
|
81
|
-
resultsCount: () => number;
|
|
82
|
-
resetResultsCount: () => void;
|
|
83
|
-
};
|
|
84
|
-
lastResult: () => {
|
|
85
|
-
total: number;
|
|
86
|
-
};
|
|
87
|
-
dependencies: [(state: RootState) => Record<string, Deployment>, (state: RootState) => DeploymentByStatus];
|
|
88
|
-
recomputations: () => number;
|
|
89
|
-
resetRecomputations: () => void;
|
|
90
|
-
dependencyRecomputations: () => number;
|
|
91
|
-
resetDependencyRecomputations: () => void;
|
|
92
|
-
} & {
|
|
93
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
94
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
95
|
-
};
|
|
96
|
-
//#endregion
|
|
97
|
-
//# sourceMappingURL=selectors.d.cts.map
|
|
1
|
+
import { a as getDeploymentsByStatus, c as getRecentDeployments, i as getDeploymentsById, l as getSelectedDeploymentDeviceIds, n as DeploymentsState, o as getDeploymentsSelectionState, r as getDeploymentById, s as getMappedDeploymentSelection, t as DEPLOYMENT_CUTOFF } from "../selectors-CH-yXu-7.cjs";
|
|
2
|
+
export { DEPLOYMENT_CUTOFF, DeploymentsState, getDeploymentById, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getMappedDeploymentSelection, getRecentDeployments, getSelectedDeploymentDeviceIds };
|
|
@@ -1,97 +1,2 @@
|
|
|
1
|
-
import { o as
|
|
2
|
-
|
|
3
|
-
import { n as OnboardingSliceType } from "../index-CoObjWL4.js";
|
|
4
|
-
import { l as SelectionState, n as DeploymentByStatus, o as DeploymentsSliceType, t as Deployment } from "../index-B8td4-rY.js";
|
|
5
|
-
import { c as DeviceSliceType } from "../index-D9GJhX1I.js";
|
|
6
|
-
import { t as AppSliceType } from "../index-xxqlerg5.js";
|
|
7
|
-
import { t as MonitorSliceType } from "../index-CRqnH_go.js";
|
|
8
|
-
import { t as OrganizationSliceType } from "../index-BVNS-Aut.js";
|
|
9
|
-
import { r as RootState } from "../store-DLp6ajT8.js";
|
|
10
|
-
//#region src/deploymentsSlice/selectors.d.ts
|
|
11
|
-
export declare const getDeploymentsById: (state: RootState) => Record<string, Deployment>;
|
|
12
|
-
export declare const getDeploymentsByStatus: (state: RootState) => DeploymentByStatus;
|
|
13
|
-
export declare const getSelectedDeploymentDeviceIds: (state: RootState) => string[];
|
|
14
|
-
export declare const getDeploymentsSelectionState: (state: RootState) => SelectionState;
|
|
15
|
-
export declare const getDeploymentById: ((state: any, deploymentId: any) => Deployment) & {
|
|
16
|
-
clearCache: () => void;
|
|
17
|
-
resultsCount: () => number;
|
|
18
|
-
resetResultsCount: () => void;
|
|
19
|
-
} & {
|
|
20
|
-
resultFunc: (resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: any) => Deployment;
|
|
21
|
-
memoizedResultFunc: ((resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: any) => Deployment) & {
|
|
22
|
-
clearCache: () => void;
|
|
23
|
-
resultsCount: () => number;
|
|
24
|
-
resetResultsCount: () => void;
|
|
25
|
-
};
|
|
26
|
-
lastResult: () => Deployment;
|
|
27
|
-
dependencies: [(state: RootState) => Record<string, Deployment>, (_: any, deploymentId: any) => any];
|
|
28
|
-
recomputations: () => number;
|
|
29
|
-
resetRecomputations: () => void;
|
|
30
|
-
dependencyRecomputations: () => number;
|
|
31
|
-
resetDependencyRecomputations: () => void;
|
|
32
|
-
} & {
|
|
33
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
34
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
35
|
-
};
|
|
36
|
-
export declare const getMappedDeploymentSelection: ((state: any, deploymentsState: any) => any) & {
|
|
37
|
-
clearCache: () => void;
|
|
38
|
-
resultsCount: () => number;
|
|
39
|
-
resetResultsCount: () => void;
|
|
40
|
-
} & {
|
|
41
|
-
resultFunc: (resultFuncArgs_0: SelectionState, resultFuncArgs_1: any, resultFuncArgs_2: Record<string, Deployment>) => any;
|
|
42
|
-
memoizedResultFunc: ((resultFuncArgs_0: SelectionState, resultFuncArgs_1: any, resultFuncArgs_2: Record<string, Deployment>) => any) & {
|
|
43
|
-
clearCache: () => void;
|
|
44
|
-
resultsCount: () => number;
|
|
45
|
-
resetResultsCount: () => void;
|
|
46
|
-
};
|
|
47
|
-
lastResult: () => any;
|
|
48
|
-
dependencies: [(state: RootState) => SelectionState, (_: any, deploymentsState: any) => any, (state: RootState) => Record<string, Deployment>];
|
|
49
|
-
recomputations: () => number;
|
|
50
|
-
resetRecomputations: () => void;
|
|
51
|
-
dependencyRecomputations: () => number;
|
|
52
|
-
resetDependencyRecomputations: () => void;
|
|
53
|
-
} & {
|
|
54
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
55
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
56
|
-
};
|
|
57
|
-
export declare const DEPLOYMENT_CUTOFF = 3;
|
|
58
|
-
export declare const getRecentDeployments: ((state: {
|
|
59
|
-
app: AppSliceType;
|
|
60
|
-
devices: DeviceSliceType;
|
|
61
|
-
deployments: DeploymentsSliceType;
|
|
62
|
-
monitor: MonitorSliceType;
|
|
63
|
-
onboarding: OnboardingSliceType;
|
|
64
|
-
organization: OrganizationSliceType;
|
|
65
|
-
releases: ReleaseSliceType;
|
|
66
|
-
users: UserSliceType;
|
|
67
|
-
}) => {
|
|
68
|
-
total: number;
|
|
69
|
-
}) & {
|
|
70
|
-
clearCache: () => void;
|
|
71
|
-
resultsCount: () => number;
|
|
72
|
-
resetResultsCount: () => void;
|
|
73
|
-
} & {
|
|
74
|
-
resultFunc: (resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: DeploymentByStatus) => {
|
|
75
|
-
total: number;
|
|
76
|
-
};
|
|
77
|
-
memoizedResultFunc: ((resultFuncArgs_0: Record<string, Deployment>, resultFuncArgs_1: DeploymentByStatus) => {
|
|
78
|
-
total: number;
|
|
79
|
-
}) & {
|
|
80
|
-
clearCache: () => void;
|
|
81
|
-
resultsCount: () => number;
|
|
82
|
-
resetResultsCount: () => void;
|
|
83
|
-
};
|
|
84
|
-
lastResult: () => {
|
|
85
|
-
total: number;
|
|
86
|
-
};
|
|
87
|
-
dependencies: [(state: RootState) => Record<string, Deployment>, (state: RootState) => DeploymentByStatus];
|
|
88
|
-
recomputations: () => number;
|
|
89
|
-
resetRecomputations: () => void;
|
|
90
|
-
dependencyRecomputations: () => number;
|
|
91
|
-
resetDependencyRecomputations: () => void;
|
|
92
|
-
} & {
|
|
93
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
94
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
95
|
-
};
|
|
96
|
-
//#endregion
|
|
97
|
-
//# sourceMappingURL=selectors.d.ts.map
|
|
1
|
+
import { a as getDeploymentsByStatus, c as getRecentDeployments, i as getDeploymentsById, l as getSelectedDeploymentDeviceIds, n as DeploymentsState, o as getDeploymentsSelectionState, r as getDeploymentById, s as getMappedDeploymentSelection, t as DEPLOYMENT_CUTOFF } from "../selectors-D9t4It2i.js";
|
|
2
|
+
export { DEPLOYMENT_CUTOFF, DeploymentsState, getDeploymentById, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getMappedDeploymentSelection, getRecentDeployments, getSelectedDeploymentDeviceIds };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { vt as DEPLOYMENT_STATES } from "../constants-yul-O5hD.js";
|
|
2
2
|
import { createSelector } from "@reduxjs/toolkit";
|
|
3
3
|
//#region src/deploymentsSlice/selectors.ts
|
|
4
4
|
const getDeploymentsById = (state) => state.deployments.byId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","names":[],"sources":["../../src/deploymentsSlice/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 type { Deployment } from '.';\nimport
|
|
1
|
+
{"version":3,"file":"selectors.js","names":[],"sources":["../../src/deploymentsSlice/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 type { Deployment, DeploymentsSliceType } from '.';\nimport { DEPLOYMENT_STATES } from './constants';\n\nexport type DeploymentsState = { deployments: DeploymentsSliceType };\n\nexport const getDeploymentsById = (state: DeploymentsState) => state.deployments.byId;\nexport const getDeploymentsByStatus = (state: DeploymentsState) => state.deployments.byStatus;\nexport const getSelectedDeploymentDeviceIds = (state: DeploymentsState) => state.deployments.selectedDeviceIds;\nexport const getDeploymentsSelectionState = (state: DeploymentsState) => state.deployments.selectionState;\n\nexport const getDeploymentById = createSelector(\n [getDeploymentsById, (_, deploymentId) => deploymentId],\n (deploymentsById, deploymentId = '') => deploymentsById[deploymentId]\n);\n\nexport const getMappedDeploymentSelection = createSelector(\n [getDeploymentsSelectionState, (_, deploymentsState) => deploymentsState, getDeploymentsById],\n (selectionState, deploymentsState, deploymentsById) => {\n const { selection = [] } = selectionState[deploymentsState] ?? {};\n return selection.reduce((accu, id) => {\n if (deploymentsById[id]) {\n accu.push(deploymentsById[id]);\n }\n return accu;\n }, []);\n }\n);\n\nconst relevantDeploymentStates = [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress, DEPLOYMENT_STATES.finished] as const;\nexport const DEPLOYMENT_CUTOFF = 3;\nexport const getRecentDeployments = createSelector([getDeploymentsById, getDeploymentsByStatus], (deploymentsById, deploymentsByStatus) =>\n Object.entries(deploymentsByStatus).reduce(\n (accu, [state, byStatus]) => {\n if (!relevantDeploymentStates.includes(state as (typeof relevantDeploymentStates)[number]) || !byStatus.deploymentIds.length) {\n return accu;\n }\n accu[state] = byStatus.deploymentIds\n .reduce<Deployment[]>((accu, id) => {\n if (deploymentsById[id]) {\n accu.push(deploymentsById[id]);\n }\n return accu;\n }, [])\n .slice(0, DEPLOYMENT_CUTOFF);\n accu.total += byStatus.total;\n return accu;\n },\n { total: 0 }\n )\n);\n"],"mappings":";;;AAoBA,MAAa,sBAAsB,UAA4B,MAAM,YAAY;AACjF,MAAa,0BAA0B,UAA4B,MAAM,YAAY;AACrF,MAAa,kCAAkC,UAA4B,MAAM,YAAY;AAC7F,MAAa,gCAAgC,UAA4B,MAAM,YAAY;AAE3F,MAAa,oBAAoB,eAC/B,CAAC,qBAAqB,GAAG,iBAAiB,YAAY,IACrD,iBAAiB,eAAe,OAAO,gBAAgB,aAC1D;AAEA,MAAa,+BAA+B,eAC1C;CAAC;EAA+B,GAAG,qBAAqB;CAAkB;AAAkB,IAC3F,gBAAgB,kBAAkB,oBAAoB;CACrD,MAAM,EAAE,YAAY,CAAC,MAAM,eAAe,qBAAqB,CAAC;CAChE,OAAO,UAAU,QAAQ,MAAM,OAAO;EACpC,IAAI,gBAAgB,KAClB,KAAK,KAAK,gBAAgB,GAAG;EAE/B,OAAO;CACT,GAAG,CAAC,CAAC;AACP,CACF;AAEA,MAAM,2BAA2B;CAAC,kBAAkB;CAAS,kBAAkB;CAAY,kBAAkB;AAAQ;AACrH,MAAa,oBAAoB;AACjC,MAAa,uBAAuB,eAAe,CAAC,oBAAoB,sBAAsB,IAAI,iBAAiB,wBACjH,OAAO,QAAQ,mBAAmB,CAAC,CAAC,QACjC,MAAM,CAAC,OAAO,cAAc;CAC3B,IAAI,CAAC,yBAAyB,SAAS,KAAkD,KAAK,CAAC,SAAS,cAAc,QACpH,OAAO;CAET,KAAK,SAAS,SAAS,cACpB,QAAsB,MAAM,OAAO;EAClC,IAAI,gBAAgB,KAClB,KAAK,KAAK,gBAAgB,GAAG;EAE/B,OAAO;CACT,GAAG,CAAC,CAAC,CAAC,CACL,MAAM,GAAA,CAAoB;CAC7B,KAAK,SAAS,SAAS;CACvB,OAAO;AACT,GACA,EAAE,OAAO,EAAE,CACb,CACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as SortOptions } from "../constants-
|
|
1
|
+
import { T as SortOptions } from "../constants-hMMMdt0R.cjs";
|
|
2
2
|
import { c as SelectionListState, i as DeploymentConfig, l as SelectionState, r as DeploymentByStatusKey, t as Deployment } from "../index-mvxjivTJ.cjs";
|
|
3
|
-
import { t as Device$1 } from "../index-
|
|
4
|
-
import { i as SnackbarContent } from "../index-
|
|
5
|
-
import {
|
|
3
|
+
import { t as Device$1 } from "../index-D8O1HJ8Q.cjs";
|
|
4
|
+
import { i as SnackbarContent } from "../index-BoZjwQHk.cjs";
|
|
5
|
+
import { i as RootState, t as AppDispatch } from "../store-CrLzRDCx.cjs";
|
|
6
6
|
import { DeploymentV1, DeploymentV2, NewDeploymentForGroup, NewDeploymentTypeManagement, NewDeploymentV2TypeManagement } from "@northern.tech/types/MenderTypes";
|
|
7
7
|
//#region src/deploymentsSlice/thunks.d.ts
|
|
8
8
|
export declare const deriveDeploymentGroup: ({ filter, group, groups, name }: Deployment) => string | undefined;
|
|
@@ -164,14 +164,7 @@ export declare const abortDeployment: import("@reduxjs/toolkit").AsyncThunk<[{
|
|
|
164
164
|
fulfilledMeta?: unknown;
|
|
165
165
|
rejectedMeta?: unknown;
|
|
166
166
|
}>;
|
|
167
|
-
export declare const updateDeploymentControlMap: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<{
|
|
168
|
-
payload: Deployment;
|
|
169
|
-
type: "deployments/receivedDeployment";
|
|
170
|
-
}, string, {
|
|
171
|
-
arg: string;
|
|
172
|
-
requestId: string;
|
|
173
|
-
requestStatus: "fulfilled";
|
|
174
|
-
}, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
167
|
+
export declare const updateDeploymentControlMap: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
175
168
|
arg: string;
|
|
176
169
|
requestId: string;
|
|
177
170
|
requestStatus: "rejected";
|
|
@@ -181,7 +174,14 @@ export declare const updateDeploymentControlMap: import("@reduxjs/toolkit").Asyn
|
|
|
181
174
|
rejectedWithValue: true;
|
|
182
175
|
} | ({
|
|
183
176
|
rejectedWithValue: false;
|
|
184
|
-
} & {})), import("@reduxjs/toolkit").SerializedError
|
|
177
|
+
} & {})), import("@reduxjs/toolkit").SerializedError> | import("@reduxjs/toolkit").PayloadAction<{
|
|
178
|
+
payload: Deployment;
|
|
179
|
+
type: "deployments/receivedDeployment";
|
|
180
|
+
}, string, {
|
|
181
|
+
arg: string;
|
|
182
|
+
requestId: string;
|
|
183
|
+
requestStatus: "fulfilled";
|
|
184
|
+
}, never>, {
|
|
185
185
|
deploymentId: string;
|
|
186
186
|
updateControlMap: DeploymentV1["update_control_map"];
|
|
187
187
|
}, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as SortOptions } from "../constants-
|
|
1
|
+
import { T as SortOptions } from "../constants-3gsHyxWr.js";
|
|
2
2
|
import { c as SelectionListState, i as DeploymentConfig, l as SelectionState, r as DeploymentByStatusKey, t as Deployment } from "../index-B8td4-rY.js";
|
|
3
|
-
import { t as Device$1 } from "../index-
|
|
4
|
-
import { i as SnackbarContent } from "../index-
|
|
5
|
-
import {
|
|
3
|
+
import { t as Device$1 } from "../index-uhmZ9qaP.js";
|
|
4
|
+
import { i as SnackbarContent } from "../index-BMi8ZqpV.js";
|
|
5
|
+
import { i as RootState, t as AppDispatch } from "../store-BQcycBPp.js";
|
|
6
6
|
import { DeploymentV1, DeploymentV2, NewDeploymentForGroup, NewDeploymentTypeManagement, NewDeploymentV2TypeManagement } from "@northern.tech/types/MenderTypes";
|
|
7
7
|
//#region src/deploymentsSlice/thunks.d.ts
|
|
8
8
|
export declare const deriveDeploymentGroup: ({ filter, group, groups, name }: Deployment) => string | undefined;
|
|
@@ -164,14 +164,7 @@ export declare const abortDeployment: import("@reduxjs/toolkit").AsyncThunk<[{
|
|
|
164
164
|
fulfilledMeta?: unknown;
|
|
165
165
|
rejectedMeta?: unknown;
|
|
166
166
|
}>;
|
|
167
|
-
export declare const updateDeploymentControlMap: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<{
|
|
168
|
-
payload: Deployment;
|
|
169
|
-
type: "deployments/receivedDeployment";
|
|
170
|
-
}, string, {
|
|
171
|
-
arg: string;
|
|
172
|
-
requestId: string;
|
|
173
|
-
requestStatus: "fulfilled";
|
|
174
|
-
}, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
167
|
+
export declare const updateDeploymentControlMap: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
175
168
|
arg: string;
|
|
176
169
|
requestId: string;
|
|
177
170
|
requestStatus: "rejected";
|
|
@@ -181,7 +174,14 @@ export declare const updateDeploymentControlMap: import("@reduxjs/toolkit").Asyn
|
|
|
181
174
|
rejectedWithValue: true;
|
|
182
175
|
} | ({
|
|
183
176
|
rejectedWithValue: false;
|
|
184
|
-
} & {})), import("@reduxjs/toolkit").SerializedError
|
|
177
|
+
} & {})), import("@reduxjs/toolkit").SerializedError> | import("@reduxjs/toolkit").PayloadAction<{
|
|
178
|
+
payload: Deployment;
|
|
179
|
+
type: "deployments/receivedDeployment";
|
|
180
|
+
}, string, {
|
|
181
|
+
arg: string;
|
|
182
|
+
requestId: string;
|
|
183
|
+
requestStatus: "fulfilled";
|
|
184
|
+
}, never>, {
|
|
185
185
|
deploymentId: string;
|
|
186
186
|
updateControlMap: DeploymentV1["update_control_map"];
|
|
187
187
|
}, {
|
|
@@ -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-DsOnY5o5.cjs");
|
|
3
3
|
exports.DEVICE_CONNECT_STATES = require_constants.DEVICE_CONNECT_STATES;
|
|
4
4
|
exports.DEVICE_DISMISSAL_STATE = require_constants.DEVICE_DISMISSAL_STATE;
|
|
5
5
|
exports.DEVICE_MESSAGE_PROTOCOLS = require_constants.DEVICE_MESSAGE_PROTOCOLS;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _t as
|
|
1
|
+
import { _t as REPORT_CHART_SIZE_LIMIT, ft as DEVICE_CONNECT_STATES, gt as DeviceAuthState, ht as DEVICE_MESSAGE_TYPES, mt as DEVICE_MESSAGE_PROTOCOLS, pt as DEVICE_DISMISSAL_STATE, vt as emptyFilter, yt as geoAttributes } from "../constants-hMMMdt0R.cjs";
|
|
2
2
|
export { DEVICE_CONNECT_STATES, DEVICE_DISMISSAL_STATE, DEVICE_MESSAGE_PROTOCOLS, DEVICE_MESSAGE_TYPES, DeviceAuthState, REPORT_CHART_SIZE_LIMIT, emptyFilter, geoAttributes };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _t as
|
|
1
|
+
import { _t as REPORT_CHART_SIZE_LIMIT, ft as DEVICE_CONNECT_STATES, gt as DeviceAuthState, ht as DEVICE_MESSAGE_TYPES, mt as DEVICE_MESSAGE_PROTOCOLS, pt as DEVICE_DISMISSAL_STATE, vt as emptyFilter, yt as geoAttributes } from "../constants-3gsHyxWr.js";
|
|
2
2
|
export { DEVICE_CONNECT_STATES, DEVICE_DISMISSAL_STATE, DEVICE_MESSAGE_PROTOCOLS, DEVICE_MESSAGE_TYPES, DeviceAuthState, REPORT_CHART_SIZE_LIMIT, emptyFilter, geoAttributes };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dt as DEVICE_MESSAGE_PROTOCOLS, ft as DEVICE_MESSAGE_TYPES, ht as geoAttributes, lt as DEVICE_CONNECT_STATES, mt as emptyFilter, pt as REPORT_CHART_SIZE_LIMIT, ut as DEVICE_DISMISSAL_STATE } from "../constants-yul-O5hD.js";
|
|
2
2
|
export { DEVICE_CONNECT_STATES, DEVICE_DISMISSAL_STATE, DEVICE_MESSAGE_PROTOCOLS, DEVICE_MESSAGE_TYPES, REPORT_CHART_SIZE_LIMIT, emptyFilter, geoAttributes };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DeviceGroups, c as DeviceSliceType, d as _default, f as actions, h as sliceName, i as DeviceGroup, l as DeviceTierLimits, m as initialState, n as DeviceComponents, o as DeviceListState, p as devicesSlice, r as DeviceFilter, s as DeviceSelectedAttribute, t as Device, u as InventoryAttributes } from "../index-
|
|
1
|
+
import { a as DeviceGroups, c as DeviceSliceType, d as _default, f as actions, h as sliceName, i as DeviceGroup, l as DeviceTierLimits, m as initialState, n as DeviceComponents, o as DeviceListState, p as devicesSlice, r as DeviceFilter, s as DeviceSelectedAttribute, t as Device, u as InventoryAttributes } from "../index-D8O1HJ8Q.cjs";
|
|
2
2
|
export { Device, DeviceComponents, DeviceFilter, DeviceGroup, DeviceGroups, DeviceListState, DeviceSelectedAttribute, DeviceSliceType, DeviceTierLimits, InventoryAttributes, actions, _default as default, devicesSlice, initialState, sliceName };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DeviceGroups, c as DeviceSliceType, d as _default, f as actions, h as sliceName, i as DeviceGroup, l as DeviceTierLimits, m as initialState, n as DeviceComponents, o as DeviceListState, p as devicesSlice, r as DeviceFilter, s as DeviceSelectedAttribute, t as Device, u as InventoryAttributes } from "../index-
|
|
1
|
+
import { a as DeviceGroups, c as DeviceSliceType, d as _default, f as actions, h as sliceName, i as DeviceGroup, l as DeviceTierLimits, m as initialState, n as DeviceComponents, o as DeviceListState, p as devicesSlice, r as DeviceFilter, s as DeviceSelectedAttribute, t as Device, u as InventoryAttributes } from "../index-uhmZ9qaP.js";
|
|
2
2
|
export { Device, DeviceComponents, DeviceFilter, DeviceGroup, DeviceGroups, DeviceListState, DeviceSelectedAttribute, DeviceSliceType, DeviceTierLimits, InventoryAttributes, actions, _default as default, devicesSlice, initialState, sliceName };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS, u as DEVICE_STATES } from "../constants-
|
|
1
|
+
import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS, u as DEVICE_STATES } from "../constants-yul-O5hD.js";
|
|
2
2
|
import { createSlice } from "@reduxjs/toolkit";
|
|
3
3
|
import { deepCompare, duplicateFilter } from "@northern.tech/utils/helpers";
|
|
4
4
|
//#region src/devicesSlice/index.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as SORTING_OPTIONS, u as DEVICE_STATES } from "../constants-
|
|
1
|
+
import { f as SORTING_OPTIONS, u as DEVICE_STATES } from "../constants-yul-O5hD.js";
|
|
2
2
|
import { initialState } from "./index.js";
|
|
3
3
|
//#region src/devicesSlice/mocks.ts
|
|
4
4
|
const deviceTypes = { qemu: "qemux86-64" };
|
|
@@ -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-DsOnY5o5.cjs");
|
|
3
3
|
let _reduxjs_toolkit = require("@reduxjs/toolkit");
|
|
4
4
|
let _northern_tech_utils_helpers = require("@northern.tech/utils/helpers");
|
|
5
5
|
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.cjs","names":["createSelector","DEVICE_STATES","UNGROUPED_GROUP","duplicateFilter"],"sources":["../../src/devicesSlice/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 { duplicateFilter } from '@northern.tech/utils/helpers';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport type { DeviceFilter, DeviceGroup } from '.';\nimport type { DeviceAuthState } from '../constants';\nimport { DEVICE_STATES, UNGROUPED_GROUP } from '../constants';\nimport type { RootState } from '../store';\n\nexport const getAcceptedDevices = (state: RootState) => state.devices.byStatus.accepted;\nexport const getDevicesByStatus = (state: RootState) => state.devices.byStatus;\nexport const getDevicesById = (state: RootState) => state.devices.byId;\nexport const getDeviceReports = (state: RootState) => state.devices.reports;\nexport const getGroupsById = (state: RootState) => state.devices.groups.byId;\nexport const getSelectedGroup = (state: RootState) => state.devices.groups.selectedGroup;\n\nexport const getDeviceListState = (state: RootState) => state.devices.deviceList;\nexport const getListedDevices = (state: RootState) => state.devices.deviceList.deviceIds;\nexport const getFilteringAttributes = (state: RootState) => state.devices.filteringAttributes;\nexport const getDeviceFilters = (state: RootState) => state.devices.filters || [];\nexport const getTestDeviceLimit = (state: RootState) => state.devices.testDeviceLimit;\nconst getFilteringAttributesFromConfig = (state: RootState) => state.devices.filteringAttributesConfig.attributes;\nexport const getSortedFilteringAttributes = createSelector([getFilteringAttributes], filteringAttributes => ({\n ...filteringAttributes,\n identityAttributes: [...filteringAttributes.identityAttributes, 'id']\n}));\nexport const getDeviceLimits = (state: RootState) => state.devices.limits;\nexport const getTestDeviceCount = (state: RootState) => state.devices.testDeviceCount;\nconst getFilteringAttributesLimit = (state: RootState) => state.devices.filteringAttributesLimit;\n\nexport const getDeviceIdentityAttributes = createSelector(\n [getFilteringAttributes, getFilteringAttributesLimit],\n ({ identityAttributes }, filteringAttributesLimit) => {\n // the device auth status is not a meaningful device identifier\n // limit the selection of the available attribute to AVAILABLE_ATTRIBUTE_LIMIT\n const attributes = identityAttributes.filter(attribute => attribute !== 'status').slice(0, filteringAttributesLimit);\n return attributes.reduce(\n (accu, value) => {\n accu.push({ value, label: value, scope: 'identity' });\n return accu;\n },\n [\n { value: 'name', label: 'Name', scope: 'tags' },\n { value: 'id', label: 'Device ID', scope: 'identity' }\n ]\n );\n }\n);\n\nexport const getDeviceCountsByStatus = createSelector([getDevicesByStatus], byStatus =>\n Object.values(DEVICE_STATES).reduce<Record<DeviceAuthState, number>>(\n (accu, deviceState) => {\n const { counts } = byStatus[deviceState];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { total, ...tieredCounts } = counts;\n const count = Object.values(tieredCounts).reduce((accu, countPerTier) => accu + countPerTier, 0);\n accu[deviceState] = count;\n accu.total = accu.total + count;\n return accu;\n },\n { total: 0 }\n )\n);\n\nexport const getDeviceById = createSelector([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = '') => devicesById[deviceId] ?? {});\n\nexport const getSelectedGroupInfo = createSelector(\n [getDeviceCountsByStatus, getGroupsById, getSelectedGroup],\n ({ accepted: acceptedDeviceTotal }, groupsById, selectedGroup) => {\n let groupCount = acceptedDeviceTotal;\n let groupFilters: DeviceFilter[] = [];\n if (selectedGroup && groupsById[selectedGroup]) {\n groupCount = groupsById[selectedGroup].total || 0;\n groupFilters = groupsById[selectedGroup].filters || [];\n }\n return { groupCount, selectedGroup, groupFilters };\n }\n);\n\nexport const getCombinedLimit = createSelector(\n [getDeviceLimits],\n deviceLimits => Object.values(deviceLimits).reduce((accu, limit) => accu + Math.max(limit ?? 0, 0), 0) // limit might be -1 for unlimited devices\n);\n\nexport const getLimitMaxed = createSelector(\n [getDeviceCountsByStatus, getCombinedLimit],\n ({ accepted: acceptedDevices }, combinedLimit) => !!combinedLimit && combinedLimit <= acceptedDevices\n);\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const getGroupsByIdWithoutUngrouped = createSelector([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);\n\nexport const getGroupData = createSelector([getGroupsByIdWithoutUngrouped], groups => {\n const createdGroup = Object.keys(groups).length ? Object.keys(groups)[0] : undefined;\n const hasDynamicGroups = Object.values(groups).some(group => !!group.id);\n return { createdGroup, hasDynamicGroups, groups };\n});\n\ntype SelectorGroup = DeviceGroup & { groupId: string };\ntype SelectorGroups = { dynamic: SelectorGroup[]; static: SelectorGroup[]; ungrouped: SelectorGroup[] };\n\nexport const getGroups = createSelector([getGroupsById], groupsById => {\n const groupNames = Object.keys(groupsById).sort();\n const groupedGroups = Object.entries(groupsById)\n .sort((a, b) => a[0].localeCompare(b[0]))\n .reduce<SelectorGroups>(\n (accu, [groupname, group]) => {\n const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;\n const groupItem = { ...group, groupId: name, name: groupname };\n if ((group.filters ?? []).length > 0) {\n if (groupname !== UNGROUPED_GROUP.id) {\n accu.dynamic.push(groupItem);\n } else {\n accu.ungrouped.push(groupItem);\n }\n } else {\n accu.static.push(groupItem);\n }\n return accu;\n },\n { dynamic: [], static: [], ungrouped: [] }\n );\n return { groupNames, ...groupedGroups };\n});\nexport const getAttributesList = createSelector(\n [getFilteringAttributes, getFilteringAttributesFromConfig],\n ({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) =>\n [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(duplicateFilter)\n);\nconst getEnabledTierLimits = createSelector([getDeviceLimits], limits => Object.entries(limits).filter(([, limit]) => limit !== 0));\n\nexport const getEnabledTiers = createSelector([getEnabledTierLimits], enabledTierLimits => enabledTierLimits.map(([type]) => type));\n\nexport const getDeviceLimitStats = createSelector([getEnabledTierLimits, getAcceptedDevices], (enabledTierLimits, accepted) => {\n const { counts } = accepted;\n return enabledTierLimits.map(([type, limit]) => ({\n type,\n limit,\n total: counts[type] || 0\n }));\n});\n\nexport const getDeviceTypes = createSelector([getAcceptedDevices, getDevicesById], ({ deviceIds = [] }, devicesById) =>\n Object.keys(\n deviceIds.slice(0, 200).reduce((accu, item) => {\n const { device_type: deviceTypes = [] } = devicesById[item] ? devicesById[item].attributes : {};\n accu = deviceTypes.reduce((deviceTypeAccu, deviceType) => {\n if (deviceType.length > 1) {\n deviceTypeAccu[deviceType] = deviceTypeAccu[deviceType] ? deviceTypeAccu[deviceType] + 1 : 1;\n }\n return deviceTypeAccu;\n }, accu);\n return accu;\n }, {})\n )\n);\n"],"mappings":";;;;;;AAqBA,MAAa,sBAAsB,UAAqB,MAAM,QAAQ,SAAS;AAC/E,MAAa,sBAAsB,UAAqB,MAAM,QAAQ;AACtE,MAAa,kBAAkB,UAAqB,MAAM,QAAQ;AAClE,MAAa,oBAAoB,UAAqB,MAAM,QAAQ;AACpE,MAAa,iBAAiB,UAAqB,MAAM,QAAQ,OAAO;AACxE,MAAa,oBAAoB,UAAqB,MAAM,QAAQ,OAAO;AAE3E,MAAa,sBAAsB,UAAqB,MAAM,QAAQ;AACtE,MAAa,oBAAoB,UAAqB,MAA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AAI,CAAC;AAElI,MAAa,uBAAA,GAAsBA,iBAAAA,eAAAA,CAAe,CAAC,sBAAsB,kBAAkB,IAAI,mBAAmB,aAAa;CAC7H,MAAM,EAAE,WAAW;CACnB,OAAO,kBAAkB,KAAK,CAAC,MAAM,YAAY;EAC/C;EACA;EACA,OAAO,OAAO,SAAS;CACzB,EAAE;AACJ,CAAC;AAED,MAAa,kBAAA,GAAiBA,iBAAAA,eAAAA,CAAe,CAAC,oBAAoB,cAAc,IAAI,EAAE,YAAY,CAAC,KAAK,gBACtG,OAAO,KACL,UAAU,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,MAAM,SAAS;CAC7C,MAAM,EAAE,aAAa,cAAc,CAAC,MAAM,YAAY,QAAQ,YAAY,KAAK,CAAC,aAAa,CAAC;CAC9F,OAAO,YAAY,QAAQ,gBAAgB,eAAe;EACxD,IAAI,WAAW,SAAS,GACtB,eAAe,cAAc,eAAe,cAAc,eAAe,cAAc,IAAI;EAE7F,OAAO;CACT,GAAG,IAAI;CACP,OAAO;AACT,GAAG,CAAC,CAAC,CACP,CACF"}
|
|
1
|
+
{"version":3,"file":"selectors.cjs","names":["createSelector","DEVICE_STATES","UNGROUPED_GROUP","duplicateFilter"],"sources":["../../src/devicesSlice/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 { duplicateFilter } from '@northern.tech/utils/helpers';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport type { DeviceFilter, DeviceGroup, DeviceSliceType } from '.';\nimport type { DeviceAuthState } from '../constants';\nimport { DEVICE_STATES, UNGROUPED_GROUP } from '../constants';\n\nexport type DevicesState = { devices: DeviceSliceType };\n\nexport const getAcceptedDevices = (state: DevicesState) => state.devices.byStatus.accepted;\nexport const getDevicesByStatus = (state: DevicesState) => state.devices.byStatus;\nexport const getDevicesById = (state: DevicesState) => state.devices.byId;\nexport const getDeviceReports = (state: DevicesState) => state.devices.reports;\nexport const getGroupsById = (state: DevicesState) => state.devices.groups.byId;\nexport const getSelectedGroup = (state: DevicesState) => state.devices.groups.selectedGroup;\n\nexport const getDeviceListState = (state: DevicesState) => state.devices.deviceList;\nexport const getListedDevices = (state: DevicesState) => state.devices.deviceList.deviceIds;\nexport const getFilteringAttributes = (state: DevicesState) => state.devices.filteringAttributes;\nexport const getDeviceFilters = (state: DevicesState) => state.devices.filters || [];\nexport const getTestDeviceLimit = (state: DevicesState) => state.devices.testDeviceLimit;\nconst getFilteringAttributesFromConfig = (state: DevicesState) => state.devices.filteringAttributesConfig.attributes;\nexport const getSortedFilteringAttributes = createSelector([getFilteringAttributes], filteringAttributes => ({\n ...filteringAttributes,\n identityAttributes: [...filteringAttributes.identityAttributes, 'id']\n}));\nexport const getDeviceLimits = (state: DevicesState) => state.devices.limits;\nexport const getTestDeviceCount = (state: DevicesState) => state.devices.testDeviceCount;\nconst getFilteringAttributesLimit = (state: DevicesState) => state.devices.filteringAttributesLimit;\n\nexport const getDeviceIdentityAttributes = createSelector(\n [getFilteringAttributes, getFilteringAttributesLimit],\n ({ identityAttributes }, filteringAttributesLimit) => {\n // the device auth status is not a meaningful device identifier\n // limit the selection of the available attribute to AVAILABLE_ATTRIBUTE_LIMIT\n const attributes = identityAttributes.filter(attribute => attribute !== 'status').slice(0, filteringAttributesLimit);\n return attributes.reduce(\n (accu, value) => {\n accu.push({ value, label: value, scope: 'identity' });\n return accu;\n },\n [\n { value: 'name', label: 'Name', scope: 'tags' },\n { value: 'id', label: 'Device ID', scope: 'identity' }\n ]\n );\n }\n);\n\nexport const getDeviceCountsByStatus = createSelector([getDevicesByStatus], byStatus =>\n Object.values(DEVICE_STATES).reduce<Record<DeviceAuthState, number>>(\n (accu, deviceState) => {\n const { counts } = byStatus[deviceState];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { total, ...tieredCounts } = counts;\n const count = Object.values(tieredCounts).reduce((accu, countPerTier) => accu + countPerTier, 0);\n accu[deviceState] = count;\n accu.total = accu.total + count;\n return accu;\n },\n { total: 0 }\n )\n);\n\nexport const getDeviceById = createSelector([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = '') => devicesById[deviceId] ?? {});\n\nexport const getSelectedGroupInfo = createSelector(\n [getDeviceCountsByStatus, getGroupsById, getSelectedGroup],\n ({ accepted: acceptedDeviceTotal }, groupsById, selectedGroup) => {\n let groupCount = acceptedDeviceTotal;\n let groupFilters: DeviceFilter[] = [];\n if (selectedGroup && groupsById[selectedGroup]) {\n groupCount = groupsById[selectedGroup].total || 0;\n groupFilters = groupsById[selectedGroup].filters || [];\n }\n return { groupCount, selectedGroup, groupFilters };\n }\n);\n\nexport const getCombinedLimit = createSelector(\n [getDeviceLimits],\n deviceLimits => Object.values(deviceLimits).reduce((accu, limit) => accu + Math.max(limit ?? 0, 0), 0) // limit might be -1 for unlimited devices\n);\n\nexport const getLimitMaxed = createSelector(\n [getDeviceCountsByStatus, getCombinedLimit],\n ({ accepted: acceptedDevices }, combinedLimit) => !!combinedLimit && combinedLimit <= acceptedDevices\n);\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const getGroupsByIdWithoutUngrouped = createSelector([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);\n\nexport const getGroupData = createSelector([getGroupsByIdWithoutUngrouped], groups => {\n const createdGroup = Object.keys(groups).length ? Object.keys(groups)[0] : undefined;\n const hasDynamicGroups = Object.values(groups).some(group => !!group.id);\n return { createdGroup, hasDynamicGroups, groups };\n});\n\ntype SelectorGroup = DeviceGroup & { groupId: string };\ntype SelectorGroups = { dynamic: SelectorGroup[]; static: SelectorGroup[]; ungrouped: SelectorGroup[] };\n\nexport const getGroups = createSelector([getGroupsById], groupsById => {\n const groupNames = Object.keys(groupsById).sort();\n const groupedGroups = Object.entries(groupsById)\n .sort((a, b) => a[0].localeCompare(b[0]))\n .reduce<SelectorGroups>(\n (accu, [groupname, group]) => {\n const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;\n const groupItem = { ...group, groupId: name, name: groupname };\n if ((group.filters ?? []).length > 0) {\n if (groupname !== UNGROUPED_GROUP.id) {\n accu.dynamic.push(groupItem);\n } else {\n accu.ungrouped.push(groupItem);\n }\n } else {\n accu.static.push(groupItem);\n }\n return accu;\n },\n { dynamic: [], static: [], ungrouped: [] }\n );\n return { groupNames, ...groupedGroups };\n});\nexport const getAttributesList = createSelector(\n [getFilteringAttributes, getFilteringAttributesFromConfig],\n ({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) =>\n [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(duplicateFilter)\n);\nconst getEnabledTierLimits = createSelector([getDeviceLimits], limits => Object.entries(limits).filter(([, limit]) => limit !== 0));\n\nexport const getEnabledTiers = createSelector([getEnabledTierLimits], enabledTierLimits => enabledTierLimits.map(([type]) => type));\n\nexport const getDeviceLimitStats = createSelector([getEnabledTierLimits, getAcceptedDevices], (enabledTierLimits, accepted) => {\n const { counts } = accepted;\n return enabledTierLimits.map(([type, limit]) => ({\n type,\n limit,\n total: counts[type] || 0\n }));\n});\n\nexport const getDeviceTypes = createSelector([getAcceptedDevices, getDevicesById], ({ deviceIds = [] }, devicesById) =>\n Object.keys(\n deviceIds.slice(0, 200).reduce((accu, item) => {\n const { device_type: deviceTypes = [] } = devicesById[item] ? devicesById[item].attributes : {};\n accu = deviceTypes.reduce((deviceTypeAccu, deviceType) => {\n if (deviceType.length > 1) {\n deviceTypeAccu[deviceType] = deviceTypeAccu[deviceType] ? deviceTypeAccu[deviceType] + 1 : 1;\n }\n return deviceTypeAccu;\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