@northern.tech/store 0.46.4 → 0.47.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.
Files changed (226) hide show
  1. package/dist/actions.d.cts +6 -6
  2. package/dist/actions.d.ts +6 -6
  3. package/dist/api/general-api.cjs +2 -2
  4. package/dist/api/general-api.cjs.map +1 -1
  5. package/dist/api/general-api.js +1 -1
  6. package/dist/api/general-api.js.map +1 -1
  7. package/dist/appSlice/constants.cjs +3 -4
  8. package/dist/appSlice/constants.cjs.map +1 -1
  9. package/dist/appSlice/constants.d.cts +1 -1
  10. package/dist/appSlice/constants.d.ts +1 -1
  11. package/dist/appSlice/constants.js +1 -2
  12. package/dist/appSlice/constants.js.map +1 -1
  13. package/dist/appSlice/index.d.cts +1 -1
  14. package/dist/appSlice/index.d.ts +1 -1
  15. package/dist/appSlice/index.js +1 -1
  16. package/dist/appSlice/mocks.d.cts +1 -1
  17. package/dist/appSlice/mocks.d.ts +1 -1
  18. package/dist/appSlice/selectors.cjs.map +1 -1
  19. package/dist/appSlice/selectors.d.cts +2 -130
  20. package/dist/appSlice/selectors.d.ts +2 -130
  21. package/dist/appSlice/selectors.js.map +1 -1
  22. package/dist/appSlice/thunks.d.cts +2 -2
  23. package/dist/appSlice/thunks.d.ts +2 -2
  24. package/dist/auth.cjs +3 -3
  25. package/dist/auth.cjs.map +1 -1
  26. package/dist/auth.d.cts +1 -1
  27. package/dist/auth.d.ts +1 -1
  28. package/dist/auth.js +2 -1
  29. package/dist/auth.js.map +1 -1
  30. package/dist/commonConstants.cjs +4 -3
  31. package/dist/commonConstants.d.cts +2 -2
  32. package/dist/commonConstants.d.ts +2 -2
  33. package/dist/commonConstants.js +1 -1
  34. package/dist/commonSelectors.cjs +1 -1
  35. package/dist/commonSelectors.d.cts +76 -369
  36. package/dist/commonSelectors.d.ts +76 -369
  37. package/dist/commonSelectors.js +1 -1
  38. package/dist/constants-CCkKh9KM.d.ts +109 -0
  39. package/dist/constants-CUwYPOYK.d.cts +109 -0
  40. package/dist/{constants-D5hACLhF.js → constants-DjiC_FnZ.js} +3 -269
  41. package/dist/constants-DjiC_FnZ.js.map +1 -0
  42. package/dist/{constants-MVizYy89.cjs → constants-DsOnY5o5.cjs} +1 -279
  43. package/dist/constants-DsOnY5o5.cjs.map +1 -0
  44. package/dist/{constants-nKSWZ8oD.d.ts → constants-tC3RR_Oo.d.cts} +2 -3
  45. package/dist/{constants-nKSWZ8oD.d.cts → constants-tC3RR_Oo.d.ts} +2 -3
  46. package/dist/constants.cjs +5 -5
  47. package/dist/constants.d.cts +3 -3
  48. package/dist/constants.d.ts +3 -3
  49. package/dist/constants.js +1 -1
  50. package/dist/deploymentsSlice/constants.cjs +1 -1
  51. package/dist/deploymentsSlice/constants.js +1 -1
  52. package/dist/deploymentsSlice/index.cjs +1 -1
  53. package/dist/deploymentsSlice/index.js +1 -1
  54. package/dist/deploymentsSlice/selectors.cjs +1 -1
  55. package/dist/deploymentsSlice/selectors.cjs.map +1 -1
  56. package/dist/deploymentsSlice/selectors.d.cts +2 -97
  57. package/dist/deploymentsSlice/selectors.d.ts +2 -97
  58. package/dist/deploymentsSlice/selectors.js +1 -1
  59. package/dist/deploymentsSlice/selectors.js.map +1 -1
  60. package/dist/deploymentsSlice/thunks.d.cts +4 -4
  61. package/dist/deploymentsSlice/thunks.d.ts +4 -4
  62. package/dist/devicesSlice/constants.cjs +1 -1
  63. package/dist/devicesSlice/constants.d.cts +1 -1
  64. package/dist/devicesSlice/constants.d.ts +1 -1
  65. package/dist/devicesSlice/constants.js +1 -1
  66. package/dist/devicesSlice/index.d.cts +1 -1
  67. package/dist/devicesSlice/index.d.ts +1 -1
  68. package/dist/devicesSlice/index.js +1 -1
  69. package/dist/devicesSlice/mocks.js +1 -1
  70. package/dist/devicesSlice/selectors.cjs +2 -2
  71. package/dist/devicesSlice/selectors.cjs.map +1 -1
  72. package/dist/devicesSlice/selectors.d.cts +2 -887
  73. package/dist/devicesSlice/selectors.d.ts +2 -887
  74. package/dist/devicesSlice/selectors.js +2 -2
  75. package/dist/devicesSlice/selectors.js.map +1 -1
  76. package/dist/devicesSlice/thunks.d.cts +4 -4
  77. package/dist/devicesSlice/thunks.d.ts +4 -4
  78. package/dist/{index-KxRmyFLr.d.cts → index-7jVuB4tG.d.cts} +2 -2
  79. package/dist/{index-fGVC5s1C.d.cts → index-BWtIaimn.d.cts} +2 -2
  80. package/dist/{index-BfmRpbiJ.d.cts → index-BcrZxKLw.d.cts} +2 -2
  81. package/dist/{index--SKVGToc.d.ts → index-C1vNDCYR.d.ts} +2 -2
  82. package/dist/{index-CRqnH_go.d.ts → index-C2za83Qs.d.ts} +2 -2
  83. package/dist/{index-xxqlerg5.d.ts → index-CThE5Gfh.d.ts} +2 -2
  84. package/dist/{index-BKU1G9-x.d.cts → index-CaNZaXie.d.cts} +2 -2
  85. package/dist/{index-BVNS-Aut.d.ts → index-CvMpbsOo.d.ts} +2 -2
  86. package/dist/{index-HjOSTTGF.d.cts → index-CzQRHJ6f.d.cts} +2 -2
  87. package/dist/{index-CqhXqGLt.d.cts → index-DNYeo7wc.d.cts} +2 -2
  88. package/dist/{index-D9GJhX1I.d.ts → index-DOPRnlaC.d.ts} +2 -2
  89. package/dist/{index-BMsafOyJ.d.ts → index-o_m7WKiR.d.ts} +2 -2
  90. package/dist/locationutils.cjs +1 -1
  91. package/dist/locationutils.d.cts +2 -2
  92. package/dist/locationutils.d.ts +2 -2
  93. package/dist/locationutils.js +1 -1
  94. package/dist/mockState.cjs +24 -0
  95. package/dist/mockState.cjs.map +1 -0
  96. package/dist/mockState.d.cts +7 -0
  97. package/dist/mockState.d.ts +7 -0
  98. package/dist/mockState.js +23 -0
  99. package/dist/mockState.js.map +1 -0
  100. package/dist/monitorSlice/constants.d.cts +1 -1
  101. package/dist/monitorSlice/constants.d.ts +1 -1
  102. package/dist/monitorSlice/index.d.cts +1 -1
  103. package/dist/monitorSlice/index.d.ts +1 -1
  104. package/dist/monitorSlice/index.js +1 -1
  105. package/dist/monitorSlice/mocks.d.cts +1 -1
  106. package/dist/monitorSlice/mocks.d.ts +1 -1
  107. package/dist/monitorSlice/mocks.js +1 -1
  108. package/dist/monitorSlice/selectors.cjs.map +1 -1
  109. package/dist/monitorSlice/selectors.d.cts +2 -10
  110. package/dist/monitorSlice/selectors.d.ts +2 -10
  111. package/dist/monitorSlice/selectors.js.map +1 -1
  112. package/dist/monitorSlice/thunks.cjs +2 -3
  113. package/dist/monitorSlice/thunks.cjs.map +1 -1
  114. package/dist/monitorSlice/thunks.d.cts +4 -4
  115. package/dist/monitorSlice/thunks.d.ts +4 -4
  116. package/dist/monitorSlice/thunks.js +3 -2
  117. package/dist/monitorSlice/thunks.js.map +1 -1
  118. package/dist/onboardingSlice/selectors.cjs.map +1 -1
  119. package/dist/onboardingSlice/selectors.d.cts +2 -6
  120. package/dist/onboardingSlice/selectors.d.ts +2 -6
  121. package/dist/onboardingSlice/selectors.js.map +1 -1
  122. package/dist/onboardingSlice/thunks.d.cts +3 -3
  123. package/dist/onboardingSlice/thunks.d.ts +3 -3
  124. package/dist/organizationSlice/constants.cjs +1 -1
  125. package/dist/organizationSlice/constants.js +1 -1
  126. package/dist/organizationSlice/index.cjs +1 -1
  127. package/dist/organizationSlice/index.d.cts +1 -1
  128. package/dist/organizationSlice/index.d.ts +1 -1
  129. package/dist/organizationSlice/index.js +1 -1
  130. package/dist/organizationSlice/mocks.d.cts +3 -3
  131. package/dist/organizationSlice/mocks.d.ts +3 -3
  132. package/dist/organizationSlice/mocks.js +1 -1
  133. package/dist/organizationSlice/selectors.cjs +1 -1
  134. package/dist/organizationSlice/selectors.cjs.map +1 -1
  135. package/dist/organizationSlice/selectors.d.cts +2 -472
  136. package/dist/organizationSlice/selectors.d.ts +2 -472
  137. package/dist/organizationSlice/selectors.js +1 -1
  138. package/dist/organizationSlice/selectors.js.map +1 -1
  139. package/dist/organizationSlice/thunks.d.cts +25 -21
  140. package/dist/organizationSlice/thunks.d.ts +25 -21
  141. package/dist/organizationSlice/types.d.cts +1 -1
  142. package/dist/organizationSlice/types.d.ts +1 -1
  143. package/dist/releasesSlice/index.d.cts +1 -1
  144. package/dist/releasesSlice/index.d.ts +1 -1
  145. package/dist/releasesSlice/index.js +1 -1
  146. package/dist/releasesSlice/mocks.js +1 -1
  147. package/dist/releasesSlice/selectors.cjs.map +1 -1
  148. package/dist/releasesSlice/selectors.d.cts +2 -795
  149. package/dist/releasesSlice/selectors.d.ts +2 -795
  150. package/dist/releasesSlice/selectors.js.map +1 -1
  151. package/dist/releasesSlice/thunks.cjs +17 -17
  152. package/dist/releasesSlice/thunks.cjs.map +1 -1
  153. package/dist/releasesSlice/thunks.d.cts +5 -5
  154. package/dist/releasesSlice/thunks.d.ts +5 -5
  155. package/dist/releasesSlice/thunks.js +2 -1
  156. package/dist/releasesSlice/thunks.js.map +1 -1
  157. package/dist/selectors-1394DVvN.d.ts +712 -0
  158. package/dist/selectors-Ba9LUr_0.d.ts +593 -0
  159. package/dist/selectors-CAo0fzIZ.d.ts +99 -0
  160. package/dist/selectors-CH-yXu-7.d.cts +84 -0
  161. package/dist/selectors-CQYkG1VI.d.cts +9 -0
  162. package/dist/selectors-D9t4It2i.d.ts +84 -0
  163. package/dist/selectors-DDsFLtxz.d.cts +712 -0
  164. package/dist/selectors-DFSv4A_m.d.ts +378 -0
  165. package/dist/selectors-DQKg681M.d.ts +363 -0
  166. package/dist/selectors-DeqP_VLU.d.cts +593 -0
  167. package/dist/selectors-LhR8TyWU.d.cts +378 -0
  168. package/dist/selectors-XzNyGFJI.d.cts +99 -0
  169. package/dist/selectors-aLOjKkxN.d.cts +14 -0
  170. package/dist/selectors-elCimAHX.d.ts +9 -0
  171. package/dist/selectors-jusUdUdc.d.cts +363 -0
  172. package/dist/selectors-vk0GUGHf.d.ts +14 -0
  173. package/dist/selectors.d.cts +9 -9
  174. package/dist/selectors.d.ts +9 -9
  175. package/dist/sockethook.cjs +4 -4
  176. package/dist/sockethook.cjs.map +1 -1
  177. package/dist/sockethook.js +2 -1
  178. package/dist/sockethook.js.map +1 -1
  179. package/dist/{store-Dw8Uo_Df.d.cts → store-CCvk8X-k.d.cts} +14 -33
  180. package/dist/{store-DLp6ajT8.d.ts → store-v5V-bbB_.d.ts} +15 -34
  181. package/dist/store.cjs +2 -4
  182. package/dist/store.cjs.map +1 -1
  183. package/dist/store.d.cts +2 -2
  184. package/dist/store.d.ts +2 -2
  185. package/dist/store.js +2 -4
  186. package/dist/store.js.map +1 -1
  187. package/dist/thunks.cjs +30 -38
  188. package/dist/thunks.cjs.map +1 -1
  189. package/dist/thunks.js +10 -17
  190. package/dist/thunks.js.map +1 -1
  191. package/dist/{types-DY0J79yF.d.ts → types-B2gphGj8.d.ts} +3 -3
  192. package/dist/{types-B67YW1jV.d.cts → types-CLASWtVP.d.cts} +3 -3
  193. package/dist/usersSlice/constants.cjs +1 -1
  194. package/dist/usersSlice/constants.js +1 -1
  195. package/dist/usersSlice/index.cjs +1 -1
  196. package/dist/usersSlice/index.d.cts +1 -1
  197. package/dist/usersSlice/index.d.ts +1 -1
  198. package/dist/usersSlice/index.js +1 -1
  199. package/dist/usersSlice/mocks.d.cts +1 -1
  200. package/dist/usersSlice/mocks.d.ts +1 -1
  201. package/dist/usersSlice/mocks.js +1 -1
  202. package/dist/usersSlice/selectors.cjs +3 -3
  203. package/dist/usersSlice/selectors.cjs.map +1 -1
  204. package/dist/usersSlice/selectors.d.cts +2 -466
  205. package/dist/usersSlice/selectors.d.ts +2 -466
  206. package/dist/usersSlice/selectors.js +2 -2
  207. package/dist/usersSlice/selectors.js.map +1 -1
  208. package/dist/usersSlice/thunks.d.cts +88 -88
  209. package/dist/usersSlice/thunks.d.ts +88 -88
  210. package/dist/utils.cjs +5 -10
  211. package/dist/utils.cjs.map +1 -1
  212. package/dist/utils.d.cts +1 -1
  213. package/dist/utils.d.ts +1 -1
  214. package/dist/utils.js +4 -8
  215. package/dist/utils.js.map +1 -1
  216. package/package.json +1 -1
  217. package/dist/constants-BJuY-ODE.d.ts +0 -124
  218. package/dist/constants-C2O55iZu.d.cts +0 -124
  219. package/dist/constants-D5hACLhF.js.map +0 -1
  220. package/dist/constants-MVizYy89.cjs.map +0 -1
  221. package/dist/storehooks.cjs +0 -249
  222. package/dist/storehooks.cjs.map +0 -1
  223. package/dist/storehooks.d.cts +0 -49
  224. package/dist/storehooks.d.ts +0 -49
  225. package/dist/storehooks.js +0 -241
  226. package/dist/storehooks.js.map +0 -1
@@ -1,97 +1,2 @@
1
- import { o as UserSliceType } from "../index-CqhXqGLt.cjs";
2
- import { a as ReleaseSliceType } from "../index-fGVC5s1C.cjs";
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 UserSliceType } from "../index--SKVGToc.js";
2
- import { a as ReleaseSliceType } from "../index-BMsafOyJ.js";
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 { _t as DEPLOYMENT_STATES } from "../constants-D5hACLhF.js";
1
+ import { _t as DEPLOYMENT_STATES } from "../constants-DjiC_FnZ.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 type { RootState } from '../store';\nimport { DEPLOYMENT_STATES } from './constants';\n\nexport const getDeploymentsById = (state: RootState) => state.deployments.byId;\nexport const getDeploymentsByStatus = (state: RootState) => state.deployments.byStatus;\nexport const getSelectedDeploymentDeviceIds = (state: RootState) => state.deployments.selectedDeviceIds;\nexport const getDeploymentsSelectionState = (state: RootState) => 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":";;;AAmBA,MAAa,sBAAsB,UAAqB,MAAM,YAAY;AAC1E,MAAa,0BAA0B,UAAqB,MAAM,YAAY;AAC9E,MAAa,kCAAkC,UAAqB,MAAM,YAAY;AACtF,MAAa,gCAAgC,UAAqB,MAAM,YAAY;AAEpF,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
+ {"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-C2O55iZu.cjs";
1
+ import { T as SortOptions } from "../constants-CUwYPOYK.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-KxRmyFLr.cjs";
4
- import { i as SnackbarContent } from "../index-BKU1G9-x.cjs";
5
- import { r as RootState, t as AppDispatch } from "../store-Dw8Uo_Df.cjs";
3
+ import { t as Device$1 } from "../index-7jVuB4tG.cjs";
4
+ import { i as SnackbarContent } from "../index-CaNZaXie.cjs";
5
+ import { i as RootState, t as AppDispatch } from "../store-CCvk8X-k.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;
@@ -1,8 +1,8 @@
1
- import { T as SortOptions } from "../constants-BJuY-ODE.js";
1
+ import { T as SortOptions } from "../constants-CCkKh9KM.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-D9GJhX1I.js";
4
- import { i as SnackbarContent } from "../index-xxqlerg5.js";
5
- import { r as RootState, t as AppDispatch } from "../store-DLp6ajT8.js";
3
+ import { t as Device$1 } from "../index-DOPRnlaC.js";
4
+ import { i as SnackbarContent } from "../index-CThE5Gfh.js";
5
+ import { i as RootState, t as AppDispatch } from "../store-v5V-bbB_.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;
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_constants = require("../constants-MVizYy89.cjs");
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 emptyFilter, dt as DEVICE_CONNECT_STATES, ft as DEVICE_DISMISSAL_STATE, gt as REPORT_CHART_SIZE_LIMIT, ht as DeviceAuthState, mt as DEVICE_MESSAGE_TYPES, pt as DEVICE_MESSAGE_PROTOCOLS, vt as geoAttributes } from "../constants-C2O55iZu.cjs";
1
+ import { _t as emptyFilter, dt as DEVICE_CONNECT_STATES, ft as DEVICE_DISMISSAL_STATE, gt as REPORT_CHART_SIZE_LIMIT, ht as DeviceAuthState, mt as DEVICE_MESSAGE_TYPES, pt as DEVICE_MESSAGE_PROTOCOLS, vt as geoAttributes } from "../constants-CUwYPOYK.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 emptyFilter, dt as DEVICE_CONNECT_STATES, ft as DEVICE_DISMISSAL_STATE, gt as REPORT_CHART_SIZE_LIMIT, ht as DeviceAuthState, mt as DEVICE_MESSAGE_TYPES, pt as DEVICE_MESSAGE_PROTOCOLS, vt as geoAttributes } from "../constants-BJuY-ODE.js";
1
+ import { _t as emptyFilter, dt as DEVICE_CONNECT_STATES, ft as DEVICE_DISMISSAL_STATE, gt as REPORT_CHART_SIZE_LIMIT, ht as DeviceAuthState, mt as DEVICE_MESSAGE_TYPES, pt as DEVICE_MESSAGE_PROTOCOLS, vt as geoAttributes } from "../constants-CCkKh9KM.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 { ct as DEVICE_CONNECT_STATES, dt as DEVICE_MESSAGE_TYPES, ft as REPORT_CHART_SIZE_LIMIT, lt as DEVICE_DISMISSAL_STATE, mt as geoAttributes, pt as emptyFilter, ut as DEVICE_MESSAGE_PROTOCOLS } from "../constants-D5hACLhF.js";
1
+ import { ct as DEVICE_CONNECT_STATES, dt as DEVICE_MESSAGE_TYPES, ft as REPORT_CHART_SIZE_LIMIT, lt as DEVICE_DISMISSAL_STATE, mt as geoAttributes, pt as emptyFilter, ut as DEVICE_MESSAGE_PROTOCOLS } from "../constants-DjiC_FnZ.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-KxRmyFLr.cjs";
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-7jVuB4tG.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-D9GJhX1I.js";
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-DOPRnlaC.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-D5hACLhF.js";
1
+ import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS, u as DEVICE_STATES } from "../constants-DjiC_FnZ.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-D5hACLhF.js";
1
+ import { f as SORTING_OPTIONS, u as DEVICE_STATES } from "../constants-DjiC_FnZ.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-MVizYy89.cjs");
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");
@@ -24,7 +24,7 @@ const getDeviceLimits = (state) => state.devices.limits;
24
24
  const getTestDeviceCount = (state) => state.devices.testDeviceCount;
25
25
  const getFilteringAttributesLimit = (state) => state.devices.filteringAttributesLimit;
26
26
  const getDeviceIdentityAttributes = (0, _reduxjs_toolkit.createSelector)([getFilteringAttributes, getFilteringAttributesLimit], ({ identityAttributes }, filteringAttributesLimit) => {
27
- return identityAttributes.slice(0, filteringAttributesLimit).reduce((accu, value) => {
27
+ return identityAttributes.filter((attribute) => attribute !== "status").slice(0, filteringAttributesLimit).reduce((accu, value) => {
28
28
  accu.push({
29
29
  value,
30
30
  label: value,
@@ -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 // limit the selection of the available attribute to AVAILABLE_ATTRIBUTE_LIMIT\n const attributes = identityAttributes.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,MAAM,QAAQ,WAAW;AAC/E,MAAa,0BAA0B,UAAqB,MAAM,QAAQ;AAC1E,MAAa,oBAAoB,UAAqB,MAAM,QAAQ,WAAW,CAAC;AAChF,MAAa,sBAAsB,UAAqB,MAAM,QAAQ;AACtE,MAAM,oCAAoC,UAAqB,MAAM,QAAQ,0BAA0B;AACvG,MAAa,gCAAA,GAA+BA,iBAAAA,eAAAA,CAAe,CAAC,sBAAsB,IAAG,yBAAwB;CAC3G,GAAG;CACH,oBAAoB,CAAC,GAAG,oBAAoB,oBAAoB,IAAI;AACtE,EAAE;AACF,MAAa,mBAAmB,UAAqB,MAAM,QAAQ;AACnE,MAAa,sBAAsB,UAAqB,MAAM,QAAQ;AACtE,MAAM,+BAA+B,UAAqB,MAAM,QAAQ;AAExE,MAAa,+BAAA,GAA8BA,iBAAAA,eAAAA,CACzC,CAAC,wBAAwB,2BAA2B,IACnD,EAAE,sBAAsB,6BAA6B;CAGpD,OADmB,mBAAmB,MAAM,GAAG,wBAC/B,CAAC,CAAC,QACf,MAAM,UAAU;EACf,KAAK,KAAK;GAAE;GAAO,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ector","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;\n }, accu);\n return accu;\n }, {})\n )\n);\n"],"mappings":";;;;;;AAsBA,MAAa,sBAAsB,UAAwB,MAAM,QAAQ,SAAS;AAClF,MAAa,sBAAsB,UAAwB,MAAM,QAAQ;AACzE,MAAa,kBAAkB,UAAwB,MAAM,QAAQ;AACrE,MAAa,oBAAoB,UAAwB,MAAM,QAAQ;AACvE,MAAa,iBAAiB,UAAwB,MAAM,QAAQ,OAAO;AAC3E,MAAa,oBAAoB,UAAwB,MAAM,QAAQ,OAAO;AAE9E,MAAa,sBAAsB,UAAwB,MAAM,QAAQ;AACzE,MAAa,oBAAoB,UAAwB,MAAM,QAAQ,WAAW;AAClF,MAAa,0BAA0B,UAAwB,MAAM,QAAQ;AAC7E,MAAa,oBAAoB,UAAwB,MAAM,QAAQ,WAAW,CAAC;AACnF,MAAa,sBAAsB,UAAwB,MAAM,QAAQ;AACzE,MAAM,oCAAoC,UAAwB,MAAM,QAAQ,0BAA0B;AAC1G,MAAa,gCAAA,GAA+BA,iBAAAA,eAAAA,CAAe,CAAC,sBAAsB,IAAG,yBAAwB;CAC3G,GAAG;CACH,oBAAoB,CAAC,GAAG,oBAAoB,oBAAoB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