@northern.tech/store 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.d.cts +1 -1
- package/dist/actions.d.ts +1 -1
- package/dist/appSlice/index.cjs +1 -0
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.js +1 -0
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/selectors.d.cts +2 -2
- package/dist/appSlice/selectors.d.ts +2 -2
- package/dist/appSlice/thunks.d.cts +1 -1
- package/dist/appSlice/thunks.d.ts +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/commonSelectors.d.cts +2 -2
- package/dist/commonSelectors.d.ts +2 -2
- package/dist/deploymentsSlice/selectors.d.cts +2 -2
- package/dist/deploymentsSlice/selectors.d.ts +2 -2
- package/dist/deploymentsSlice/thunks.d.cts +1 -1
- package/dist/deploymentsSlice/thunks.d.ts +1 -1
- package/dist/devicesSlice/selectors.d.cts +2 -2
- package/dist/devicesSlice/selectors.d.ts +2 -2
- package/dist/devicesSlice/thunks.cjs +1 -0
- package/dist/devicesSlice/thunks.d.cts +16 -3
- package/dist/devicesSlice/thunks.d.ts +16 -3
- package/dist/devicesSlice/thunks.js +2 -2
- package/dist/{index-CpfhQHfg.d.ts → index-C0yQmQih.d.ts} +4 -2
- package/dist/{index-BgF6rhXn.d.cts → index-DjSjrp5b.d.cts} +4 -2
- package/dist/monitorSlice/selectors.d.cts +1 -1
- package/dist/monitorSlice/selectors.d.ts +1 -1
- package/dist/monitorSlice/thunks.d.cts +1 -1
- package/dist/monitorSlice/thunks.d.ts +1 -1
- package/dist/onboardingSlice/selectors.d.cts +1 -1
- package/dist/onboardingSlice/selectors.d.ts +1 -1
- package/dist/onboardingSlice/thunks.d.cts +2 -2
- package/dist/onboardingSlice/thunks.d.ts +2 -2
- package/dist/organizationSlice/selectors.d.cts +2 -2
- package/dist/organizationSlice/selectors.d.ts +2 -2
- package/dist/organizationSlice/thunks.cjs +1 -0
- package/dist/organizationSlice/thunks.d.cts +16 -3
- package/dist/organizationSlice/thunks.d.ts +16 -3
- package/dist/organizationSlice/thunks.js +2 -2
- package/dist/releasesSlice/selectors.d.cts +2 -2
- package/dist/releasesSlice/selectors.d.ts +2 -2
- package/dist/releasesSlice/thunks.cjs +5 -8
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +1 -1
- package/dist/releasesSlice/thunks.d.ts +1 -1
- package/dist/releasesSlice/thunks.js +5 -8
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/{store-B2_hrsgP.d.ts → store-BKVs6gSc.d.ts} +2 -2
- package/dist/{store-DquBGT7j.d.cts → store-ByJVpIz9.d.cts} +2 -2
- package/dist/store.d.cts +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/storehooks.cjs +1 -0
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.d.cts +2 -2
- package/dist/storehooks.d.ts +2 -2
- package/dist/storehooks.js +1 -0
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +17 -1
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +3 -3
- package/dist/thunks.d.ts +3 -3
- package/dist/thunks.js +17 -3
- package/dist/thunks.js.map +1 -1
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +1 -1
- package/dist/usersSlice/index.d.ts +1 -1
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/mocks.d.cts +1 -1
- package/dist/usersSlice/mocks.d.ts +1 -1
- package/dist/usersSlice/selectors.d.cts +2 -2
- package/dist/usersSlice/selectors.d.ts +2 -2
- package/dist/usersSlice/thunks.d.cts +2 -2
- package/dist/usersSlice/thunks.d.ts +2 -2
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["defaultPermissionSets","rolesById","createSlice","READ_STATES"],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { User as BackendUser, DeploymentPhase, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":";;;;;;;;AAsBA,MAAa,YAAY;AA+EzB,MAAa,eAA8B;CACzC,MAAM,CAAC;CACP,aAAa;CACb,gBAAgB,CAEhB;CACA,eAAe,CAAC;CAChB,QAAQ;CACR,gBAAgB;EACd,cAAc,KAAA;EACd,iBAAiB,CAAC;EAClB,gBAAgB,CAAC;EACjB,SAAS;CACX;CACA,oBAAoB,EAClB,GAAGA,+BAAAA,sBACL;CACA,WAAW,EACT,GAAGC,+BAAAA,UACL;CACA,kBAAkB;CAClB,qBAAqB;CACrB,yBAAyB;CACzB,oBAAoB;CACpB,yBAAyB;CACzB,UAAU,EACR,MAAM,CAEN,EACF;CACA,cAAc;EACZ,iBAAiB,CAAC;EAClB,YAAY,CAAC;EACb,qBAAqB;EACrB,iCAAiC;CACnC;CACA,yBAAyB;AAC3B;AAEA,MAAa,cAAA,GAAaC,iBAAAA,YAAAA,CAAY;CACpC,MAAM;CACN;CACA,UAAU;EACR,iBAAiB,OAAO,WAAyC;GAC/D,MAAM,SAAS,OAAO;EACxB;EACA,uBAAuB,OAAO,WAAuC;GACnE,MAAM,iBAAiB,OAAO;EAChC;EACA,mBAAmB,OAAO,WAAgD;GACxE,MAAM,OAAO,OAAO;EACtB;EACA,eAAe,OAAO,WAAgC;GACpD,MAAM,KAAK,OAAO,QAAQ,MAAM,OAAO;GACvC,MAAM,cAAc,OAAO,QAAQ;EACrC;EACA,cAAc,OAAO,WAAkC;GAErD,MAAM,GAAG,OAAO,UAAU,aAAa,GAAG,SAAS,MAAM;GACzD,MAAM,OAAO;GACb,MAAM,cAAc,MAAM,gBAAgB,OAAO,UAAU,OAAO,MAAM;EAC1E;EACA,cAAc,OAAO,WAA0D;GAC7E,MAAM,KAAK,OAAO,QAAQ,MAAM;IAC9B,GAAG,MAAM,K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UAAU,WAAW;AAClC,IAAA,qBAAe,WAAW"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["defaultPermissionSets","rolesById","createSlice","READ_STATES"],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { User as BackendUser, DeploymentPhase, PersonalAccessToken, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName } & { tokens?: PersonalAccessToken[] };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":";;;;;;;;AAsBA,MAAa,YAAY;AA+EzB,MAAa,eAA8B;CACzC,MAAM,CAAC;CACP,aAAa;CACb,gBAAgB,CAEhB;CACA,eAAe,CAAC;CAChB,QAAQ;CACR,gBAAgB;EACd,cAAc,KAAA;EACd,iBAAiB,CAAC;EAClB,gBAAgB,CAAC;EACjB,SAAS;CACX;CACA,oBAAoB,EAClB,GAAGA,+BAAAA,sBACL;CACA,WAAW,EACT,GAAGC,+BAAAA,UACL;CACA,kBAAkB;CAClB,qBAAqB;CACrB,yBAAyB;CACzB,oBAAoB;CACpB,yBAAyB;CACzB,UAAU,EACR,MAAM,CAEN,EACF;CACA,cAAc;EACZ,iBAAiB,CAAC;EAClB,YAAY,CAAC;EACb,qBAAqB;EACrB,iCAAiC;CACnC;CACA,yBAAyB;AAC3B;AAEA,MAAa,cAAA,GAAaC,iBAAAA,YAAAA,CAAY;CACpC,MAAM;CACN;CACA,UAAU;EACR,iBAAiB,OAAO,WAAyC;GAC/D,MAAM,SAAS,OAAO;EACxB;EACA,uBAAuB,OAAO,WAAuC;GACnE,MAAM,iBAAiB,OAAO;EAChC;EACA,mBAAmB,OAAO,WAAgD;GACxE,MAAM,OAAO,OAAO;EACtB;EACA,eAAe,OAAO,WAAgC;GACpD,MAAM,KAAK,OAAO,QAAQ,MAAM,OAAO;GACvC,MAAM,cAAc,OAAO,QAAQ;EACrC;EACA,cAAc,OAAO,WAAkC;GAErD,MAAM,GAAG,OAAO,UAAU,aAAa,GAAG,SAAS,MAAM;GACzD,MAAM,OAAO;GACb,MAAM,cAAc,MAAM,gBAAgB,OAAO,UAAU,OAAO,MAAM;E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zC;EACA,6BAA6B,OAAO,WAAmC;GACrE,MAAM,0BAA0B,OAAO;EACzC;CACF;AACF,CAAC;AAED,MAAa,UAAU,WAAW;AAClC,IAAA,qBAAe,WAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-
|
|
1
|
+
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-DjSjrp5b.cjs";
|
|
2
2
|
export { CustomColumn, GlobalSettings, User, UserSession, UserSettings, UserSliceType, actions, _default as default, initialState, sliceName, usersSlice };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-
|
|
1
|
+
import { a as UserSettings, c as actions, d as usersSlice, i as UserSession, l as initialState, n as GlobalSettings, o as UserSliceType, r as User, s as _default, t as CustomColumn, u as sliceName } from "../index-C0yQmQih.js";
|
|
2
2
|
export { CustomColumn, GlobalSettings, User, UserSession, UserSettings, UserSliceType, actions, _default as default, initialState, sliceName, usersSlice };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { User as BackendUser, DeploymentPhase, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":";;;AAsBA,MAAa,YAAY;AA+EzB,MAAa,eAA8B;CACzC,MAAM,CAAC;CACP,aAAa;CACb,gBAAgB,CAEhB;CACA,eAAe,CAAC;CAChB,QAAQ;CACR,gBAAgB;EACd,cAAc,KAAA;EACd,iBAAiB,CAAC;EAClB,gBAAgB,CAAC;EACjB,SAAS;CACX;CACA,oBAAoB,EAClB,GAAG,sBACL;CACA,WAAW,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G,cAAc,MAAM;GAC9D,MAAM,YAAY;EACpB;EACA,mBAAmB,OAAO,WAA0C;GAClE,MAAM,gBAAgB,OAAO;EAC/B;EACA,oBAAoB,OAAO,WAA0C;GACnE,MAAM,sBAAsB;GAC5B,MAAM,iBAAiB;IACrB,GAAG,MAAM;IACT,GAAG,OAAO;GACZ;EACF;EACA,kBAAkB,OAAO,WAAwC;GAC/D,MAAM,0BAA0B;GAChC,MAAM,eAAe;IACnB,GAAG,MAAM;IACT,GAAG,OAAO;GACZ;EACF;EACA,kBAAkB,OAAO,WAAgE;GACvF,MAAM,EAAE,IAAI,YAAY,YAAY,SAAS,OAAO;GACpD,MAAM,SAAS,KAAK,MAAM;IAAE,GAAG,MAAM,SAAS,KAAK;IAAK;GAAU;EACpE;EACA,mBAAmB,OAAO,WAA6D;GACrF,MAAM,SAAS,OAAO;IACpB,GAAG,MAAM,SAAS;IAClB,GAAG,OAAO;GACZ;EACF;EACA,wBAAwB,OAAO,WAAmC;GAChE,MAAM,qBAAqB,OAAO;EACpC;EACA,0BAA0B,OAAO,WAAmC;GAClE,MAAM,0BAA0B,OAAO;EACzC;EACA,6BAA6B,OAAO,WAAmC;GACrE,MAAM,0BAA0B,OAAO;EACzC;CACF;AACF,CAAC;AAED,MAAa,UAAU,WAAW;AAClC,IAAA,qBAAe,WAAW"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/usersSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { User as BackendUser, DeploymentPhase, PersonalAccessToken, TenantInfo, TenantsIdName } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { FilterOperator, PermissionSet, Role } from '../constants';\nimport { defaultPermissionSets, rolesById } from '../constants';\nimport type { ReadState } from './constants';\nimport { READ_STATES } from './constants';\n\nexport const sliceName = 'users';\nexport type User = BackendUser & TenantInfo & { tenants?: TenantsIdName } & { tokens?: PersonalAccessToken[] };\nexport type UserSession = {\n expiresAt?: string;\n token: string;\n};\nexport type CustomColumn = {\n attribute: {\n name: string;\n scope: string;\n };\n size: number;\n};\n\ntype FilterOption = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string;\n};\nexport type GlobalSettings = {\n [x: string]: any;\n id_attribute?: {\n attribute: string;\n scope: string;\n };\n previousFilters: FilterOption[];\n previousPhases: DeploymentPhase[][];\n retries: number;\n};\ntype Column = {\n id: string;\n key: string;\n name: string;\n scope: string;\n title: string;\n};\nexport type UserSettings = {\n [x: string]: any;\n columnSelection: Column[];\n feedbackCollectedAt?: string;\n firstLoginTimestamp: null | string;\n mode?: 'light' | 'dark';\n onboarding: Partial<{\n address: string;\n approach: 'physical' | 'virtual' | 'mcu' | null;\n complete: boolean;\n demoArtifactPort: number;\n deviceType: string[] | string | null;\n progress: string | null;\n showTips: null | boolean;\n showTipsDialog: boolean;\n }>;\n securityAlertDismissedTimestamp: null | string;\n tooltips?: object;\n trackingConsentGiven?: boolean;\n};\n\nexport type UserSliceType = {\n byId: Record<string, User>;\n currentSession?: UserSession | object;\n currentUser: string | null;\n customColumns: CustomColumn[];\n globalSettings: GlobalSettings;\n permissionSetsById: Record<string, PermissionSet>;\n qrCode: string | null;\n rolesById: Record<string, Role>;\n rolesInitialized: boolean;\n settingsInitialized: boolean;\n showConnectDeviceDialog: boolean;\n showFeedbackDialog: boolean;\n showStartupNotification: boolean;\n tooltips: {\n byId: Record<string, { readState: ReadState }>;\n };\n userSettings: UserSettings;\n userSettingsInitialized: boolean;\n};\n\nexport const initialState: UserSliceType = {\n byId: {},\n currentUser: null,\n currentSession: {\n // { token: window.localStorage.getItem('JWT'), expiresAt: '2023-01-01T00:15:00.000Z' | undefined }, // expiresAt depending on the stay logged in setting\n },\n customColumns: [],\n qrCode: null,\n globalSettings: {\n id_attribute: undefined,\n previousFilters: [],\n previousPhases: [],\n retries: 0\n },\n permissionSetsById: {\n ...defaultPermissionSets\n },\n rolesById: {\n ...rolesById\n },\n rolesInitialized: false,\n settingsInitialized: false,\n showConnectDeviceDialog: false,\n showFeedbackDialog: false,\n showStartupNotification: false,\n tooltips: {\n byId: {\n // <id>: { readState: <read|unread> } // this object is getting enhanced by the tooltip texts in the app constants\n }\n },\n userSettings: {\n columnSelection: [],\n onboarding: {},\n firstLoginTimestamp: null,\n securityAlertDismissedTimestamp: null\n },\n userSettingsInitialized: false\n};\n\nexport const usersSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedQrCode: (state, action: PayloadAction<string | null>) => {\n state.qrCode = action.payload;\n },\n successfullyLoggedIn: (state, action: PayloadAction<UserSession>) => {\n state.currentSession = action.payload;\n },\n receivedUserList: (state, action: PayloadAction<Record<string, User>>) => {\n state.byId = action.payload;\n },\n receivedUser: (state, action: PayloadAction<User>) => {\n state.byId[action.payload.id] = action.payload;\n state.currentUser = action.payload.id;\n },\n removedUser: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removedUser, ...byId } = state.byId;\n state.byId = byId;\n state.currentUser = state.currentUser === action.payload ? null : state.currentUser;\n },\n updatedUser: (state, action: PayloadAction<Partial<User> & { id: string }>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n receivedPermissionSets: (state, action: PayloadAction<Record<string, PermissionSet>>) => {\n state.permissionSetsById = action.payload;\n },\n receivedRoles: (state, action: PayloadAction<Record<string, Role>>) => {\n state.rolesById = action.payload;\n state.rolesInitialized = true;\n },\n finishedRoleInitialization: (state, action) => {\n state.rolesInitialized = action.payload;\n },\n createdRole: (state, action: PayloadAction<Role>) => {\n state.rolesById[action.payload.name] = {\n ...state.rolesById[action.payload.name],\n ...action.payload\n };\n },\n removedRole: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: toBeRemoved, ...rolesById } = state.rolesById;\n state.rolesById = rolesById;\n },\n setCustomColumns: (state, action: PayloadAction<CustomColumn[]>) => {\n state.customColumns = action.payload;\n },\n setGlobalSettings: (state, action: PayloadAction<GlobalSettings>) => {\n state.settingsInitialized = true;\n state.globalSettings = {\n ...state.globalSettings,\n ...action.payload\n };\n },\n setUserSettings: (state, action: PayloadAction<UserSettings>) => {\n state.userSettingsInitialized = true;\n state.userSettings = {\n ...state.userSettings,\n ...action.payload\n };\n },\n setTooltipState: (state, action: PayloadAction<{ id: string; readState: ReadState }>) => {\n const { id, readState = READ_STATES.read } = action.payload;\n state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };\n },\n setTooltipsState: (state, action: PayloadAction<UserSliceType['tooltips']['byId']>) => {\n state.tooltips.byId = {\n ...state.tooltips.byId,\n ...action.payload\n };\n },\n setShowFeedbackDialog: (state, action: PayloadAction<boolean>) => {\n state.showFeedbackDialog = action.payload;\n },\n setShowConnectingDialog: (state, action: PayloadAction<boolean>) => {\n state.showConnectDeviceDialog = action.payload;\n },\n setShowStartupNotification: (state, action: PayloadAction<boolean>) => {\n state.showStartupNotification = action.payload;\n }\n }\n});\n\nexport const actions = usersSlice.actions;\nexport default usersSlice.reducer;\n"],"mappings":";;;AAsBA,MAAa,YAAY;AA+EzB,MAAa,eAA8B;CACzC,MAAM,CAAC;CACP,aAAa;CACb,gBAAgB,CAEhB;CACA,eAAe,CAAC;CAChB,QAAQ;CACR,gBAAgB;EACd,cAAc,KAAA;EACd,iBAAiB,CAAC;EAClB,gBAAgB,CAAC;EACjB,SAAS;CACX;CACA,oBAAoB,EAClB,GAAG,sBACL;CACA,WAAW,EACT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AAc,MAAM;GAC9D,MAAM,YAAY;EACpB;EACA,mBAAmB,OAAO,WAA0C;GAClE,MAAM,gBAAgB,OAAO;EAC/B;EACA,oBAAoB,OAAO,WAA0C;GACnE,MAAM,sBAAsB;GAC5B,MAAM,iBAAiB;IACrB,GAAG,MAAM;IACT,GAAG,OAAO;GACZ;EACF;EACA,kBAAkB,OAAO,WAAwC;GAC/D,MAAM,0BAA0B;GAChC,MAAM,eAAe;IACnB,GAAG,MAAM;IACT,GAAG,OAAO;GACZ;EACF;EACA,kBAAkB,OAAO,WAAgE;GACvF,MAAM,EAAE,IAAI,YAAY,YAAY,SAAS,OAAO;GACpD,MAAM,SAAS,KAAK,MAAM;IAAE,GAAG,MAAM,SAAS,KAAK;IAAK;GAAU;EACpE;EACA,mBAAmB,OAAO,WAA6D;GACrF,MAAM,SAAS,OAAO;IACpB,GAAG,MAAM,SAAS;IAClB,GAAG,OAAO;GACZ;EACF;EACA,wBAAwB,OAAO,WAAmC;GAChE,MAAM,qBAAqB,OAAO;EACpC;EACA,0BAA0B,OAAO,WAAmC;GAClE,MAAM,0BAA0B,OAAO;EACzC;EACA,6BAA6B,OAAO,WAAmC;GACrE,MAAM,0BAA0B,OAAO;EACzC;CACF;AACF,CAAC;AAED,MAAa,UAAU,WAAW;AAClC,IAAA,qBAAe,WAAW"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as ReadState } from "../constants-B3Jdkn2b.cjs";
|
|
2
|
-
import { i as UserSession, t as CustomColumn } from "../index-
|
|
2
|
+
import { i as UserSession, t as CustomColumn } from "../index-DjSjrp5b.cjs";
|
|
3
3
|
//#region src/usersSlice/mocks.d.ts
|
|
4
4
|
declare const mockState: {
|
|
5
5
|
byId: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as ReadState } from "../constants-B3Jdkn2b.js";
|
|
2
|
-
import { i as UserSession, t as CustomColumn } from "../index-
|
|
2
|
+
import { i as UserSession, t as CustomColumn } from "../index-C0yQmQih.js";
|
|
3
3
|
//#region src/usersSlice/mocks.d.ts
|
|
4
4
|
declare const mockState: {
|
|
5
5
|
byId: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as ReadState } from "../constants-B3Jdkn2b.cjs";
|
|
2
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "../index-
|
|
2
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "../index-DjSjrp5b.cjs";
|
|
3
3
|
import { i as ReleaseSliceType } from "../index-DiAjzARZ.cjs";
|
|
4
4
|
import { n as OnboardingSliceType } from "../index-CoObjWL4.cjs";
|
|
5
5
|
import { o as DeploymentsSliceType } from "../index-mvxjivTJ.cjs";
|
|
@@ -7,7 +7,7 @@ import { c as DeviceSliceType } from "../index-DnKVKM0G.cjs";
|
|
|
7
7
|
import { t as AppSliceType } from "../index-DeOpb2oK.cjs";
|
|
8
8
|
import { t as MonitorSliceType } from "../index-Ctj2r57a.cjs";
|
|
9
9
|
import { t as OrganizationSliceType } from "../index-C_LGDJN2.cjs";
|
|
10
|
-
import { r as RootState } from "../store-
|
|
10
|
+
import { r as RootState } from "../store-ByJVpIz9.cjs";
|
|
11
11
|
//#region src/usersSlice/selectors.d.ts
|
|
12
12
|
declare const getRolesById: (state: RootState) => Record<string, import("@northern.tech/utils/constants").Role>;
|
|
13
13
|
declare const getTooltipsById: (state: RootState) => Record<string, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as ReadState } from "../constants-B3Jdkn2b.js";
|
|
2
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "../index-
|
|
2
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "../index-C0yQmQih.js";
|
|
3
3
|
import { i as ReleaseSliceType } from "../index-C8uiyxnb.js";
|
|
4
4
|
import { n as OnboardingSliceType } from "../index-CoObjWL4.js";
|
|
5
5
|
import { o as DeploymentsSliceType } from "../index-B8td4-rY.js";
|
|
@@ -7,7 +7,7 @@ import { c as DeviceSliceType } from "../index-BpamudGf.js";
|
|
|
7
7
|
import { t as AppSliceType } from "../index-Bs0c1-WY.js";
|
|
8
8
|
import { t as MonitorSliceType } from "../index-BAGyeC-q.js";
|
|
9
9
|
import { t as OrganizationSliceType } from "../index-ChKTa1aL.js";
|
|
10
|
-
import { r as RootState } from "../store-
|
|
10
|
+
import { r as RootState } from "../store-BKVs6gSc.js";
|
|
11
11
|
//#region src/usersSlice/selectors.d.ts
|
|
12
12
|
declare const getRolesById: (state: RootState) => Record<string, import("@northern.tech/utils/constants").Role>;
|
|
13
13
|
declare const getTooltipsById: (state: RootState) => Record<string, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { S as Role, c as AuditLogPermission, h as GroupsPermission, k as UserManagementPermission, p as DeploymentPermission, v as PermissionSet, x as ReleasesPermission } from "../constants-Rl3FJzFf.cjs";
|
|
2
2
|
import { i as ReadState } from "../constants-B3Jdkn2b.cjs";
|
|
3
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User$1, t as CustomColumn } from "../index-
|
|
3
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User$1, t as CustomColumn } from "../index-DjSjrp5b.cjs";
|
|
4
4
|
import { i as SnackbarContent } from "../index-DeOpb2oK.cjs";
|
|
5
|
-
import { r as RootState, t as AppDispatch } from "../store-
|
|
5
|
+
import { r as RootState, t as AppDispatch } from "../store-ByJVpIz9.cjs";
|
|
6
6
|
import { EmailUpdateRequest, PendingEmailChange, PersonalAccessToken } from "@northern.tech/types/MenderTypes";
|
|
7
7
|
//#region src/usersSlice/thunks.d.ts
|
|
8
8
|
type ThunkPermissionSet = Record<string, PermissionSet>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { S as Role, c as AuditLogPermission, h as GroupsPermission, k as UserManagementPermission, p as DeploymentPermission, v as PermissionSet, x as ReleasesPermission } from "../constants-B_H4squx.js";
|
|
2
2
|
import { i as ReadState } from "../constants-B3Jdkn2b.js";
|
|
3
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User$1, t as CustomColumn } from "../index-
|
|
3
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, r as User$1, t as CustomColumn } from "../index-C0yQmQih.js";
|
|
4
4
|
import { i as SnackbarContent } from "../index-Bs0c1-WY.js";
|
|
5
|
-
import { r as RootState, t as AppDispatch } from "../store-
|
|
5
|
+
import { r as RootState, t as AppDispatch } from "../store-BKVs6gSc.js";
|
|
6
6
|
import { EmailUpdateRequest, PendingEmailChange, PersonalAccessToken } from "@northern.tech/types/MenderTypes";
|
|
7
7
|
//#region src/usersSlice/thunks.d.ts
|
|
8
8
|
type ThunkPermissionSet = Record<string, PermissionSet>;
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as mapTermsToFilters, C as getDeploymentState, D as listItemMapper, E as isDarkMode, F as statCollector, I as stringToBoolean, L as stripOrchestratorManifestPrefix, M as mergePermissions, N as parseSubscriptionPreview, O as mapDeviceAttributes, P as progress, R as stripUndefined, S as getAttributeScopeLabel, T as groupDeploymentStats, _ as dispatchDelayed, b as filtersFilter, f as DeploymentStats, g as convertToBackendSPLimits, h as convertDeviceListStateToFilters, j as mapUserRolesToUiPermissions, k as mapFiltersToTerms, m as FilterTerm, p as ErrorWithResponse, v as ensureVersionString, w as groupDeploymentDevicesStats, x as generateDeploymentGroupDetails, y as extractErrorMessage } from "./store-
|
|
1
|
+
import { A as mapTermsToFilters, C as getDeploymentState, D as listItemMapper, E as isDarkMode, F as statCollector, I as stringToBoolean, L as stripOrchestratorManifestPrefix, M as mergePermissions, N as parseSubscriptionPreview, O as mapDeviceAttributes, P as progress, R as stripUndefined, S as getAttributeScopeLabel, T as groupDeploymentStats, _ as dispatchDelayed, b as filtersFilter, f as DeploymentStats, g as convertToBackendSPLimits, h as convertDeviceListStateToFilters, j as mapUserRolesToUiPermissions, k as mapFiltersToTerms, m as FilterTerm, p as ErrorWithResponse, v as ensureVersionString, w as groupDeploymentDevicesStats, x as generateDeploymentGroupDetails, y as extractErrorMessage } from "./store-ByJVpIz9.cjs";
|
|
2
2
|
export { DeploymentStats, ErrorWithResponse, FilterTerm, convertDeviceListStateToFilters, convertToBackendSPLimits, dispatchDelayed, ensureVersionString, extractErrorMessage, filtersFilter, generateDeploymentGroupDetails, getAttributeScopeLabel, getDeploymentState, groupDeploymentDevicesStats, groupDeploymentStats, isDarkMode, listItemMapper, mapDeviceAttributes, mapFiltersToTerms, mapTermsToFilters, mapUserRolesToUiPermissions, mergePermissions, parseSubscriptionPreview, progress, statCollector, stringToBoolean, stripOrchestratorManifestPrefix, stripUndefined };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as mapTermsToFilters, C as getDeploymentState, D as listItemMapper, E as isDarkMode, F as statCollector, I as stringToBoolean, L as stripOrchestratorManifestPrefix, M as mergePermissions, N as parseSubscriptionPreview, O as mapDeviceAttributes, P as progress, R as stripUndefined, S as getAttributeScopeLabel, T as groupDeploymentStats, _ as dispatchDelayed, b as filtersFilter, f as DeploymentStats, g as convertToBackendSPLimits, h as convertDeviceListStateToFilters, j as mapUserRolesToUiPermissions, k as mapFiltersToTerms, m as FilterTerm, p as ErrorWithResponse, v as ensureVersionString, w as groupDeploymentDevicesStats, x as generateDeploymentGroupDetails, y as extractErrorMessage } from "./store-
|
|
1
|
+
import { A as mapTermsToFilters, C as getDeploymentState, D as listItemMapper, E as isDarkMode, F as statCollector, I as stringToBoolean, L as stripOrchestratorManifestPrefix, M as mergePermissions, N as parseSubscriptionPreview, O as mapDeviceAttributes, P as progress, R as stripUndefined, S as getAttributeScopeLabel, T as groupDeploymentStats, _ as dispatchDelayed, b as filtersFilter, f as DeploymentStats, g as convertToBackendSPLimits, h as convertDeviceListStateToFilters, j as mapUserRolesToUiPermissions, k as mapFiltersToTerms, m as FilterTerm, p as ErrorWithResponse, v as ensureVersionString, w as groupDeploymentDevicesStats, x as generateDeploymentGroupDetails, y as extractErrorMessage } from "./store-BKVs6gSc.js";
|
|
2
2
|
export { DeploymentStats, ErrorWithResponse, FilterTerm, convertDeviceListStateToFilters, convertToBackendSPLimits, dispatchDelayed, ensureVersionString, extractErrorMessage, filtersFilter, generateDeploymentGroupDetails, getAttributeScopeLabel, getDeploymentState, groupDeploymentDevicesStats, groupDeploymentStats, isDarkMode, listItemMapper, mapDeviceAttributes, mapFiltersToTerms, mapTermsToFilters, mapUserRolesToUiPermissions, mergePermissions, parseSubscriptionPreview, progress, statCollector, stringToBoolean, stripOrchestratorManifestPrefix, stripUndefined };
|