@northern.tech/store 0.30.0 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.cjs +21 -1130
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +212 -221
- package/dist/actions.d.ts +212 -220
- package/dist/actions.js +21 -18
- package/dist/actions.js.map +1 -1
- package/dist/api/general-api.cjs +61 -459
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.d.cts +15 -17
- package/dist/api/general-api.d.ts +15 -17
- package/dist/api/general-api.js +56 -15
- package/dist/api/general-api.js.map +1 -1
- package/dist/api/users-api.cjs +32 -469
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.d.cts +19 -14
- package/dist/api/users-api.d.ts +19 -13
- package/dist/api/users-api.js +30 -12
- package/dist/api/users-api.js.map +1 -1
- package/dist/appSlice/constants.cjs +190 -144
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +2 -159
- package/dist/appSlice/constants.d.ts +2 -159
- package/dist/appSlice/constants.js +181 -29
- package/dist/appSlice/constants.js.map +1 -1
- package/dist/appSlice/index.cjs +147 -178
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +2 -148
- package/dist/appSlice/index.d.ts +2 -148
- package/dist/appSlice/index.js +142 -18
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/mocks.cjs +17 -191
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.d.cts +33 -36
- package/dist/appSlice/mocks.d.ts +33 -36
- package/dist/appSlice/mocks.js +17 -25
- package/dist/appSlice/mocks.js.map +1 -1
- package/dist/appSlice/selectors.cjs +49 -91
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +216 -230
- package/dist/appSlice/selectors.d.ts +216 -230
- package/dist/appSlice/selectors.js +29 -44
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/thunks.cjs +6 -4636
- package/dist/appSlice/thunks.d.cts +59 -62
- package/dist/appSlice/thunks.d.ts +59 -62
- package/dist/appSlice/thunks.js +2 -45
- package/dist/auth.cjs +68 -433
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +14 -14
- package/dist/auth.d.ts +14 -14
- package/dist/auth.js +65 -18
- package/dist/auth.js.map +1 -1
- package/dist/chunk-CKQMccvm.cjs +28 -0
- package/dist/commonConstants.cjs +14 -393
- package/dist/commonConstants.d.cts +2 -83
- package/dist/commonConstants.d.ts +2 -83
- package/dist/commonConstants.js +2 -33
- package/dist/commonSelectors.cjs +284 -1269
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +1623 -1416
- package/dist/commonSelectors.d.ts +1623 -1416
- package/dist/commonSelectors.js +277 -51
- package/dist/commonSelectors.js.map +1 -1
- package/dist/constants-5cdwz1iH.d.ts +160 -0
- package/dist/constants-BWEsNG5c.d.ts +28 -0
- package/dist/constants-BciiayPt.d.ts +17 -0
- package/dist/constants-C5AU0mCY.d.ts +157 -0
- package/dist/constants-CIx3fnBv.d.cts +17 -0
- package/dist/constants-CNhpIMME.d.cts +93 -0
- package/dist/constants-Cpgyuy_r.d.ts +57 -0
- package/dist/constants-D41U_jbR.d.cts +160 -0
- package/dist/constants-DK7fI3Rh.d.cts +28 -0
- package/dist/constants-DPLHhjVN.d.cts +157 -0
- package/dist/constants-DrwXHsJ1.d.ts +120 -0
- package/dist/constants-G3wymKIl.d.cts +57 -0
- package/dist/constants-MPLfugsi.d.cts +120 -0
- package/dist/constants-y2XVLQWf.d.ts +93 -0
- package/dist/constants.cjs +784 -972
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +8 -14
- package/dist/constants.d.ts +8 -14
- package/dist/constants.js +674 -232
- package/dist/constants.js.map +1 -1
- package/dist/deploymentsSlice/constants.cjs +15 -214
- package/dist/deploymentsSlice/constants.d.cts +2 -163
- package/dist/deploymentsSlice/constants.d.ts +2 -163
- package/dist/deploymentsSlice/constants.js +2 -35
- package/dist/deploymentsSlice/index.cjs +168 -302
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.d.cts +2 -157
- package/dist/deploymentsSlice/index.d.ts +2 -157
- package/dist/deploymentsSlice/index.js +161 -18
- package/dist/deploymentsSlice/index.js.map +1 -1
- package/dist/deploymentsSlice/mocks.cjs +178 -433
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.d.cts +176 -178
- package/dist/deploymentsSlice/mocks.d.ts +176 -178
- package/dist/deploymentsSlice/mocks.js +178 -144
- package/dist/deploymentsSlice/mocks.js.map +1 -1
- package/dist/deploymentsSlice/selectors.cjs +44 -223
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +73 -87
- package/dist/deploymentsSlice/selectors.d.ts +73 -87
- package/dist/deploymentsSlice/selectors.js +37 -25
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/thunks.cjs +16 -4654
- package/dist/deploymentsSlice/thunks.d.cts +223 -236
- package/dist/deploymentsSlice/thunks.d.ts +223 -236
- package/dist/deploymentsSlice/thunks.js +2 -65
- package/dist/devicesSlice/constants.cjs +9 -68
- package/dist/devicesSlice/constants.d.cts +2 -37
- package/dist/devicesSlice/constants.d.ts +2 -37
- package/dist/devicesSlice/constants.js +2 -23
- package/dist/devicesSlice/index.cjs +215 -225
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +2 -202
- package/dist/devicesSlice/index.d.ts +2 -202
- package/dist/devicesSlice/index.js +209 -18
- package/dist/devicesSlice/index.js.map +1 -1
- package/dist/devicesSlice/mocks.cjs +146 -339
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.d.cts +150 -148
- package/dist/devicesSlice/mocks.d.ts +150 -148
- package/dist/devicesSlice/mocks.js +145 -132
- package/dist/devicesSlice/mocks.js.map +1 -1
- package/dist/devicesSlice/selectors.cjs +145 -539
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +685 -699
- package/dist/devicesSlice/selectors.d.ts +685 -699
- package/dist/devicesSlice/selectors.js +123 -59
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/thunks.cjs +48 -4718
- package/dist/devicesSlice/thunks.d.cts +800 -752
- package/dist/devicesSlice/thunks.d.ts +800 -752
- package/dist/devicesSlice/thunks.js +2 -129
- package/dist/index-4eaLEXy_.d.cts +152 -0
- package/dist/index-BEVkIiNa.d.cts +95 -0
- package/dist/index-BP0uAq36.d.cts +159 -0
- package/dist/index-Bwx9jEiL.d.cts +71 -0
- package/dist/index-CJkrL0oA.d.ts +64 -0
- package/dist/index-CO-py5d4.d.ts +95 -0
- package/dist/index-CTt-eIY8.d.cts +154 -0
- package/dist/index-CkwVnIqd.d.ts +159 -0
- package/dist/index-Cvkvcz4r.d.ts +115 -0
- package/dist/index-DJSlDPRX.d.ts +71 -0
- package/dist/index-DqyY6oZ3.d.ts +205 -0
- package/dist/index-DtePEQPT.d.ts +152 -0
- package/dist/index-Dv3Hfxk_.d.ts +154 -0
- package/dist/index-FyYBBeN-.d.cts +115 -0
- package/dist/index-Lz5JsJ6O.d.cts +205 -0
- package/dist/index-UPc3wvVd.d.cts +64 -0
- package/dist/liststatehook.cjs +83 -948
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.d.cts +29 -239
- package/dist/liststatehook.d.ts +29 -239
- package/dist/liststatehook.js +77 -85
- package/dist/liststatehook.js.map +1 -1
- package/dist/locationutils.cjs +459 -916
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.d.cts +244 -110
- package/dist/locationutils.d.ts +244 -110
- package/dist/locationutils.js +440 -44
- package/dist/locationutils.js.map +1 -1
- package/dist/monitorSlice/constants.cjs +0 -19
- package/dist/monitorSlice/constants.d.cts +2 -5
- package/dist/monitorSlice/constants.d.ts +2 -5
- package/dist/monitorSlice/constants.js +1 -2
- package/dist/monitorSlice/index.cjs +65 -82
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.d.cts +2 -94
- package/dist/monitorSlice/index.d.ts +2 -94
- package/dist/monitorSlice/index.js +59 -18
- package/dist/monitorSlice/index.js.map +1 -1
- package/dist/monitorSlice/mocks.cjs +50 -126
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.d.cts +49 -45
- package/dist/monitorSlice/mocks.d.ts +49 -45
- package/dist/monitorSlice/mocks.js +49 -62
- package/dist/monitorSlice/mocks.js.map +1 -1
- package/dist/monitorSlice/selectors.cjs +5 -29
- package/dist/monitorSlice/selectors.cjs.map +1 -1
- package/dist/monitorSlice/selectors.d.cts +10 -1
- package/dist/monitorSlice/selectors.d.ts +10 -1
- package/dist/monitorSlice/selectors.js +5 -6
- package/dist/monitorSlice/selectors.js.map +1 -1
- package/dist/monitorSlice/thunks.cjs +83 -1914
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +112 -120
- package/dist/monitorSlice/thunks.d.ts +112 -120
- package/dist/monitorSlice/thunks.js +78 -42
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/constants.cjs +44 -69
- package/dist/onboardingSlice/constants.cjs.map +1 -1
- package/dist/onboardingSlice/constants.d.cts +2 -26
- package/dist/onboardingSlice/constants.d.ts +2 -26
- package/dist/onboardingSlice/constants.js +43 -7
- package/dist/onboardingSlice/constants.js.map +1 -1
- package/dist/onboardingSlice/index.cjs +53 -73
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.d.cts +2 -62
- package/dist/onboardingSlice/index.d.ts +2 -62
- package/dist/onboardingSlice/index.js +47 -13
- package/dist/onboardingSlice/index.js.map +1 -1
- package/dist/onboardingSlice/mocks.cjs +12 -81
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/mocks.d.cts +14 -15
- package/dist/onboardingSlice/mocks.d.ts +14 -15
- package/dist/onboardingSlice/mocks.js +12 -15
- package/dist/onboardingSlice/mocks.js.map +1 -1
- package/dist/onboardingSlice/selectors.cjs +5 -29
- package/dist/onboardingSlice/selectors.cjs.map +1 -1
- package/dist/onboardingSlice/selectors.d.cts +6 -1
- package/dist/onboardingSlice/selectors.d.ts +6 -1
- package/dist/onboardingSlice/selectors.js +5 -6
- package/dist/onboardingSlice/selectors.js.map +1 -1
- package/dist/onboardingSlice/thunks.cjs +8 -4746
- package/dist/onboardingSlice/thunks.d.cts +124 -143
- package/dist/onboardingSlice/thunks.d.ts +124 -143
- package/dist/onboardingSlice/thunks.js +2 -49
- package/dist/organizationSlice/constants.cjs +11 -95
- package/dist/organizationSlice/constants.d.cts +2 -91
- package/dist/organizationSlice/constants.d.ts +2 -91
- package/dist/organizationSlice/constants.js +2 -27
- package/dist/organizationSlice/index.cjs +113 -152
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +2 -74
- package/dist/organizationSlice/index.d.ts +2 -74
- package/dist/organizationSlice/index.js +106 -18
- package/dist/organizationSlice/index.js.map +1 -1
- package/dist/organizationSlice/mocks.cjs +215 -406
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.d.cts +209 -212
- package/dist/organizationSlice/mocks.d.ts +209 -212
- package/dist/organizationSlice/mocks.js +214 -184
- package/dist/organizationSlice/mocks.js.map +1 -1
- package/dist/organizationSlice/selectors.cjs +97 -474
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +381 -389
- package/dist/organizationSlice/selectors.d.ts +381 -389
- package/dist/organizationSlice/selectors.js +78 -50
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.cjs +43 -5150
- package/dist/organizationSlice/thunks.d.cts +638 -649
- package/dist/organizationSlice/thunks.d.ts +638 -649
- package/dist/organizationSlice/thunks.js +2 -119
- package/dist/organizationSlice/types.cjs +0 -19
- package/dist/organizationSlice/types.d.cts +2 -88
- package/dist/organizationSlice/types.d.ts +2 -88
- package/dist/organizationSlice/types.js +1 -1
- package/dist/releasesSlice/constants.cjs +17 -41
- package/dist/releasesSlice/constants.cjs.map +1 -1
- package/dist/releasesSlice/constants.d.cts +2 -15
- package/dist/releasesSlice/constants.d.ts +2 -15
- package/dist/releasesSlice/constants.js +13 -14
- package/dist/releasesSlice/constants.js.map +1 -1
- package/dist/releasesSlice/index.cjs +106 -179
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +2 -113
- package/dist/releasesSlice/index.d.ts +2 -113
- package/dist/releasesSlice/index.js +100 -18
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/mocks.cjs +44 -220
- package/dist/releasesSlice/mocks.cjs.map +1 -1
- package/dist/releasesSlice/mocks.d.cts +63 -61
- package/dist/releasesSlice/mocks.d.ts +63 -61
- package/dist/releasesSlice/mocks.js +43 -59
- package/dist/releasesSlice/mocks.js.map +1 -1
- package/dist/releasesSlice/selectors.cjs +44 -439
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +268 -280
- package/dist/releasesSlice/selectors.d.ts +268 -280
- package/dist/releasesSlice/selectors.js +31 -36
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +422 -2175
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +305 -307
- package/dist/releasesSlice/thunks.d.ts +305 -307
- package/dist/releasesSlice/thunks.js +413 -65
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/selectors.cjs +136 -1530
- package/dist/selectors.d.cts +10 -36
- package/dist/selectors.d.ts +10 -36
- package/dist/selectors.js +10 -280
- package/dist/sockethook.cjs +140 -515
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.d.cts +25 -9
- package/dist/sockethook.d.ts +25 -9
- package/dist/sockethook.js +134 -135
- package/dist/sockethook.js.map +1 -1
- package/dist/store-BQxOSRC1.d.ts +234 -0
- package/dist/store-BiIA0r0A.d.cts +234 -0
- package/dist/store.cjs +117 -1290
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +3 -206
- package/dist/store.d.ts +3 -206
- package/dist/store.js +110 -32
- package/dist/store.js.map +1 -1
- package/dist/storehooks.cjs +240 -5783
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.d.cts +76 -4
- package/dist/storehooks.d.ts +76 -4
- package/dist/storehooks.js +229 -265
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +2656 -5918
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +9 -36
- package/dist/thunks.d.ts +9 -36
- package/dist/thunks.js +2481 -385
- package/dist/thunks.js.map +1 -1
- package/dist/types-B2NRQLFw.d.ts +88 -0
- package/dist/types-ClEfo0dK.d.cts +88 -0
- package/dist/useDeploymentDevice.cjs +26 -4650
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.d.cts +4 -2
- package/dist/useDeploymentDevice.d.ts +4 -2
- package/dist/useDeploymentDevice.js +21 -60
- package/dist/useDeploymentDevice.js.map +1 -1
- package/dist/usersSlice/constants.cjs +8 -55
- package/dist/usersSlice/constants.d.cts +2 -52
- package/dist/usersSlice/constants.d.ts +2 -52
- package/dist/usersSlice/constants.js +2 -21
- package/dist/usersSlice/index.cjs +132 -172
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +2 -152
- package/dist/usersSlice/index.d.ts +2 -152
- package/dist/usersSlice/index.js +125 -18
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/mocks.cjs +55 -196
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.d.cts +68 -72
- package/dist/usersSlice/mocks.d.ts +68 -72
- package/dist/usersSlice/mocks.js +54 -46
- package/dist/usersSlice/mocks.js.map +1 -1
- package/dist/usersSlice/selectors.cjs +65 -567
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +364 -376
- package/dist/usersSlice/selectors.d.ts +364 -376
- package/dist/usersSlice/selectors.js +44 -50
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/thunks.cjs +39 -4698
- package/dist/usersSlice/thunks.d.cts +820 -856
- package/dist/usersSlice/thunks.d.ts +820 -856
- package/dist/usersSlice/thunks.js +2 -111
- package/dist/utils-CO_CpGFP.d.ts +105 -0
- package/dist/utils-CpPfqW0Q.d.cts +105 -0
- package/dist/utils.cjs +231 -850
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -80
- package/dist/utils.d.ts +2 -80
- package/dist/utils.js +211 -50
- package/dist/utils.js.map +1 -1
- package/package.json +11 -13
- package/dist/appSlice/thunks.cjs.map +0 -1
- package/dist/appSlice/thunks.js.map +0 -1
- package/dist/chunk-2DYA3X77.js +0 -15
- package/dist/chunk-2DYA3X77.js.map +0 -1
- package/dist/chunk-4BHM6WVX.js +0 -50
- package/dist/chunk-4BHM6WVX.js.map +0 -1
- package/dist/chunk-4UNLEL5A.js +0 -143
- package/dist/chunk-4UNLEL5A.js.map +0 -1
- package/dist/chunk-6V5IIIF7.js +0 -396
- package/dist/chunk-6V5IIIF7.js.map +0 -1
- package/dist/chunk-ARMI6SZS.js +0 -446
- package/dist/chunk-ARMI6SZS.js.map +0 -1
- package/dist/chunk-AZF4YY3P.js +0 -108
- package/dist/chunk-AZF4YY3P.js.map +0 -1
- package/dist/chunk-B5AI2YPV.js +0 -156
- package/dist/chunk-B5AI2YPV.js.map +0 -1
- package/dist/chunk-CQXDAXQF.js +0 -51
- package/dist/chunk-CQXDAXQF.js.map +0 -1
- package/dist/chunk-DBBE6D36.js +0 -115
- package/dist/chunk-DBBE6D36.js.map +0 -1
- package/dist/chunk-ECVQVQEL.js +0 -68
- package/dist/chunk-ECVQVQEL.js.map +0 -1
- package/dist/chunk-FAJ3I2UQ.js +0 -47
- package/dist/chunk-FAJ3I2UQ.js.map +0 -1
- package/dist/chunk-FCY7BUGK.js +0 -2876
- package/dist/chunk-FCY7BUGK.js.map +0 -1
- package/dist/chunk-FG37HJLC.js +0 -157
- package/dist/chunk-FG37HJLC.js.map +0 -1
- package/dist/chunk-FQAUVV6C.js +0 -246
- package/dist/chunk-FQAUVV6C.js.map +0 -1
- package/dist/chunk-HKN3RN2Z.js +0 -41
- package/dist/chunk-HKN3RN2Z.js.map +0 -1
- package/dist/chunk-HPKXWNEF.js +0 -100
- package/dist/chunk-HPKXWNEF.js.map +0 -1
- package/dist/chunk-JIS4PA3R.js +0 -7
- package/dist/chunk-JIS4PA3R.js.map +0 -1
- package/dist/chunk-JXBTIFMS.js +0 -82
- package/dist/chunk-JXBTIFMS.js.map +0 -1
- package/dist/chunk-JYPSCCT4.js +0 -58
- package/dist/chunk-JYPSCCT4.js.map +0 -1
- package/dist/chunk-L53CPHJU.js +0 -721
- package/dist/chunk-L53CPHJU.js.map +0 -1
- package/dist/chunk-MNJXEB7S.js +0 -304
- package/dist/chunk-MNJXEB7S.js.map +0 -1
- package/dist/chunk-NMAXZ3ZY.js +0 -1
- package/dist/chunk-NMAXZ3ZY.js.map +0 -1
- package/dist/chunk-NXLXPRYW.js +0 -142
- package/dist/chunk-NXLXPRYW.js.map +0 -1
- package/dist/chunk-O6VCSLNE.js +0 -59
- package/dist/chunk-O6VCSLNE.js.map +0 -1
- package/dist/chunk-PQADM3M3.js +0 -115
- package/dist/chunk-PQADM3M3.js.map +0 -1
- package/dist/chunk-SJ75YKOA.js +0 -44
- package/dist/chunk-SJ75YKOA.js.map +0 -1
- package/dist/chunk-TUPBZ6MQ.js +0 -162
- package/dist/chunk-TUPBZ6MQ.js.map +0 -1
- package/dist/chunk-XF3TZSZS.js +0 -25
- package/dist/chunk-XF3TZSZS.js.map +0 -1
- package/dist/chunk-YB3US6OT.js +0 -61
- package/dist/chunk-YB3US6OT.js.map +0 -1
- package/dist/chunk-YDDE5TIH.js +0 -204
- package/dist/chunk-YDDE5TIH.js.map +0 -1
- package/dist/chunk-YO22XLHI.js +0 -7
- package/dist/chunk-YO22XLHI.js.map +0 -1
- package/dist/chunk-Z2O6LYVP.js +0 -144
- package/dist/chunk-Z2O6LYVP.js.map +0 -1
- package/dist/chunk-ZKAH3APE.js +0 -1
- package/dist/chunk-ZKAH3APE.js.map +0 -1
- package/dist/commonConstants.cjs.map +0 -1
- package/dist/commonConstants.js.map +0 -1
- package/dist/deploymentsSlice/constants.cjs.map +0 -1
- package/dist/deploymentsSlice/constants.js.map +0 -1
- package/dist/deploymentsSlice/thunks.cjs.map +0 -1
- package/dist/deploymentsSlice/thunks.js.map +0 -1
- package/dist/devicesSlice/constants.cjs.map +0 -1
- package/dist/devicesSlice/constants.js.map +0 -1
- package/dist/devicesSlice/thunks.cjs.map +0 -1
- package/dist/devicesSlice/thunks.js.map +0 -1
- package/dist/monitorSlice/constants.cjs.map +0 -1
- package/dist/monitorSlice/constants.js.map +0 -1
- package/dist/onboardingSlice/thunks.cjs.map +0 -1
- package/dist/onboardingSlice/thunks.js.map +0 -1
- package/dist/organizationSlice/constants.cjs.map +0 -1
- package/dist/organizationSlice/constants.js.map +0 -1
- package/dist/organizationSlice/thunks.cjs.map +0 -1
- package/dist/organizationSlice/thunks.js.map +0 -1
- package/dist/organizationSlice/types.cjs.map +0 -1
- package/dist/organizationSlice/types.js.map +0 -1
- package/dist/selectors.cjs.map +0 -1
- package/dist/selectors.js.map +0 -1
- package/dist/usersSlice/constants.cjs.map +0 -1
- package/dist/usersSlice/constants.js.map +0 -1
- package/dist/usersSlice/thunks.cjs.map +0 -1
- package/dist/usersSlice/thunks.js.map +0 -1
package/dist/locationutils.cjs
CHANGED
|
@@ -1,919 +1,462 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
"PG",
|
|
308
|
-
"PH",
|
|
309
|
-
"PK",
|
|
310
|
-
"PL",
|
|
311
|
-
"PM",
|
|
312
|
-
"PN",
|
|
313
|
-
"PR",
|
|
314
|
-
"PS",
|
|
315
|
-
"PT",
|
|
316
|
-
"PW",
|
|
317
|
-
"PY",
|
|
318
|
-
"QA",
|
|
319
|
-
"RE",
|
|
320
|
-
"RO",
|
|
321
|
-
"RS",
|
|
322
|
-
"RU",
|
|
323
|
-
"RW",
|
|
324
|
-
"SA",
|
|
325
|
-
"SB",
|
|
326
|
-
"SC",
|
|
327
|
-
"SD",
|
|
328
|
-
"SE",
|
|
329
|
-
"SG",
|
|
330
|
-
"SH",
|
|
331
|
-
"SI",
|
|
332
|
-
"SJ",
|
|
333
|
-
"SK",
|
|
334
|
-
"SL",
|
|
335
|
-
"SM",
|
|
336
|
-
"SN",
|
|
337
|
-
"SO",
|
|
338
|
-
"SR",
|
|
339
|
-
"SS",
|
|
340
|
-
"ST",
|
|
341
|
-
"SV",
|
|
342
|
-
"SX",
|
|
343
|
-
"SY",
|
|
344
|
-
"SZ",
|
|
345
|
-
"TC",
|
|
346
|
-
"TD",
|
|
347
|
-
"TF",
|
|
348
|
-
"TG",
|
|
349
|
-
"TH",
|
|
350
|
-
"TJ",
|
|
351
|
-
"TK",
|
|
352
|
-
"TL",
|
|
353
|
-
"TM",
|
|
354
|
-
"TN",
|
|
355
|
-
"TO",
|
|
356
|
-
"TR",
|
|
357
|
-
"TT",
|
|
358
|
-
"TV",
|
|
359
|
-
"TW",
|
|
360
|
-
"TZ",
|
|
361
|
-
"UA",
|
|
362
|
-
"UG",
|
|
363
|
-
"US",
|
|
364
|
-
"UY",
|
|
365
|
-
"UZ",
|
|
366
|
-
"VA",
|
|
367
|
-
"VC",
|
|
368
|
-
"VE",
|
|
369
|
-
"VG",
|
|
370
|
-
"VI",
|
|
371
|
-
"VN",
|
|
372
|
-
"VU",
|
|
373
|
-
"WF",
|
|
374
|
-
"WS",
|
|
375
|
-
"XK",
|
|
376
|
-
"YE",
|
|
377
|
-
"YT",
|
|
378
|
-
"ZA",
|
|
379
|
-
"ZM",
|
|
380
|
-
"ZW"
|
|
381
|
-
].map((code) => ({ code, label: regionNames.of(code) })).sort((a, b) => a.label.localeCompare(b.label));
|
|
382
|
-
|
|
383
|
-
// src/deploymentsSlice/constants.ts
|
|
384
|
-
var alreadyInstalled = "already-installed";
|
|
385
|
-
var deploymentSubstates = {
|
|
386
|
-
aborted: "aborted",
|
|
387
|
-
alreadyInstalled,
|
|
388
|
-
decommissioned: "decommissioned",
|
|
389
|
-
downloading: "downloading",
|
|
390
|
-
failure: "failure",
|
|
391
|
-
installing: "installing",
|
|
392
|
-
noartifact: "noartifact",
|
|
393
|
-
artifact_too_big: "artifact_too_big",
|
|
394
|
-
pause_before_committing: "pause_before_committing",
|
|
395
|
-
pause_before_installing: "pause_before_installing",
|
|
396
|
-
pause_before_rebooting: "pause_before_rebooting",
|
|
397
|
-
pending: "pending",
|
|
398
|
-
rebooting: "rebooting",
|
|
399
|
-
success: "success"
|
|
400
|
-
};
|
|
401
|
-
var deploymentStatesToSubstates = {
|
|
402
|
-
failures: [deploymentSubstates.failure, deploymentSubstates.aborted, deploymentSubstates.decommissioned],
|
|
403
|
-
inprogress: [deploymentSubstates.downloading, deploymentSubstates.installing, deploymentSubstates.rebooting],
|
|
404
|
-
paused: [deploymentSubstates.pause_before_installing, deploymentSubstates.pause_before_rebooting, deploymentSubstates.pause_before_committing],
|
|
405
|
-
pending: [deploymentSubstates.pending],
|
|
406
|
-
successes: [deploymentSubstates.success, deploymentSubstates.alreadyInstalled, deploymentSubstates.noartifact, deploymentSubstates.artifact_too_big]
|
|
407
|
-
};
|
|
408
|
-
var deploymentStatesToSubstatesWithSkipped = {
|
|
409
|
-
...deploymentStatesToSubstates,
|
|
410
|
-
failures: [deploymentSubstates.failure],
|
|
411
|
-
skipped: [
|
|
412
|
-
deploymentSubstates.aborted,
|
|
413
|
-
deploymentSubstates.noartifact,
|
|
414
|
-
deploymentSubstates.artifact_too_big,
|
|
415
|
-
deploymentSubstates.alreadyInstalled,
|
|
416
|
-
deploymentSubstates.decommissioned
|
|
417
|
-
],
|
|
418
|
-
successes: [deploymentSubstates.success]
|
|
419
|
-
};
|
|
420
|
-
var installationSubstatesMap = {
|
|
421
|
-
download: {
|
|
422
|
-
title: "download",
|
|
423
|
-
done: "downloaded",
|
|
424
|
-
successIndicators: [deploymentSubstates.installing, deploymentSubstates.rebooting, ...deploymentStatesToSubstates.paused, deploymentSubstates.success],
|
|
425
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
426
|
-
pauseConfigurationIndicator: "ArtifactInstall_Enter"
|
|
427
|
-
},
|
|
428
|
-
install: {
|
|
429
|
-
title: "install",
|
|
430
|
-
done: "installed",
|
|
431
|
-
successIndicators: [
|
|
432
|
-
deploymentSubstates.rebooting,
|
|
433
|
-
deploymentSubstates.pause_before_rebooting,
|
|
434
|
-
deploymentSubstates.pause_before_committing,
|
|
435
|
-
deploymentSubstates.success
|
|
436
|
-
],
|
|
437
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
438
|
-
pauseConfigurationIndicator: "ArtifactReboot_Enter"
|
|
439
|
-
},
|
|
440
|
-
reboot: {
|
|
441
|
-
title: "reboot",
|
|
442
|
-
done: "rebooted",
|
|
443
|
-
successIndicators: [deploymentSubstates.pause_before_committing, deploymentSubstates.success],
|
|
444
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
445
|
-
pauseConfigurationIndicator: "ArtifactCommit_Enter"
|
|
446
|
-
},
|
|
447
|
-
commit: {
|
|
448
|
-
title: "commit",
|
|
449
|
-
done: "committed",
|
|
450
|
-
successIndicators: deploymentStatesToSubstates.successes,
|
|
451
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
452
|
-
pauseConfigurationIndicator: void 0
|
|
453
|
-
}
|
|
454
|
-
};
|
|
455
|
-
var DEPLOYMENT_STATES = {
|
|
456
|
-
finished: "finished",
|
|
457
|
-
inprogress: "inprogress",
|
|
458
|
-
pending: "pending",
|
|
459
|
-
scheduled: "scheduled"
|
|
460
|
-
};
|
|
461
|
-
var listDefaultsByState = {
|
|
462
|
-
[DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
|
|
463
|
-
[DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
|
|
464
|
-
[DEPLOYMENT_STATES.scheduled]: { ...import_constants4.DEVICE_LIST_DEFAULTS },
|
|
465
|
-
[DEPLOYMENT_STATES.finished]: { ...import_constants4.DEVICE_LIST_DEFAULTS },
|
|
466
|
-
sort: { direction: import_constants4.SORTING_OPTIONS.desc }
|
|
467
|
-
};
|
|
468
|
-
var DEPLOYMENT_ROUTES = {
|
|
469
|
-
active: {
|
|
470
|
-
key: "active",
|
|
471
|
-
route: "/deployments/active",
|
|
472
|
-
states: [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress],
|
|
473
|
-
title: "Active"
|
|
474
|
-
},
|
|
475
|
-
finished: {
|
|
476
|
-
key: "finished",
|
|
477
|
-
route: "/deployments/finished",
|
|
478
|
-
states: [DEPLOYMENT_STATES.finished],
|
|
479
|
-
title: "Finished"
|
|
480
|
-
},
|
|
481
|
-
scheduled: {
|
|
482
|
-
key: "scheduled",
|
|
483
|
-
route: "/deployments/scheduled",
|
|
484
|
-
states: [DEPLOYMENT_STATES.scheduled],
|
|
485
|
-
title: "Scheduled"
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
var DEPLOYMENT_TYPES = {
|
|
489
|
-
software: "software",
|
|
490
|
-
configuration: "configuration"
|
|
491
|
-
};
|
|
492
|
-
var defaultStats = {
|
|
493
|
-
[deploymentSubstates.aborted]: 0,
|
|
494
|
-
[deploymentSubstates.alreadyInstalled]: 0,
|
|
495
|
-
[deploymentSubstates.decommissioned]: 0,
|
|
496
|
-
[deploymentSubstates.downloading]: 0,
|
|
497
|
-
[deploymentSubstates.failure]: 0,
|
|
498
|
-
[deploymentSubstates.installing]: 0,
|
|
499
|
-
[deploymentSubstates.noartifact]: 0,
|
|
500
|
-
[deploymentSubstates.pause_before_committing]: 0,
|
|
501
|
-
[deploymentSubstates.pause_before_installing]: 0,
|
|
502
|
-
[deploymentSubstates.pause_before_rebooting]: 0,
|
|
503
|
-
[deploymentSubstates.pending]: 0,
|
|
504
|
-
[deploymentSubstates.rebooting]: 0,
|
|
505
|
-
[deploymentSubstates.success]: 0
|
|
506
|
-
};
|
|
507
|
-
var pauseMap = {
|
|
508
|
-
[deploymentSubstates.pause_before_installing]: {
|
|
509
|
-
title: installationSubstatesMap.download.done,
|
|
510
|
-
followUp: installationSubstatesMap.download.pauseConfigurationIndicator
|
|
511
|
-
},
|
|
512
|
-
[deploymentSubstates.pause_before_rebooting]: {
|
|
513
|
-
title: installationSubstatesMap.install.done,
|
|
514
|
-
followUp: installationSubstatesMap.install.pauseConfigurationIndicator
|
|
515
|
-
},
|
|
516
|
-
[deploymentSubstates.pause_before_committing]: {
|
|
517
|
-
title: installationSubstatesMap.reboot.done,
|
|
518
|
-
followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
|
|
522
|
-
// src/devicesSlice/constants.ts
|
|
523
|
-
var emptyFilter = { key: null, value: "", operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "inventory" };
|
|
524
|
-
var geoAttributes = ["geo-lat", "geo-lon"].map((attribute) => ({ attribute, scope: "inventory" }));
|
|
525
|
-
|
|
526
|
-
// src/organizationSlice/constants.ts
|
|
527
|
-
var auditlogTypes = {
|
|
528
|
-
artifact: { title: "Artifact", queryParameter: "object_type", value: "artifact" },
|
|
529
|
-
deployment: { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
|
|
530
|
-
device: { title: "Device", queryParameter: "object_id", value: "device" },
|
|
531
|
-
user_access_token: { title: "Personal Access Token", queryParameter: "user_access_token", value: "user_access_token" },
|
|
532
|
-
user: { title: "User", queryParameter: "object_id", value: "user" },
|
|
533
|
-
tenant: { title: "Tenant", queryParameter: "object_id", value: "tenant" }
|
|
534
|
-
};
|
|
535
|
-
var AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];
|
|
536
|
-
var SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];
|
|
537
|
-
|
|
538
|
-
// src/locationutils.ts
|
|
539
|
-
var SEPARATOR = ":";
|
|
540
|
-
var defaultSelector = (result) => result[0];
|
|
541
|
-
var commonFields = {
|
|
542
|
-
...Object.keys(import_constants4.DEVICE_LIST_DEFAULTS).reduce((accu, key) => ({ ...accu, [key]: { parse: Number, select: defaultSelector, target: key } }), {}),
|
|
543
|
-
id: { parse: String, select: (i) => i, target: "id" },
|
|
544
|
-
issues: { parse: void 0, select: defaultSelector, target: "selectedIssues" },
|
|
545
|
-
open: { parse: Boolean, select: defaultSelector, target: "open" }
|
|
546
|
-
};
|
|
547
|
-
var scopes = {
|
|
548
|
-
identity: { delimiter: "identity", filters: [] },
|
|
549
|
-
inventory: { delimiter: "inventory", filters: [] },
|
|
550
|
-
monitor: { delimiter: "monitor", filters: [] },
|
|
551
|
-
system: { delimiter: "system", filters: [] },
|
|
552
|
-
tags: { delimiter: "tags", filters: [] }
|
|
553
|
-
};
|
|
554
|
-
var commonProcessor = (searchParams) => {
|
|
555
|
-
const params = new URLSearchParams(searchParams);
|
|
556
|
-
const pageState = Object.entries(commonFields).reduce((accu, [key, { parse, select, target }]) => {
|
|
557
|
-
const values = params.getAll(key);
|
|
558
|
-
if (!values.length) {
|
|
559
|
-
return accu;
|
|
560
|
-
}
|
|
561
|
-
if (!parse) {
|
|
562
|
-
accu[target] = values;
|
|
563
|
-
} else {
|
|
564
|
-
try {
|
|
565
|
-
accu[target] = select(values.map(parse));
|
|
566
|
-
} catch (error) {
|
|
567
|
-
console.log("encountered faulty url param, continue...", error);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
return accu;
|
|
571
|
-
}, {});
|
|
572
|
-
Object.keys(commonFields).map((key) => params.delete(key));
|
|
573
|
-
const sort = params.has("sort") ? params.getAll("sort").reduce((sortAccu, scopedQuery) => {
|
|
574
|
-
const items = scopedQuery.split(SEPARATOR).reverse();
|
|
575
|
-
return ["direction", "key", "scope"].reduce((accu, key, index) => {
|
|
576
|
-
if (items[index]) {
|
|
577
|
-
accu[key] = items[index];
|
|
578
|
-
}
|
|
579
|
-
return accu;
|
|
580
|
-
}, sortAccu);
|
|
581
|
-
}, {}) : void 0;
|
|
582
|
-
params.delete("sort");
|
|
583
|
-
return { pageState, params, sort };
|
|
584
|
-
};
|
|
585
|
-
var legacyDeviceQueryParse = (searchParams, filteringAttributes) => {
|
|
586
|
-
const params = new URLSearchParams(searchParams);
|
|
587
|
-
const result = Object.keys(scopes).reduce((accu, scope) => ({ ...accu, [scope]: [] }), {});
|
|
588
|
-
if (params.get("group")) {
|
|
589
|
-
result.inventory.push({ ...emptyFilter, key: "group", scope: "inventory", operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, value: params.get("group") });
|
|
590
|
-
params.delete("group");
|
|
591
|
-
}
|
|
592
|
-
const filters = [...params.keys()].reduce(
|
|
593
|
-
(accu, key) => params.getAll(key).reduce((innerAccu, value) => {
|
|
594
|
-
const scope = Object.entries(filteringAttributes).reduce((foundScope, [currentScope, attributes]) => {
|
|
595
|
-
if (foundScope) {
|
|
596
|
-
return foundScope;
|
|
597
|
-
}
|
|
598
|
-
return attributes.includes(key) ? currentScope.substring(0, currentScope.indexOf("Attributes")) : foundScope;
|
|
599
|
-
}, void 0) ?? import_constants4.ATTRIBUTE_SCOPES.inventory;
|
|
600
|
-
innerAccu[scope].push({ ...emptyFilter, scope, key, operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, value });
|
|
601
|
-
return innerAccu;
|
|
602
|
-
}, accu),
|
|
603
|
-
result
|
|
604
|
-
);
|
|
605
|
-
[...params.keys()].map((key) => params.delete(key));
|
|
606
|
-
return { filters, params };
|
|
607
|
-
};
|
|
608
|
-
var scopedFilterParse = (searchParams) => {
|
|
609
|
-
const params = new URLSearchParams(searchParams);
|
|
610
|
-
const filters = Object.keys(scopes).reduce(
|
|
611
|
-
(accu, scope) => {
|
|
612
|
-
accu[scope] = [];
|
|
613
|
-
if (!params.has(scope)) {
|
|
614
|
-
return accu;
|
|
615
|
-
}
|
|
616
|
-
accu[scope] = params.getAll(scope).map((scopedQuery) => {
|
|
617
|
-
const items = scopedQuery.split(SEPARATOR);
|
|
618
|
-
return { ...emptyFilter, scope, key: items[0], operator: `$${items[1]}`, value: items.slice(2).join(SEPARATOR) };
|
|
619
|
-
});
|
|
620
|
-
return accu;
|
|
621
|
-
},
|
|
622
|
-
{ ...scopes }
|
|
623
|
-
);
|
|
624
|
-
Object.keys(scopes).map((scope) => params.delete(scope));
|
|
625
|
-
return { filters, params };
|
|
626
|
-
};
|
|
627
|
-
var parseDeviceQuery = (searchParams, extraProps = {}) => {
|
|
628
|
-
let queryParams = new URLSearchParams(searchParams);
|
|
629
|
-
const { filteringAttributes = {}, pageState = {} } = extraProps;
|
|
630
|
-
const pageStateExtension = pageState.id?.length === 1 ? { open: true } : {};
|
|
631
|
-
let scopedFilters;
|
|
632
|
-
const refersOldStyleAttributes = Object.values(filteringAttributes).some((scopeValues) => scopeValues.some((scopedValue) => queryParams.get(scopedValue)));
|
|
633
|
-
if (refersOldStyleAttributes && !Object.keys(scopes).some((scope) => queryParams.get(scope)) || queryParams.get("group")) {
|
|
634
|
-
const { filters, params } = legacyDeviceQueryParse(queryParams, filteringAttributes);
|
|
635
|
-
scopedFilters = filters;
|
|
636
|
-
queryParams = params;
|
|
637
|
-
} else {
|
|
638
|
-
const { filters, params } = scopedFilterParse(queryParams);
|
|
639
|
-
scopedFilters = filters;
|
|
640
|
-
queryParams = params;
|
|
641
|
-
}
|
|
642
|
-
let groupName = "";
|
|
643
|
-
const groupFilterIndex = scopedFilters.inventory.findIndex((filter) => filter.key === "group" && filter.operator === import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key);
|
|
644
|
-
if (groupFilterIndex > -1) {
|
|
645
|
-
groupName = scopedFilters.inventory[groupFilterIndex].value;
|
|
646
|
-
scopedFilters.inventory.splice(groupFilterIndex, 1);
|
|
647
|
-
}
|
|
648
|
-
const detailsTab = queryParams.has("tab") ? queryParams.get("tab") : "";
|
|
649
|
-
const groupId = queryParams.has("groupId") ? queryParams.get("groupId") : "";
|
|
650
|
-
return { detailsTab, filters: Object.values(scopedFilters).flat(), groupName, ...pageStateExtension, groupId };
|
|
651
|
-
};
|
|
652
|
-
var formatSorting = (sort, { sort: sortDefault }) => {
|
|
653
|
-
if (!sort || (0, import_helpers.deepCompare)(sort, sortDefault)) {
|
|
654
|
-
return "";
|
|
655
|
-
}
|
|
656
|
-
const sortQuery = ["scope", "key", "direction"].reduce((accu, key) => {
|
|
657
|
-
if (!sort[key]) {
|
|
658
|
-
return accu;
|
|
659
|
-
}
|
|
660
|
-
accu.push(sort[key]);
|
|
661
|
-
return accu;
|
|
662
|
-
}, []).join(SEPARATOR);
|
|
663
|
-
return `sort=${sortQuery}`;
|
|
664
|
-
};
|
|
665
|
-
var formatPageState = ({ selectedId, selectedIssues, page, perPage, sort }, { defaults }) => Object.entries({ page, perPage, id: selectedId, issues: selectedIssues, open: selectedId ? true : void 0 }).reduce(
|
|
666
|
-
(accu, [key, value]) => {
|
|
667
|
-
if (Array.isArray(value)) {
|
|
668
|
-
accu.push(...value.map((item) => `${key}=${encodeURIComponent(item)}`));
|
|
669
|
-
} else if ((import_constants4.DEVICE_LIST_DEFAULTS[key] != value || !import_constants4.DEVICE_LIST_DEFAULTS.hasOwnProperty(key)) && value) {
|
|
670
|
-
accu.push(`${key}=${encodeURIComponent(value)}`);
|
|
671
|
-
}
|
|
672
|
-
return accu;
|
|
673
|
-
},
|
|
674
|
-
[formatSorting(sort, defaults)]
|
|
675
|
-
).filter((i) => i).join("&");
|
|
676
|
-
var stripFilterOperator = (operator) => operator.replaceAll("$", "");
|
|
677
|
-
var formatFilters = (filters) => {
|
|
678
|
-
const result = filters.reduce(
|
|
679
|
-
(accu, filter) => {
|
|
680
|
-
const { scope = import_constants4.ATTRIBUTE_SCOPES.inventory, operator = "$eq" } = filter;
|
|
681
|
-
accu[scope].add(`${scopes[scope].delimiter}=${filter.key}${SEPARATOR}${stripFilterOperator(operator)}${SEPARATOR}${encodeURIComponent(filter.value)}`);
|
|
682
|
-
return accu;
|
|
683
|
-
},
|
|
684
|
-
Object.keys(scopes).reduce((accu, item) => ({ ...accu, [item]: /* @__PURE__ */ new Set() }), {})
|
|
685
|
-
);
|
|
686
|
-
return Object.values(result).map((filterSet) => [...filterSet]).flat();
|
|
687
|
-
};
|
|
688
|
-
var formatDeviceSearch = ({ pageState, filters, selectedGroup, groupId }) => {
|
|
689
|
-
let activeFilters = [...filters];
|
|
690
|
-
if (selectedGroup && selectedGroup !== import_constants4.ALL_DEVICES) {
|
|
691
|
-
const isUngroupedGroup = selectedGroup === UNGROUPED_GROUP.id;
|
|
692
|
-
activeFilters = isUngroupedGroup ? activeFilters.filter(
|
|
693
|
-
(filter) => !(filter.key === "group" && filter.scope === import_constants4.ATTRIBUTE_SCOPES.system && filter.operator === import_constants4.DEVICE_FILTERING_OPTIONS.$nin.key)
|
|
694
|
-
) : activeFilters;
|
|
695
|
-
const groupName = isUngroupedGroup ? UNGROUPED_GROUP.name : selectedGroup;
|
|
696
|
-
activeFilters.push({ scope: import_constants4.ATTRIBUTE_SCOPES.inventory, key: "group", operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, value: groupName });
|
|
697
|
-
}
|
|
698
|
-
const formattedFilters = formatFilters(activeFilters).filter((i) => i);
|
|
699
|
-
if (pageState.detailsTab && pageState.selectedId) {
|
|
700
|
-
formattedFilters.push(`tab=${pageState.detailsTab}`);
|
|
701
|
-
}
|
|
702
|
-
if (groupId) {
|
|
703
|
-
formattedFilters.push(`groupId=${groupId}`);
|
|
704
|
-
}
|
|
705
|
-
return formattedFilters.join("&");
|
|
706
|
-
};
|
|
707
|
-
var generateDevicePath = ({ pageState }) => {
|
|
708
|
-
const { state: selectedState } = pageState;
|
|
709
|
-
const path = ["/devices"];
|
|
710
|
-
if (selectedState !== "") {
|
|
711
|
-
path.push(selectedState);
|
|
712
|
-
}
|
|
713
|
-
return path.join("/");
|
|
714
|
-
};
|
|
715
|
-
var formatDates = ({ endDate, params, startDate, today, tonight }) => {
|
|
716
|
-
if (endDate && endDate !== tonight) {
|
|
717
|
-
params.set("endDate", endDate.split("T")[0]);
|
|
718
|
-
}
|
|
719
|
-
if (startDate && startDate !== today) {
|
|
720
|
-
params.set("startDate", startDate.split("T")[0]);
|
|
721
|
-
}
|
|
722
|
-
return params;
|
|
723
|
-
};
|
|
724
|
-
var paramReducer = (accu, [key, value]) => {
|
|
725
|
-
if (value) {
|
|
726
|
-
accu.set(key, value);
|
|
727
|
-
}
|
|
728
|
-
return accu;
|
|
729
|
-
};
|
|
730
|
-
var formatAuditlogs = ({ pageState }, { today, tonight }) => {
|
|
731
|
-
const { detail, endDate, startDate, type, user } = pageState;
|
|
732
|
-
let params = new URLSearchParams();
|
|
733
|
-
let userId = user;
|
|
734
|
-
if (user?.id) {
|
|
735
|
-
userId = user.id;
|
|
736
|
-
}
|
|
737
|
-
params = Object.entries({ objectId: detail, userId }).reduce(paramReducer, params);
|
|
738
|
-
if (type) {
|
|
739
|
-
params.set("objectType", type.value ?? type);
|
|
740
|
-
}
|
|
741
|
-
params = formatDates({ endDate, params, startDate, today, tonight });
|
|
742
|
-
return params.toString();
|
|
743
|
-
};
|
|
744
|
-
var parseDateParams = (params, today, tonight) => {
|
|
745
|
-
let endDate = tonight;
|
|
746
|
-
if (params.get("endDate")) {
|
|
747
|
-
endDate = (0, import_helpers.getISOStringBoundaries)(new Date(params.get("endDate"))).end;
|
|
748
|
-
}
|
|
749
|
-
let startDate = today;
|
|
750
|
-
if (params.get("startDate")) {
|
|
751
|
-
startDate = (0, import_helpers.getISOStringBoundaries)(new Date(params.get("startDate"))).start;
|
|
752
|
-
}
|
|
753
|
-
return { endDate, startDate };
|
|
754
|
-
};
|
|
755
|
-
var parseAuditlogsQuery = (params, { today, tonight }) => {
|
|
756
|
-
const type = AUDIT_LOGS_TYPES.find((typeObject) => typeObject.value === params.get("objectType"));
|
|
757
|
-
const { endDate, startDate } = parseDateParams(params, today, tonight);
|
|
758
|
-
return {
|
|
759
|
-
detail: params.get("objectId"),
|
|
760
|
-
endDate,
|
|
761
|
-
startDate,
|
|
762
|
-
type,
|
|
763
|
-
user: params.get("userId")
|
|
764
|
-
};
|
|
765
|
-
};
|
|
766
|
-
var formatActiveDeployments = (pageState, { defaults }) => [DEPLOYMENT_STATES.inprogress, DEPLOYMENT_STATES.pending].reduce((accu, state) => {
|
|
767
|
-
const { page, perPage } = pageState[state] ?? {};
|
|
768
|
-
const stateDefaults = defaults[state] ?? {};
|
|
769
|
-
const items = Object.entries({ page, perPage }).reverse().reduce((keyAccu, [key, value]) => {
|
|
770
|
-
if (value && value !== stateDefaults[key] || keyAccu.length) {
|
|
771
|
-
keyAccu.unshift(value || stateDefaults[key]);
|
|
772
|
-
}
|
|
773
|
-
return keyAccu;
|
|
774
|
-
}, []);
|
|
775
|
-
if (items.length) {
|
|
776
|
-
accu.push(`${state}=${items.join(SEPARATOR)}`);
|
|
777
|
-
}
|
|
778
|
-
return accu;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("./chunk-CKQMccvm.cjs");
|
|
3
|
+
const require_constants = require("./constants.cjs");
|
|
4
|
+
let _northern_tech_utils_helpers = require("@northern.tech/utils/helpers");
|
|
5
|
+
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
6
|
+
//#region src/locationutils.ts
|
|
7
|
+
const SEPARATOR = ":";
|
|
8
|
+
const defaultSelector = (result) => result[0];
|
|
9
|
+
const commonFields = {
|
|
10
|
+
page: {
|
|
11
|
+
parse: Number,
|
|
12
|
+
select: defaultSelector,
|
|
13
|
+
target: "page"
|
|
14
|
+
},
|
|
15
|
+
perPage: {
|
|
16
|
+
parse: Number,
|
|
17
|
+
select: defaultSelector,
|
|
18
|
+
target: "perPage"
|
|
19
|
+
},
|
|
20
|
+
id: {
|
|
21
|
+
parse: String,
|
|
22
|
+
select: (i) => i,
|
|
23
|
+
target: "id"
|
|
24
|
+
},
|
|
25
|
+
issues: {
|
|
26
|
+
parse: void 0,
|
|
27
|
+
select: defaultSelector,
|
|
28
|
+
target: "selectedIssues"
|
|
29
|
+
},
|
|
30
|
+
open: {
|
|
31
|
+
parse: Boolean,
|
|
32
|
+
select: defaultSelector,
|
|
33
|
+
target: "open"
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const scopes = {
|
|
37
|
+
identity: {
|
|
38
|
+
delimiter: "identity",
|
|
39
|
+
filters: []
|
|
40
|
+
},
|
|
41
|
+
inventory: {
|
|
42
|
+
delimiter: "inventory",
|
|
43
|
+
filters: []
|
|
44
|
+
},
|
|
45
|
+
monitor: {
|
|
46
|
+
delimiter: "monitor",
|
|
47
|
+
filters: []
|
|
48
|
+
},
|
|
49
|
+
system: {
|
|
50
|
+
delimiter: "system",
|
|
51
|
+
filters: []
|
|
52
|
+
},
|
|
53
|
+
tags: {
|
|
54
|
+
delimiter: "tags",
|
|
55
|
+
filters: []
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const commonProcessor = (searchParams) => {
|
|
59
|
+
const params = new URLSearchParams(searchParams);
|
|
60
|
+
const pageState = Object.entries(commonFields).reduce((accu, [key, { parse, select, target }]) => {
|
|
61
|
+
const values = params.getAll(key);
|
|
62
|
+
if (!values.length) return accu;
|
|
63
|
+
if (!parse) accu[target] = values;
|
|
64
|
+
else try {
|
|
65
|
+
accu[target] = select(values.map(parse));
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.log("encountered faulty url param, continue...", error);
|
|
68
|
+
}
|
|
69
|
+
return accu;
|
|
70
|
+
}, {});
|
|
71
|
+
Object.keys(commonFields).forEach((key) => params.delete(key));
|
|
72
|
+
const sort = params.has("sort") ? params.getAll("sort").reduce((sortAccu, scopedQuery) => {
|
|
73
|
+
const items = scopedQuery.split(SEPARATOR).reverse();
|
|
74
|
+
return [
|
|
75
|
+
"direction",
|
|
76
|
+
"key",
|
|
77
|
+
"scope"
|
|
78
|
+
].reduce((accu, key, index) => {
|
|
79
|
+
if (items[index]) accu[key] = items[index];
|
|
80
|
+
return accu;
|
|
81
|
+
}, sortAccu);
|
|
82
|
+
}, {}) : void 0;
|
|
83
|
+
params.delete("sort");
|
|
84
|
+
return {
|
|
85
|
+
pageState,
|
|
86
|
+
params,
|
|
87
|
+
sort
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
const legacyDeviceQueryParse = (searchParams, filteringAttributes) => {
|
|
91
|
+
const params = new URLSearchParams(searchParams);
|
|
92
|
+
const result = Object.keys(scopes).reduce((accu, scope) => ({
|
|
93
|
+
...accu,
|
|
94
|
+
[scope]: []
|
|
95
|
+
}), {});
|
|
96
|
+
if (params.get("group")) {
|
|
97
|
+
result.inventory.push({
|
|
98
|
+
...require_constants.emptyFilter,
|
|
99
|
+
key: "group",
|
|
100
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.inventory,
|
|
101
|
+
operator: _northern_tech_utils_constants.DEVICE_FILTERING_OPTIONS.$eq.key,
|
|
102
|
+
value: params.get("group")
|
|
103
|
+
});
|
|
104
|
+
params.delete("group");
|
|
105
|
+
}
|
|
106
|
+
const filters = [...params.keys()].reduce((accu, key) => params.getAll(key).reduce((innerAccu, value) => {
|
|
107
|
+
const scope = Object.entries(filteringAttributes).reduce((foundScope, [currentScope, attributes]) => {
|
|
108
|
+
if (foundScope) return foundScope;
|
|
109
|
+
return attributes.includes(key) ? currentScope.substring(0, currentScope.indexOf("Attributes")) : foundScope;
|
|
110
|
+
}, void 0) ?? _northern_tech_utils_constants.ATTRIBUTE_SCOPES.inventory;
|
|
111
|
+
innerAccu[scope].push({
|
|
112
|
+
...require_constants.emptyFilter,
|
|
113
|
+
scope,
|
|
114
|
+
key,
|
|
115
|
+
operator: _northern_tech_utils_constants.DEVICE_FILTERING_OPTIONS.$eq.key,
|
|
116
|
+
value
|
|
117
|
+
});
|
|
118
|
+
return innerAccu;
|
|
119
|
+
}, accu), result);
|
|
120
|
+
[...params.keys()].forEach((key) => params.delete(key));
|
|
121
|
+
return {
|
|
122
|
+
filters,
|
|
123
|
+
params
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
const scopedFilterParse = (searchParams) => {
|
|
127
|
+
const params = new URLSearchParams(searchParams);
|
|
128
|
+
const filters = Object.keys(scopes).reduce((accu, scope) => {
|
|
129
|
+
accu[scope] = [];
|
|
130
|
+
if (!params.has(scope)) return accu;
|
|
131
|
+
accu[scope] = params.getAll(scope).map((scopedQuery) => {
|
|
132
|
+
const items = scopedQuery.split(SEPARATOR);
|
|
133
|
+
return {
|
|
134
|
+
...require_constants.emptyFilter,
|
|
135
|
+
scope,
|
|
136
|
+
key: items[0],
|
|
137
|
+
operator: `$${items[1]}`,
|
|
138
|
+
value: items.slice(2).join(SEPARATOR)
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
return accu;
|
|
142
|
+
}, {
|
|
143
|
+
identity: [],
|
|
144
|
+
inventory: [],
|
|
145
|
+
monitor: [],
|
|
146
|
+
system: [],
|
|
147
|
+
tags: []
|
|
148
|
+
});
|
|
149
|
+
Object.keys(scopes).forEach((scope) => params.delete(scope));
|
|
150
|
+
return {
|
|
151
|
+
filters,
|
|
152
|
+
params
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
const parseDeviceQuery = (searchParams, extraProps = {}) => {
|
|
156
|
+
let queryParams = new URLSearchParams(searchParams);
|
|
157
|
+
const { filteringAttributes = {}, pageState = {} } = extraProps;
|
|
158
|
+
const pageStateExtension = pageState.id?.length === 1 ? { open: true } : {};
|
|
159
|
+
let scopedFilters;
|
|
160
|
+
if (Object.values(filteringAttributes).some((scopeValues) => scopeValues.some((scopedValue) => queryParams.get(scopedValue))) && !Object.keys(scopes).some((scope) => queryParams.get(scope)) || queryParams.get("group")) {
|
|
161
|
+
const { filters, params } = legacyDeviceQueryParse(queryParams, filteringAttributes);
|
|
162
|
+
scopedFilters = filters;
|
|
163
|
+
queryParams = params;
|
|
164
|
+
} else {
|
|
165
|
+
const { filters, params } = scopedFilterParse(queryParams);
|
|
166
|
+
scopedFilters = filters;
|
|
167
|
+
queryParams = params;
|
|
168
|
+
}
|
|
169
|
+
let groupName = "";
|
|
170
|
+
const groupFilterIndex = scopedFilters.inventory.findIndex((filter) => filter.key === "group" && filter.operator === _northern_tech_utils_constants.DEVICE_FILTERING_OPTIONS.$eq.key);
|
|
171
|
+
if (groupFilterIndex > -1) {
|
|
172
|
+
groupName = scopedFilters.inventory[groupFilterIndex].value;
|
|
173
|
+
scopedFilters.inventory.splice(groupFilterIndex, 1);
|
|
174
|
+
}
|
|
175
|
+
const detailsTab = queryParams.has("tab") ? queryParams.get("tab") : "";
|
|
176
|
+
const groupId = queryParams.has("groupId") ? queryParams.get("groupId") : "";
|
|
177
|
+
return {
|
|
178
|
+
detailsTab,
|
|
179
|
+
filters: Object.values(scopedFilters).flat(),
|
|
180
|
+
groupName,
|
|
181
|
+
...pageStateExtension,
|
|
182
|
+
groupId
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
const formatSorting = (sort, { sort: sortDefault }) => {
|
|
186
|
+
if (!sort || (0, _northern_tech_utils_helpers.deepCompare)(sort, sortDefault)) return "";
|
|
187
|
+
return `sort=${[
|
|
188
|
+
"scope",
|
|
189
|
+
"key",
|
|
190
|
+
"direction"
|
|
191
|
+
].reduce((accu, key) => {
|
|
192
|
+
if (!sort[key]) return accu;
|
|
193
|
+
accu.push(sort[key]);
|
|
194
|
+
return accu;
|
|
195
|
+
}, []).join(SEPARATOR)}`;
|
|
196
|
+
};
|
|
197
|
+
const formatPageState = ({ selectedId, selectedIssues, page, perPage, sort }, { defaults }) => Object.entries({
|
|
198
|
+
page,
|
|
199
|
+
perPage,
|
|
200
|
+
id: selectedId,
|
|
201
|
+
issues: selectedIssues,
|
|
202
|
+
open: selectedId ? true : void 0
|
|
203
|
+
}).reduce((accu, [key, value]) => {
|
|
204
|
+
if (Array.isArray(value)) accu.push(...value.map((item) => `${key}=${encodeURIComponent(item)}`));
|
|
205
|
+
else if ((_northern_tech_utils_constants.DEVICE_LIST_DEFAULTS[key] != value || !Object.hasOwn(_northern_tech_utils_constants.DEVICE_LIST_DEFAULTS, key)) && value) accu.push(`${key}=${encodeURIComponent(value)}`);
|
|
206
|
+
return accu;
|
|
207
|
+
}, [formatSorting(sort, defaults)]).filter((i) => i).join("&");
|
|
208
|
+
const stripFilterOperator = (operator) => operator.replaceAll("$", "");
|
|
209
|
+
const formatFilters = (filters) => {
|
|
210
|
+
const result = filters.reduce((accu, filter) => {
|
|
211
|
+
const { scope = _northern_tech_utils_constants.ATTRIBUTE_SCOPES.inventory, operator = "$eq" } = filter;
|
|
212
|
+
accu[scope].add(`${scopes[scope].delimiter}=${filter.key}${SEPARATOR}${stripFilterOperator(operator)}${SEPARATOR}${encodeURIComponent(filter.value)}`);
|
|
213
|
+
return accu;
|
|
214
|
+
}, Object.keys(scopes).reduce((accu, item) => ({
|
|
215
|
+
...accu,
|
|
216
|
+
[item]: /* @__PURE__ */ new Set()
|
|
217
|
+
}), {}));
|
|
218
|
+
return Object.values(result).map((filterSet) => [...filterSet]).flat();
|
|
219
|
+
};
|
|
220
|
+
const formatDeviceSearch = ({ pageState, filters, selectedGroup, groupId }) => {
|
|
221
|
+
let activeFilters = [...filters];
|
|
222
|
+
if (selectedGroup && selectedGroup !== _northern_tech_utils_constants.ALL_DEVICES) {
|
|
223
|
+
const isUngroupedGroup = selectedGroup === require_constants.UNGROUPED_GROUP.id;
|
|
224
|
+
activeFilters = isUngroupedGroup ? activeFilters.filter((filter) => !(filter.key === "group" && filter.scope === _northern_tech_utils_constants.ATTRIBUTE_SCOPES.system && filter.operator === _northern_tech_utils_constants.DEVICE_FILTERING_OPTIONS.$nin.key)) : activeFilters;
|
|
225
|
+
const groupName = isUngroupedGroup ? require_constants.UNGROUPED_GROUP.name : selectedGroup;
|
|
226
|
+
activeFilters.push({
|
|
227
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.inventory,
|
|
228
|
+
key: "group",
|
|
229
|
+
operator: _northern_tech_utils_constants.DEVICE_FILTERING_OPTIONS.$eq.key,
|
|
230
|
+
value: groupName
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
const formattedFilters = formatFilters(activeFilters).filter((i) => i);
|
|
234
|
+
if (pageState.detailsTab && pageState.selectedId) formattedFilters.push(`tab=${pageState.detailsTab}`);
|
|
235
|
+
if (groupId) formattedFilters.push(`groupId=${groupId}`);
|
|
236
|
+
return formattedFilters.join("&");
|
|
237
|
+
};
|
|
238
|
+
const generateDevicePath = ({ pageState }) => {
|
|
239
|
+
const { state: selectedState } = pageState;
|
|
240
|
+
const path = ["/devices"];
|
|
241
|
+
if (selectedState !== "") path.push(selectedState);
|
|
242
|
+
return path.join("/");
|
|
243
|
+
};
|
|
244
|
+
const formatDates = ({ endDate, params, startDate, today, tonight }) => {
|
|
245
|
+
if (endDate && endDate !== tonight) params.set("endDate", endDate.split("T")[0]);
|
|
246
|
+
if (startDate && startDate !== today) params.set("startDate", startDate.split("T")[0]);
|
|
247
|
+
return params;
|
|
248
|
+
};
|
|
249
|
+
const paramReducer = (accu, [key, value]) => {
|
|
250
|
+
if (value) accu.set(key, value);
|
|
251
|
+
return accu;
|
|
252
|
+
};
|
|
253
|
+
const formatAuditlogs = ({ pageState }, { today, tonight }) => {
|
|
254
|
+
const { detail, endDate, startDate, type, user } = pageState;
|
|
255
|
+
let params = new URLSearchParams();
|
|
256
|
+
let userId = user;
|
|
257
|
+
if (typeof user === "object" && user?.id) userId = user.id;
|
|
258
|
+
params = Object.entries({
|
|
259
|
+
objectId: detail,
|
|
260
|
+
userId
|
|
261
|
+
}).reduce(paramReducer, params);
|
|
262
|
+
if (type) params.set("objectType", typeof type === "object" ? type.value ?? "" : type);
|
|
263
|
+
params = formatDates({
|
|
264
|
+
endDate,
|
|
265
|
+
params,
|
|
266
|
+
startDate,
|
|
267
|
+
today,
|
|
268
|
+
tonight
|
|
269
|
+
});
|
|
270
|
+
return params.toString();
|
|
271
|
+
};
|
|
272
|
+
const parseDateParams = (params, today, tonight) => {
|
|
273
|
+
let endDate = tonight;
|
|
274
|
+
const endDateParam = params.get("endDate");
|
|
275
|
+
if (endDateParam) endDate = (0, _northern_tech_utils_helpers.getISOStringBoundaries)(new Date(endDateParam)).end;
|
|
276
|
+
let startDate = today;
|
|
277
|
+
const startDateParam = params.get("startDate");
|
|
278
|
+
if (startDateParam) startDate = (0, _northern_tech_utils_helpers.getISOStringBoundaries)(new Date(startDateParam)).start;
|
|
279
|
+
return {
|
|
280
|
+
endDate,
|
|
281
|
+
startDate
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
const parseAuditlogsQuery = (params, { today, tonight }) => {
|
|
285
|
+
const type = require_constants.AUDIT_LOGS_TYPES.find((typeObject) => typeObject.value === params.get("objectType"));
|
|
286
|
+
const { endDate, startDate } = parseDateParams(params, today, tonight);
|
|
287
|
+
return {
|
|
288
|
+
detail: params.get("objectId"),
|
|
289
|
+
endDate,
|
|
290
|
+
startDate,
|
|
291
|
+
type,
|
|
292
|
+
user: params.get("userId")
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
const formatActiveDeployments = (pageState, { defaults }) => [require_constants.DEPLOYMENT_STATES.inprogress, require_constants.DEPLOYMENT_STATES.pending].reduce((accu, state) => {
|
|
296
|
+
const { page, perPage } = pageState[state] ?? {};
|
|
297
|
+
const stateDefaults = defaults[state] ?? {};
|
|
298
|
+
const items = Object.entries({
|
|
299
|
+
page,
|
|
300
|
+
perPage
|
|
301
|
+
}).reverse().reduce((keyAccu, [key, value]) => {
|
|
302
|
+
if (value && value !== stateDefaults[key] || keyAccu.length) keyAccu.unshift(value || stateDefaults[key]);
|
|
303
|
+
return keyAccu;
|
|
304
|
+
}, []);
|
|
305
|
+
if (items.length) accu.push(`${state}=${items.join(SEPARATOR)}`);
|
|
306
|
+
return accu;
|
|
779
307
|
}, []).filter((i) => i).join("&");
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
};
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
};
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
308
|
+
const formatDeployments = ({ deploymentObject, pageState }, { defaults, today, tonight }) => {
|
|
309
|
+
const { state: selectedState, showCreationDialog } = pageState.general;
|
|
310
|
+
let params = new URLSearchParams();
|
|
311
|
+
if (showCreationDialog) {
|
|
312
|
+
params.set("open", "true");
|
|
313
|
+
if (deploymentObject.release) params.set("release", deploymentObject.release.name);
|
|
314
|
+
if (deploymentObject.devices?.length) deploymentObject.devices.forEach(({ id }) => params.append("deviceId", id));
|
|
315
|
+
}
|
|
316
|
+
let pageStateQuery;
|
|
317
|
+
if (selectedState === require_constants.DEPLOYMENT_ROUTES.finished.key) {
|
|
318
|
+
const { endDate, search, startDate, type } = pageState[selectedState];
|
|
319
|
+
params = formatDates({
|
|
320
|
+
endDate,
|
|
321
|
+
params,
|
|
322
|
+
startDate,
|
|
323
|
+
today,
|
|
324
|
+
tonight
|
|
325
|
+
});
|
|
326
|
+
params = Object.entries({
|
|
327
|
+
search,
|
|
328
|
+
type
|
|
329
|
+
}).reduce(paramReducer, params);
|
|
330
|
+
pageStateQuery = formatPageState(pageState[selectedState], { defaults: { sort: defaults.sort } });
|
|
331
|
+
} else if (selectedState === require_constants.DEPLOYMENT_ROUTES.scheduled.key) pageStateQuery = formatPageState(pageState[selectedState], { defaults: { sort: defaults.sort } });
|
|
332
|
+
else pageStateQuery = formatActiveDeployments(pageState, { defaults });
|
|
333
|
+
return [pageStateQuery, params.toString()].filter((i) => i).join("&");
|
|
334
|
+
};
|
|
335
|
+
const deploymentsPath = "deployments/";
|
|
336
|
+
const parseDeploymentsPath = (path) => {
|
|
337
|
+
const parts = path.split(deploymentsPath);
|
|
338
|
+
if (parts.length > 1 && Object.keys(require_constants.DEPLOYMENT_ROUTES).includes(parts[1])) return parts[1];
|
|
339
|
+
return "";
|
|
340
|
+
};
|
|
341
|
+
const parseActiveDeployments = (params) => [require_constants.DEPLOYMENT_STATES.inprogress, require_constants.DEPLOYMENT_STATES.pending].reduce((accu, state) => {
|
|
342
|
+
if (!params.has(state)) return accu;
|
|
343
|
+
const items = params.get(state).split(SEPARATOR);
|
|
344
|
+
accu[state] = Object.keys(_northern_tech_utils_constants.DEVICE_LIST_DEFAULTS).reduce((stateAccu, key, index) => items[index] ? {
|
|
345
|
+
...stateAccu,
|
|
346
|
+
[key]: Number(items[index])
|
|
347
|
+
} : stateAccu, {});
|
|
348
|
+
return accu;
|
|
820
349
|
}, {});
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
};
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
};
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
350
|
+
const deploymentFields = {
|
|
351
|
+
deviceId: {
|
|
352
|
+
attribute: "devices",
|
|
353
|
+
parse: (id) => ({ id }),
|
|
354
|
+
select: (i) => i
|
|
355
|
+
},
|
|
356
|
+
release: {
|
|
357
|
+
attribute: "release",
|
|
358
|
+
parse: String,
|
|
359
|
+
select: defaultSelector
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
const parseDeploymentsQuery = (params, { pageState, location, tonight }) => {
|
|
363
|
+
const { endDate, startDate } = parseDateParams(params, "", tonight);
|
|
364
|
+
const deploymentObject = Object.entries(deploymentFields).reduce((accu, [key, { attribute, parse, select }]) => params.has(key) ? {
|
|
365
|
+
...accu,
|
|
366
|
+
[attribute]: select(params.getAll(key).map(parse))
|
|
367
|
+
} : accu, {});
|
|
368
|
+
const { state: selectedState, id, open, ...remainingPageState } = pageState;
|
|
369
|
+
const deploymentsTab = parseDeploymentsPath(location.pathname) || selectedState || require_constants.DEPLOYMENT_ROUTES.active.key;
|
|
370
|
+
let state = {
|
|
371
|
+
deploymentObject,
|
|
372
|
+
general: {
|
|
373
|
+
showCreationDialog: Boolean(open && !id),
|
|
374
|
+
showReportDialog: Boolean(open && id),
|
|
375
|
+
state: deploymentsTab
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
if (deploymentsTab === require_constants.DEPLOYMENT_ROUTES.finished.key) {
|
|
379
|
+
const typeParam = params.get("type");
|
|
380
|
+
const type = typeParam ? require_constants.DEPLOYMENT_TYPES[typeParam] || "" : "";
|
|
381
|
+
const search = params.get("search") || "";
|
|
382
|
+
state[deploymentsTab] = {
|
|
383
|
+
...remainingPageState,
|
|
384
|
+
endDate,
|
|
385
|
+
search,
|
|
386
|
+
startDate,
|
|
387
|
+
type
|
|
388
|
+
};
|
|
389
|
+
} else if (deploymentsTab === require_constants.DEPLOYMENT_ROUTES.scheduled.key) state[deploymentsTab] = { ...remainingPageState };
|
|
390
|
+
else state = {
|
|
391
|
+
...state,
|
|
392
|
+
...parseActiveDeployments(params)
|
|
393
|
+
};
|
|
394
|
+
return state;
|
|
395
|
+
};
|
|
396
|
+
const generateDeploymentsPath = ({ pageState }) => {
|
|
397
|
+
const { state: selectedState = require_constants.DEPLOYMENT_ROUTES.active.key } = pageState.general;
|
|
398
|
+
return `/deployments/${selectedState}`;
|
|
399
|
+
};
|
|
400
|
+
const releasesRoot = "/software";
|
|
401
|
+
const formatReleases = ({ pageState: { id, searchTerm, selectedTags = [], tab, type } }) => Object.entries({
|
|
402
|
+
name: searchTerm,
|
|
403
|
+
tab,
|
|
404
|
+
type,
|
|
405
|
+
id
|
|
406
|
+
}).reduce((accu, [key, value]) => value ? [...accu, `${key}=${value}`] : accu, selectedTags.map((tag) => `tag=${tag}`)).join("&");
|
|
407
|
+
const generateReleasesPath = ({ pageState: { selectedRelease } }) => `${releasesRoot}${selectedRelease ? `/${encodeURIComponent(selectedRelease)}` : ""}`;
|
|
408
|
+
const parseReleasesQuery = (queryParams, extraProps) => {
|
|
409
|
+
const name = queryParams.has("name") ? queryParams.get("name") : "";
|
|
410
|
+
const tab = queryParams.has("tab") ? queryParams.get("tab") : void 0;
|
|
411
|
+
const tags = queryParams.has("tag") ? queryParams.getAll("tag") : [];
|
|
412
|
+
const type = queryParams.has("type") ? queryParams.get("type") : "";
|
|
413
|
+
let selectedRelease = decodeURIComponent(extraProps.location.pathname.substring(10));
|
|
414
|
+
let selectedJob;
|
|
415
|
+
if (extraProps.pageState?.id?.length && tab === "delta") selectedJob = extraProps.pageState.id[0];
|
|
416
|
+
else if (!selectedRelease && extraProps.pageState?.id?.length) selectedRelease = extraProps.pageState.id[0];
|
|
417
|
+
return {
|
|
418
|
+
searchTerm: name,
|
|
419
|
+
selectedJob,
|
|
420
|
+
selectedRelease,
|
|
421
|
+
tab,
|
|
422
|
+
tags,
|
|
423
|
+
type
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
const tenantsRoot = "/tenants";
|
|
427
|
+
const generateTenantPath = ({ pageState: { selectedTenant } }) => {
|
|
428
|
+
if (selectedTenant) return `${tenantsRoot}/${encodeURIComponent(selectedTenant)}`;
|
|
429
|
+
else return tenantsRoot;
|
|
430
|
+
};
|
|
431
|
+
const generateTenantPathById = (id) => id ? `${tenantsRoot}/${encodeURIComponent(id)}` : tenantsRoot;
|
|
432
|
+
const parseTenantsQuery = (queryParams, extraProps) => {
|
|
433
|
+
const name = queryParams.has("name") ? queryParams.get("name") : "";
|
|
434
|
+
let selectedTenant = extraProps.location.pathname.substring(9);
|
|
435
|
+
if (!selectedTenant && extraProps.pageState.id?.length) selectedTenant = extraProps.pageState.id[0];
|
|
436
|
+
return {
|
|
437
|
+
name,
|
|
438
|
+
selectedTenant
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
const formatTenants = () => "";
|
|
442
|
+
//#endregion
|
|
443
|
+
exports.commonProcessor = commonProcessor;
|
|
444
|
+
exports.formatAuditlogs = formatAuditlogs;
|
|
445
|
+
exports.formatDeployments = formatDeployments;
|
|
446
|
+
exports.formatDeviceSearch = formatDeviceSearch;
|
|
447
|
+
exports.formatPageState = formatPageState;
|
|
448
|
+
exports.formatReleases = formatReleases;
|
|
449
|
+
exports.formatTenants = formatTenants;
|
|
450
|
+
exports.generateDeploymentsPath = generateDeploymentsPath;
|
|
451
|
+
exports.generateDevicePath = generateDevicePath;
|
|
452
|
+
exports.generateReleasesPath = generateReleasesPath;
|
|
453
|
+
exports.generateTenantPath = generateTenantPath;
|
|
454
|
+
exports.generateTenantPathById = generateTenantPathById;
|
|
455
|
+
exports.parseAuditlogsQuery = parseAuditlogsQuery;
|
|
456
|
+
exports.parseDateParams = parseDateParams;
|
|
457
|
+
exports.parseDeploymentsQuery = parseDeploymentsQuery;
|
|
458
|
+
exports.parseDeviceQuery = parseDeviceQuery;
|
|
459
|
+
exports.parseReleasesQuery = parseReleasesQuery;
|
|
460
|
+
exports.parseTenantsQuery = parseTenantsQuery;
|
|
461
|
+
|
|
919
462
|
//# sourceMappingURL=locationutils.cjs.map
|