bfg-common 1.5.771 → 1.5.773

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/assets/localization/local_be.json +3 -0
  2. package/assets/localization/local_en.json +3 -0
  3. package/assets/localization/local_hy.json +3 -0
  4. package/assets/localization/local_kk.json +3 -0
  5. package/assets/localization/local_ru.json +3 -0
  6. package/assets/localization/local_zh.json +3 -0
  7. package/components/atoms/table/dataGrid/DataGrid.vue +4 -19
  8. package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
  9. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
  10. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  11. package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
  12. package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
  13. package/components/common/pages/scheduledTasks/table/Table.vue +11 -3
  14. package/components/common/pages/scheduledTasks/table/{expandDetails/Old.vue → detailsList/DetailsList.vue} +4 -7
  15. package/components/common/pages/scheduledTasks/table/{expandDetails/historyRun/HistoryRun.vue → detailsList/Table.vue} +5 -9
  16. package/components/common/pages/scheduledTasks/table/{expandDetails/historyRun → detailsList}/lib/config/historyRunsTable.ts +2 -4
  17. package/components/common/pages/scheduledTasks/table/{expandDetails/historyRun → detailsList}/lib/config/tableKeys.ts +1 -1
  18. package/components/common/pages/scheduledTasks/table/{expandDetails/lib/config/expandDetails.ts → detailsList/lib/config/tasksRowDetails.ts} +1 -3
  19. package/components/common/pages/scheduledTasks/table/lib/config/scheduledTasksTable.ts +0 -3
  20. package/package.json +1 -1
  21. package/components/common/configure/securityProfile/SecurityProfile.vue +0 -28
  22. package/components/common/configure/securityProfile/lockdownMode/LockdownMode.vue +0 -112
  23. package/components/common/configure/securityProfile/lockdownMode/lib/utils/constructData.ts +0 -27
  24. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/LockdownModeEdit.vue +0 -61
  25. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/New.vue +0 -5
  26. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/Old.vue +0 -109
  27. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/ExceptionUsers.vue +0 -28
  28. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/New.vue +0 -5
  29. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/Old.vue +0 -180
  30. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/table.ts +0 -64
  31. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/tableKeys.ts +0 -6
  32. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/models/types.ts +0 -1
  33. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lib/config/tabs.ts +0 -19
  34. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lockdownMode/LockdownMode.vue +0 -22
  35. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lockdownMode/New.vue +0 -5
  36. package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lockdownMode/Old.vue +0 -76
  37. package/components/common/configure/securityProfile/lockdownMode/tools/New.vue +0 -5
  38. package/components/common/configure/securityProfile/lockdownMode/tools/Old.vue +0 -30
  39. package/components/common/configure/securityProfile/lockdownMode/tools/Tools.vue +0 -29
  40. package/components/common/pages/scheduledTasks/table/expandDetails/ExpandDetails.vue +0 -30
  41. package/components/common/pages/scheduledTasks/table/expandDetails/New.vue +0 -61
  42. package/store/inventory/modules/configure/securityProfile/actions.ts +0 -58
  43. package/store/inventory/modules/configure/securityProfile/getters.ts +0 -10
  44. package/store/inventory/modules/configure/securityProfile/lib/models/interfaces.ts +0 -16
  45. package/store/inventory/modules/configure/securityProfile/mutations.ts +0 -13
  46. package/store/inventory/modules/configure/securityProfile/state.ts +0 -7
  47. package/store/inventory/modules/configure/securityProfile/store.ts +0 -12
  48. /package/components/common/pages/scheduledTasks/table/{expandDetails/historyRun → detailsList}/lib/models/types.ts +0 -0
@@ -9,7 +9,7 @@ import {
9
9
  UI_E_RecentTaskStatus,
10
10
  } from '~/lib/models/store/tasks/enums'
11
11
  import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
12
- import { historyLastRunTableKeys } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/lib/config/tableKeys'
12
+ import { historyLastRunTableKeys } from '~/components/common/pages/scheduledTasks/table/detailsList/lib/config/tableKeys'
13
13
  import { schedulerRunStatus } from '~/components/common/pages/scheduledTasks/table/lib/config/schedulerStatus'
14
14
 
15
15
  const getItems = (
@@ -53,9 +53,7 @@ export const bodyItems = (
53
53
  const bodyItems: UI_I_BodyItem[][] = []
54
54
  data.forEach((event): void => {
55
55
  const startTime = event[historyLastRunTableKeys[0]]
56
- const formattedStartTime = $formattedDatetime(+startTime * 1000, {
57
- hasSeconds: true,
58
- })
56
+ const formattedStartTime = $formattedDatetime(+startTime * 1000, { hasSeconds: true })
59
57
 
60
58
  const endTime = event[historyLastRunTableKeys[2]]
61
59
  const formattedEndTime =
@@ -1,4 +1,4 @@
1
- import type { UI_T_HistoryLastRunTableTuple } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/lib/models/types'
1
+ import type { UI_T_HistoryLastRunTableTuple } from '~/components/common/pages/scheduledTasks/table/detailsList/lib/models/types'
2
2
 
3
3
  export const historyLastRunTableKeys: UI_T_HistoryLastRunTableTuple = [
4
4
  'start',
@@ -37,9 +37,7 @@ export const detailsListFunc = (
37
37
  {
38
38
  id: 5,
39
39
  text: localization.common.lastModified,
40
- value: $formattedDatetime(data.last_modified * 1000, {
41
- hasSeconds: true,
42
- }),
40
+ value: $formattedDatetime(data.last_modified * 1000, { hasSeconds: true }),
43
41
  testId: 'scheduled-tasks-last-modified',
44
42
  },
45
43
 
@@ -95,9 +95,6 @@ export const bodyItems = (
95
95
  key: 'col0',
96
96
  text: task[scheduledTaskTableItemsKeys[0]],
97
97
  id: task.rid,
98
- data: {
99
- expandData: task,
100
- },
101
98
  isShowToggleIcon: true,
102
99
  testId: `adapter-table-${key}-row-item`,
103
100
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.771",
4
+ "version": "1.5.773",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -1,28 +0,0 @@
1
- <template>
2
- <common-configure-security-profile-lockdown-mode
3
- :active-node-name="props.activeNodeName"
4
- />
5
- </template>
6
-
7
- <script setup lang="ts">
8
- const props = defineProps<{
9
- activeNodeName: string
10
- nodeId: string
11
- }>()
12
-
13
- const { $store }: any = useNuxtApp()
14
-
15
- const getData = (): void => {
16
- $store.dispatch('securityProfile/A_GET_SECURITY_PROFILE', props.nodeId)
17
- }
18
-
19
- onMounted(() => {
20
- getData()
21
- })
22
-
23
- onUnmounted(() => {
24
- $store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hostSystemSecurityProfile')
25
- })
26
- </script>
27
-
28
- <style scoped lang="scss"></style>
@@ -1,112 +0,0 @@
1
- <template>
2
- <div class="lockdown-mode">
3
- <common-configure-security-profile-lockdown-mode-tools
4
- @show-edit="isShowEdit = true"
5
- />
6
-
7
- <div class="stack-view">
8
- <atoms-stack-block
9
- :has-children="false"
10
- test-id="certificate-subject-stack-block"
11
- >
12
- <template #stackBlockKey>
13
- <div class="flex-align-center">
14
- <span data-id="certificate-subject">
15
- {{ localization.common.lockdownMode }}
16
- </span>
17
- </div>
18
- </template>
19
- <template #stackBlockContent>
20
- <span data-id="certificate-subject-value">
21
- {{ currentTextLockdownMode }}
22
- </span>
23
- </template>
24
- </atoms-stack-block>
25
- <atoms-stack-block
26
- :has-children="false"
27
- test-id="certificate-subject-stack-block"
28
- >
29
- <template #stackBlockKey>
30
- <div class="flex-align-center">
31
- <span data-id="certificate-subject">
32
- {{ localization.configureSecurityProfile.exceptionUsers }}
33
- </span>
34
- </div>
35
- </template>
36
- <template #stackBlockContent>
37
- <span data-id="certificate-subject-value">
38
- {{ lockdownModeExceptionUsers }}
39
- </span>
40
- </template>
41
- </atoms-stack-block>
42
- </div>
43
- </div>
44
-
45
- <common-configure-security-profile-lockdown-mode-modals-lockdown-mode-edit
46
- v-if="isShowEdit"
47
- :active-node-name="props.activeNodeName"
48
- :edit-data="securityProfileData.lockdownMode"
49
- @hide="isShowEdit = false"
50
- @submit="isShowEdit = false"
51
- />
52
- </template>
53
-
54
- <script setup lang="ts">
55
- import type { UI_I_Localization } from '~/lib/models/interfaces'
56
- import type { UI_I_SecurityProfileData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
57
- import { constructData } from '~/components/common/configure/securityProfile/lockdownMode/lib/utils/constructData'
58
-
59
- const props = defineProps<{
60
- activeNodeName: string
61
- }>()
62
-
63
- const { $store }: any = useNuxtApp()
64
-
65
- const nodeId = useRoute().params.id
66
-
67
- const localization = computed<UI_I_Localization>(() => useLocal())
68
-
69
- const systemSecurityProfile = computed<UI_I_SecurityProfileData | null>(
70
- () => $store.getters['securityProfile/getSystemSecurityProfile']
71
- )
72
-
73
- const securityProfileData = computed<UI_I_SecurityProfileData>(() =>
74
- constructData(systemSecurityProfile.value)
75
- )
76
-
77
- const lockdownModeExceptionUsers = computed<string>(() =>
78
- securityProfileData.value.lockdownMode.exceptionUsers.join(', ')
79
- )
80
-
81
- const currentTextLockdownMode = computed<string>(() => {
82
- let result = ''
83
-
84
- switch (securityProfileData.value.lockdownMode.lockdownMode) {
85
- case 'disabled':
86
- result = localization.value.common.disabled
87
- break
88
- }
89
-
90
- return result
91
- })
92
-
93
- const getData = (): void => {
94
- $store.dispatch('securityProfile/A_GET_SECURITY_PROFILE', nodeId)
95
- }
96
-
97
- const isShowEdit = ref<boolean>(false)
98
-
99
- onMounted(() => {
100
- getData()
101
- })
102
-
103
- onUnmounted(() => {
104
- $store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hostSystemSecurityProfile')
105
- })
106
- </script>
107
-
108
- <style scoped lang="scss">
109
- .stack-view {
110
- margin-top: 10px;
111
- }
112
- </style>
@@ -1,27 +0,0 @@
1
- import type { UI_I_SecurityProfileData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
2
-
3
- const getLockdownModeCurrentText = (data: string): string => {
4
- switch (data) {
5
- case 'disabled':
6
- return 'disabled'
7
- default:
8
- return ''
9
- }
10
- }
11
-
12
- export const constructData = (
13
- data: UI_I_SecurityProfileData | null
14
- ): UI_I_SecurityProfileData => {
15
- let result: UI_I_SecurityProfileData | null = null
16
-
17
- result = {
18
- lockdownMode: {
19
- lockdownMode: getLockdownModeCurrentText(
20
- data?.lockdownMode.lockdownMode || ''
21
- ),
22
- exceptionUsers: data?.lockdownMode.exceptionUsers || [],
23
- },
24
- }
25
-
26
- return result
27
- }
@@ -1,61 +0,0 @@
1
- <template>
2
- <component
3
- :is="currentComponent"
4
- v-model:local-edit-data="localEditData"
5
- :title="title"
6
- :selected-tab="selectedTab"
7
- :tab-items="tabItems"
8
- @add-new-user="onAddNewUser"
9
- />
10
- </template>
11
-
12
- <script setup lang="ts">
13
- import type { UI_I_Localization } from '~/lib/models/interfaces'
14
- import type { UI_I_VerticalTabs } from '~/components/atoms/tabs/lib/models/interfaces'
15
- import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
16
- import { navigateTabsFunc } from '~/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lib/config/tabs'
17
-
18
- const props = defineProps<{
19
- activeNodeName: string
20
- editData: UI_I_LockdownModeData
21
- }>()
22
-
23
- const { $store }: any = useNuxtApp()
24
-
25
- const localization = computed<UI_I_Localization>(() => useLocal())
26
-
27
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
28
- const currentComponent = computed(() =>
29
- isNewView.value
30
- ? defineAsyncComponent(() => import('./New.vue'))
31
- : defineAsyncComponent(() => import('./Old.vue'))
32
- )
33
-
34
- const title = computed<string>(
35
- () => props.activeNodeName + ' - ' + localization.value.common.lockdownMode
36
- )
37
-
38
- const selectedTab = ref<number>(1)
39
- const tabItems = computed<UI_I_VerticalTabs[]>(() =>
40
- navigateTabsFunc(localization.value)
41
- )
42
-
43
- const localEditData = ref<UI_I_LockdownModeData>({
44
- lockdownMode: '',
45
- exceptionUsers: [],
46
- })
47
- watch(
48
- () => props.editData,
49
- (newValue) => {
50
- localEditData.value.lockdownMode = newValue.lockdownMode
51
- localEditData.value.exceptionUsers = newValue.exceptionUsers
52
- },
53
- { immediate: true, deep: true }
54
- )
55
-
56
- const onAddNewUser = (value: string): void => {
57
- localEditData.value.exceptionUsers.push(value)
58
- }
59
- </script>
60
-
61
- <style scoped lang="scss"></style>
@@ -1,5 +0,0 @@
1
- <template>New</template>
2
-
3
- <script setup lang="ts"></script>
4
-
5
- <style scoped lang="scss"></style>
@@ -1,109 +0,0 @@
1
- <template>
2
- <atoms-modal
3
- :title="props.title"
4
- width="862px"
5
- class="lockdown-mode-edit"
6
- test-id="lockdown-mode-edit"
7
- show
8
- @hide="emits('hide')"
9
- @submit="emits('submit')"
10
- >
11
- <template #modalBody>
12
- <div class="flex column-gap-6 lockdown-mode-edit__content">
13
- <atoms-tabs-vertical-tabs
14
- v-model="selectedTab"
15
- :items="props.tabItems"
16
- test-id="lockdown-mode-edit-tabs"
17
- class="lockdown-mode-edit__tabs"
18
- />
19
-
20
- <common-configure-security-profile-lockdown-mode-modals-lockdown-mode-edit-lockdown-mode
21
- v-if="selectedTab === 1"
22
- v-model:form="localEditData"
23
- />
24
-
25
- <common-configure-security-profile-lockdown-mode-modals-lockdown-mode-edit-exception-users
26
- v-if="selectedTab === 2"
27
- v-model:form="localEditData"
28
- @add="emits('add-new-user', $event)"
29
- />
30
- </div>
31
- </template>
32
- </atoms-modal>
33
- </template>
34
-
35
- <script lang="ts" setup>
36
- import type { UI_I_VerticalTabs } from '~/components/atoms/tabs/lib/models/interfaces'
37
- import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
38
-
39
- const selectedTab = defineModel<number>('selectedTab', { required: true })
40
- const localEditData = defineModel<UI_I_LockdownModeData>('localEditData', {
41
- required: true,
42
- })
43
-
44
- const props = defineProps<{
45
- title: string
46
- tabItems: UI_I_VerticalTabs[]
47
- }>()
48
-
49
- const emits = defineEmits<{
50
- (event: 'add-new-user', value: string): void
51
- (event: 'hide'): void
52
- (event: 'submit'): void
53
- }>()
54
- </script>
55
-
56
- <style lang="scss" scoped>
57
- .lockdown-mode-edit {
58
- &__content {
59
- height: inherit;
60
- }
61
- &__tabs {
62
- &.vertical-groups-sidenav {
63
- background: initial;
64
- &.sidenav {
65
- border-right: 0;
66
- }
67
- }
68
- }
69
- &__alert {
70
- margin-bottom: 10px;
71
- }
72
-
73
- :deep(.modal-body) {
74
- height: inherit;
75
-
76
- .custom-radio-label {
77
- padding-left: 23px;
78
- }
79
- .add-new-name-input {
80
- width: 170px;
81
- }
82
- .sub-text-input {
83
- position: absolute;
84
- left: 0;
85
- top: 22px;
86
- font-size: 11px;
87
- }
88
- .add-user-btn {
89
- margin-left: 20px;
90
- text-transform: uppercase;
91
- color: #0079ad;
92
- font-size: 11px;
93
- cursor: pointer;
94
- font-weight: 500;
95
-
96
- &:hover {
97
- color: #00608a;
98
- }
99
- }
100
- .ellipsis-vertical-btn {
101
- cursor: pointer;
102
-
103
- svg {
104
- width: 15px;
105
- }
106
- }
107
- }
108
- }
109
- </style>
@@ -1,28 +0,0 @@
1
- <template>
2
- <component
3
- :is="currentComponent"
4
- v-model:local-edit-data="form"
5
- @add="emits('add', $event)"
6
- />
7
- </template>
8
-
9
- <script setup lang="ts">
10
- import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
11
-
12
- const form = defineModel<UI_I_LockdownModeData>('form')
13
-
14
- const emits = defineEmits<{
15
- (event: 'add', value: string): void
16
- }>()
17
-
18
- const { $store }: any = useNuxtApp()
19
-
20
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
21
- const currentComponent = computed(() =>
22
- isNewView.value
23
- ? defineAsyncComponent(() => import('./New.vue'))
24
- : defineAsyncComponent(() => import('./old/Old.vue'))
25
- )
26
- </script>
27
-
28
- <style scoped lang="scss"></style>
@@ -1,5 +0,0 @@
1
- <template>New</template>
2
-
3
- <script setup lang="ts"></script>
4
-
5
- <style scoped lang="scss"></style>
@@ -1,180 +0,0 @@
1
- <template>
2
- <div class="exception-users">
3
- <h5 class="font-bold">
4
- {{ localization.configureSecurityProfile.exceptionUsers }}
5
- </h5>
6
- <label>
7
- {{ localization.configureSecurityProfile.exceptionUsersDesc }}
8
- <span class="relative">
9
- <input v-model="newUserName" type="text" class="add-new-name-input" />
10
- <span class="sub-text-input">
11
- {{ localization.configureSecurityProfile.separateUsersWithCommas }}
12
- </span>
13
- </span>
14
- <span class="add-user-btn" @click="emits('add', newUserName)">
15
- {{ localization.common.addUser }}
16
- </span>
17
- </label>
18
-
19
- <div class="mt-3">
20
- <atoms-table-data-grid
21
- v-model:column-keys="columnItems"
22
- :head-items="headItems"
23
- :body-items="bodyItems"
24
- :total-items="bodyItems.length"
25
- :page-size="100"
26
- :page="1"
27
- :total-pages="1"
28
- test-id="exception-users-table"
29
- hide-pagination
30
- hide-page-size
31
- off-select-by-row
32
- server-off
33
- >
34
- <template #col1="{ item }">
35
- <div class="data-table__action-icon">
36
- <atoms-popover
37
- :test-id="`${item.data.id}-popover`"
38
- @click="onShowTooltip(item.data.id)"
39
- >
40
- <template #elem>
41
- <span class="ellipsis-vertical-btn">
42
- <atoms-the-icon name="ellipsis-vertical" />
43
- </span>
44
- </template>
45
- <template #content>
46
- <div v-if="showTooltip && item.data.id === selectedUserId">
47
- <div class="action-container">
48
- <div class="action-wrap relative">
49
- <button
50
- :data-id="`${item.data.id}-remove-button`"
51
- class="action"
52
- @click="onRemoveUser(item.data.name)"
53
- >
54
- {{ localization.common.removeUser }}
55
- </button>
56
- </div>
57
- </div>
58
- </div>
59
- </template>
60
- </atoms-popover>
61
- </div>
62
- </template>
63
- </atoms-table-data-grid>
64
- </div>
65
- </div>
66
- </template>
67
-
68
- <script setup lang="ts">
69
- import type {
70
- UI_I_HeadItem,
71
- UI_I_BodyItem,
72
- } from '~/components/atoms/table/compact/lib/models/interfaces'
73
- import type { UI_I_Localization } from '~/lib/models/interfaces'
74
- import type { UI_I_ColumnKey } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
75
- import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
76
- import * as exceptionUsersTable from '~/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/table'
77
-
78
- const localEditData = defineModel<UI_I_LockdownModeData>('localEditData', {
79
- required: true,
80
- })
81
-
82
- const emits = defineEmits<{
83
- (event: 'add', value: string): void
84
- }>()
85
-
86
- const localization = computed<UI_I_Localization>(() => useLocal())
87
-
88
- const newUserName = ref<string>('')
89
-
90
- const columnItems = computed<UI_I_ColumnKey[]>(() =>
91
- exceptionUsersTable.columnKeys(localization.value)
92
- )
93
- const headItems = computed<UI_I_HeadItem[]>(() =>
94
- exceptionUsersTable.headItems(localization.value)
95
- )
96
-
97
- const bodyItems = ref<UI_I_BodyItem[][]>([])
98
- watch(
99
- localEditData,
100
- (newValue) => {
101
- if (!newValue.exceptionUsers?.length) {
102
- bodyItems.value = []
103
- return
104
- }
105
- bodyItems.value = exceptionUsersTable.bodyItems(newValue.exceptionUsers)
106
- },
107
- { immediate: true, deep: true }
108
- )
109
-
110
- const selectedUserId = ref<number | null>(null)
111
- const showTooltip = ref<boolean>(false)
112
- const onShowTooltip = (id: number): void => {
113
- selectedUserId.value = id
114
- showTooltip.value = true
115
- }
116
-
117
- const onRemoveUser = (value: string): void => {
118
- localEditData.value.exceptionUsers =
119
- localEditData.value.exceptionUsers.filter((item) => item !== value)
120
- }
121
-
122
- const hideActionsPopover = (): void => {
123
- showTooltip.value = false
124
- }
125
-
126
- onMounted(() => {
127
- // TODO найти вариант лучше
128
-
129
- setTimeout(() => {
130
- window.addEventListener('click', hideActionsPopover)
131
- })
132
- })
133
- onUnmounted(() => {
134
- window.removeEventListener('click', hideActionsPopover)
135
- })
136
- </script>
137
-
138
- <style scoped lang="scss">
139
- .action-container {
140
- position: absolute;
141
- top: -33px;
142
- left: 5px;
143
- background: var(--block-view-bg-color2);
144
- border: 1px solid var(--block-border-color);
145
- padding: 5px 6px;
146
- border-radius: 3px;
147
-
148
- .action-wrap {
149
- &::after {
150
- content: '';
151
- display: block;
152
- position: absolute;
153
- width: 8px;
154
- height: 8px;
155
- background: var(--block-view-bg-color2);
156
- transform: rotate(45deg);
157
- left: -11px;
158
- bottom: calc(50% - 4px);
159
- border-left: 0.5px solid var(--block-border-color);
160
- border-bottom: 0.5px solid var(--block-border-color);
161
- z-index: var(--z-dropdown);
162
- }
163
- }
164
- .action {
165
- border: none;
166
- padding: 1px 20px;
167
- width: 100%;
168
- text-align: left;
169
- cursor: pointer;
170
- background: var(--block-view-bg-color2);
171
- color: var(--global-font-color3);
172
- white-space: nowrap;
173
- text-transform: capitalize;
174
-
175
- &:hover {
176
- background: var(--vertical-nav-hover-bg-color);
177
- }
178
- }
179
- }
180
- </style>
@@ -1,64 +0,0 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type {
3
- UI_I_ColumnKey,
4
- UI_I_HeadItem,
5
- UI_I_BodyItem,
6
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
7
- import { exceptionUsersTableKeys } from '~/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/tableKeys'
8
- import {
9
- constructColumnKey,
10
- constructHeadItem,
11
- } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
12
-
13
- const getItems = (
14
- localization: UI_I_Localization
15
- ): [string, boolean, string, string][] => {
16
- return [
17
- ['', true, '10%', exceptionUsersTableKeys[0]],
18
- [localization.common.user, true, '90%', exceptionUsersTableKeys[1]],
19
- ]
20
- }
21
-
22
- export const columnKeys = (
23
- localization: UI_I_Localization
24
- ): UI_I_ColumnKey[] => {
25
- const result: UI_I_ColumnKey[] = []
26
- getItems(localization).forEach((item, i) => {
27
- const col = `col${i + 1}`
28
- result.push(constructColumnKey(col, item[0], item[1]))
29
- })
30
-
31
- return result
32
- }
33
-
34
- export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
35
- const result: UI_I_HeadItem[] = []
36
- getItems(localization).forEach((item, i) => {
37
- const col = `col${i + 1}`
38
- result.push(
39
- constructHeadItem(col, item[0], item[3], false, item[2], '', item[3])
40
- )
41
- })
42
- return result
43
- }
44
-
45
- export const bodyItems = (data: string[]): UI_I_BodyItem[][] => {
46
- const bodyItems: UI_I_BodyItem[][] = []
47
- data.forEach((item: string, key) => {
48
- bodyItems.push([
49
- {
50
- key: 'col1',
51
- text: '',
52
- id: key,
53
- data: { id: key, name: item },
54
- },
55
- {
56
- key: 'col2',
57
- text: item,
58
- id: key,
59
- },
60
- ])
61
- })
62
-
63
- return bodyItems
64
- }