bfg-common 1.4.877 → 1.4.878

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.
@@ -2,4 +2,5 @@ export interface UI_I_VerticalTabs {
2
2
  text: string
3
3
  value: string | number
4
4
  testId?: string
5
+ disabled?: boolean
5
6
  }
@@ -17,6 +17,7 @@
17
17
  v-for="(item, key) in props.consoleOptions"
18
18
  :key="key"
19
19
  class="radio flex"
20
+ :title="item.disabled ? localization.common.inDevelopment : ''"
20
21
  >
21
22
  <ui-radio
22
23
  v-model="consoleValue"
@@ -8,6 +8,7 @@
8
8
  v-for="(item, key) in props.consoleOptions"
9
9
  :key="key"
10
10
  :class="['radio', item.disabled && 'disabled']"
11
+ :title="item.disabled ? localization.common.inDevelopment : ''"
11
12
  >
12
13
  <input
13
14
  :id="item.label"
@@ -4,7 +4,7 @@
4
4
  {{ props.description }}
5
5
  </div>
6
6
 
7
- <div class="flex-align-center">
7
+ <div class="flex-align-center" :title="localization.common.inDevelopment">
8
8
  <label for="view">{{ localization.common.newView }}</label>
9
9
  <input
10
10
  id="view"
@@ -73,9 +73,12 @@
73
73
  <nuxt-link
74
74
  :id="`nav-item-${key}-${key2}`"
75
75
  :data-id="item2.testId"
76
- class="nav-link"
76
+ :class="['nav-link', { disabled: item2.disabled }]"
77
77
  active-class="active"
78
- :to="item2.to"
78
+ :to="!item2.disabled && item2.to"
79
+ :title="
80
+ item2.disabled ? localization.common.inDevelopment : ''
81
+ "
79
82
  @click="emits('hide-main-menu')"
80
83
  >
81
84
  <ui-icon-main-navigation-panel
@@ -259,6 +262,11 @@ const localization = computed<UI_I_Localization>(() => useLocal())
259
262
  white-space: nowrap;
260
263
  text-decoration: none;
261
264
 
265
+ &.disabled {
266
+ opacity: 0.6;
267
+ cursor: not-allowed;
268
+ }
269
+
262
270
  &.active {
263
271
  background-color: var(--vertical-active-nav-bg-color);
264
272
  color: var(--vertical-active-nav-color);
@@ -268,7 +276,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
268
276
  }
269
277
  }
270
278
 
271
- &:not(.active):hover {
279
+ &:not(.active):not(.disabled):hover {
272
280
  background-color: var(--vertical-nav-hover-bg-color);
273
281
  color: var(--vertical-nav-hover-item-color);
274
282
  }
@@ -28,10 +28,15 @@
28
28
  :id="`nav-item-${key}-${key2}`"
29
29
  :key="item2.id"
30
30
  :data-id="item2.testId"
31
- class="nav-link"
32
31
  active-class="active"
33
- :to="item2.to"
34
- :title="item2.title"
32
+ :to="!item2.disabled && item2.to"
33
+ :class="['nav-link', { disabled: item2.disabled }]"
34
+ :title="
35
+ item2.disabled
36
+ ? localization.common.inDevelopment
37
+ : item2.title
38
+ "
39
+ :disabled="item2.disabled"
35
40
  @click="emits('hide-main-menu')"
36
41
  >
37
42
  <span class="nav-text">
@@ -160,6 +165,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
160
165
  display: flex;
161
166
  padding: 2px 0.6rem 2px 0.7rem;
162
167
  width: fit-content;
168
+
163
169
  .category-text {
164
170
  opacity: 0;
165
171
  }
@@ -202,6 +208,12 @@ const localization = computed<UI_I_Localization>(() => useLocal())
202
208
  height: auto;
203
209
  line-height: 21px;
204
210
  flex-basis: auto;
211
+
212
+ &.disabled {
213
+ cursor: not-allowed;
214
+ opacity: 0.6;
215
+ }
216
+
205
217
  &.active {
206
218
  background-color: var(--row-selected-bg-color);
207
219
  border-bottom: 1px solid transparent;
@@ -4,4 +4,5 @@ export interface UI_I_NavigationItem {
4
4
  title: string
5
5
  iconName: string
6
6
  testId?: string
7
+ disabled?: boolean
7
8
  }
@@ -1,9 +1,15 @@
1
1
  <template>
2
- <ui-widget class="category-block-item">
2
+ <ui-widget
3
+ :class="['category-block-item', { disabled: props.item.disabled }]"
4
+ >
3
5
  <nuxt-link
4
6
  class="unit"
5
- :to="navigate"
6
- :title="props.item.navigateTo"
7
+ :to="!props.item.disabled && navigate"
8
+ :title="
9
+ props.item.disabled
10
+ ? localization.common.inDevelopment
11
+ : props.item.navigateTo
12
+ "
7
13
  :data-id="props.testId"
8
14
  @click="emits('change-navigation')"
9
15
  @contextmenu="emits('change-navigation')"
@@ -18,6 +24,7 @@
18
24
  </ui-widget>
19
25
  </template>
20
26
  <script setup lang="ts">
27
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
21
28
  import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
22
29
 
23
30
  const props = defineProps<{
@@ -28,6 +35,8 @@ const emits = defineEmits<{
28
35
  (event: 'change-navigation'): void
29
36
  }>()
30
37
 
38
+ const localization = computed<UI_I_Localization>(() => useLocal())
39
+
31
40
  const navigate = computed<string>(() => '/' + props.item.navigateTo)
32
41
  </script>
33
42
 
@@ -44,11 +53,18 @@ const navigate = computed<string>(() => '/' + props.item.navigateTo)
44
53
  .category-block-item {
45
54
  max-width: 176px;
46
55
  min-height: 110px;
56
+
57
+ &.disabled {
58
+ opacity: 0.6;
59
+ cursor: not-allowed;
60
+ }
61
+
47
62
  .unit {
48
63
  @include flex($dir: column, $just: space-between);
49
64
  width: 100%;
50
65
  height: 100%;
51
66
  text-decoration-line: none;
67
+
52
68
  &-icon {
53
69
  min-width: 28px;
54
70
  min-height: 28px;
@@ -63,7 +79,7 @@ const navigate = computed<string>(() => '/' + props.item.navigateTo)
63
79
  }
64
80
  }
65
81
 
66
- &:hover {
82
+ &:hover:not(.disabled) {
67
83
  background: var(--shortcut-item-hover-bg);
68
84
  cursor: pointer;
69
85
  .unit {
@@ -1,9 +1,13 @@
1
1
  <template>
2
2
  <div>
3
3
  <nuxt-link
4
- class="unit"
5
- :to="navigate"
6
- :title="props.item.navigateTo"
4
+ :class="['unit', { disabled: props.item.disabled }]"
5
+ :to="!props.item.disabled && navigate"
6
+ :title="
7
+ props.item.disabled
8
+ ? localization.common.inDevelopment
9
+ : props.item.navigateTo
10
+ "
7
11
  :data-id="props.testId"
8
12
  @click="emits('change-navigation')"
9
13
  @contextmenu="emits('change-navigation')"
@@ -18,6 +22,7 @@
18
22
  </div>
19
23
  </template>
20
24
  <script setup lang="ts">
25
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
21
26
  import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
22
27
 
23
28
  const props = defineProps<{
@@ -28,6 +33,8 @@ const emits = defineEmits<{
28
33
  (event: 'change-navigation'): void
29
34
  }>()
30
35
 
36
+ const localization = computed<UI_I_Localization>(() => useLocal())
37
+
31
38
  const navigate = computed<string>(() => '/' + props.item.navigateTo)
32
39
  </script>
33
40
  <style lang="scss" scoped>
@@ -39,6 +46,12 @@ const navigate = computed<string>(() => '/' + props.item.navigateTo)
39
46
  width: 95px;
40
47
  margin: 21px 10px;
41
48
  text-decoration-line: none;
49
+
50
+ &.disabled {
51
+ opacity: 0.6;
52
+ cursor: not-allowed;
53
+ }
54
+
42
55
  .icon-2 {
43
56
  margin: 0 10px 15px 10px;
44
57
  color: var(--global-font-color3);
@@ -5,6 +5,7 @@ export interface UI_I_BlockItem {
5
5
  navigateTo?: string
6
6
  nav?: string
7
7
  testId?: string
8
+ disabled?: boolean
8
9
  }
9
10
 
10
11
  export interface UI_I_ShortcutsItems {
@@ -159,6 +159,7 @@ const texts = computed<UI_I_TableTexts>(() => ({
159
159
  exportAll: localization.value.common.exportAll,
160
160
  exportSelected: localization.value.common.exportSelected,
161
161
  all: localization.value.common.all,
162
+ filter: localization.value.common.filter,
162
163
  }))
163
164
  const skeletonData = ref<UI_I_DataTableSkeleton>({
164
165
  columnsCount: 6,
@@ -314,8 +315,8 @@ const onSelectNodeOfTree = (
314
315
  width: 100%;
315
316
 
316
317
  .action-icon {
317
- width: 16px;
318
- height: 16px;
318
+ width: 20px;
319
+ height: 20px;
319
320
  color: var(--actions-icon-color);
320
321
 
321
322
  &:hover {
@@ -232,11 +232,11 @@ export const getBodyDataFunc = (
232
232
  isHiddenCollapse: false,
233
233
  collapseToggle: false,
234
234
  data: [
235
- { col: 'col0', text: task.taskName },
235
+ { col: 'col0', text: task.taskName || '--' },
236
236
  {
237
237
  key: 'icon',
238
238
  col: 'col1',
239
- text: task.target,
239
+ text: task.target || '--',
240
240
  data: targetData,
241
241
  },
242
242
  {
@@ -246,16 +246,16 @@ export const getBodyDataFunc = (
246
246
  data: statusData,
247
247
  },
248
248
  { col: 'col3', text: task.details || '--' },
249
- { col: 'col4', text: task.initiator },
249
+ { col: 'col4', text: task.initiator || '--' },
250
250
  { col: 'col5', text: `${task.queuedFor} ms` },
251
251
  { col: 'col6', text: formattedStartTime },
252
252
  { col: 'col7', text: formattedCompletionTime },
253
253
  { col: 'col8', text: `${task.execution} ms` },
254
- { col: 'col9', text: task.server },
254
+ { col: 'col9', text: task.server || '--' },
255
255
  {
256
256
  key: 'icon',
257
257
  col: 'col10',
258
- text: task.zone,
258
+ text: task.zone || '--',
259
259
  data: zoneData,
260
260
  },
261
261
  {
@@ -4,17 +4,17 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
4
4
  // TODO поменять все :texts для таблицы нового дизайна
5
5
  export const tableTextsFunc = (
6
6
  localization: UI_I_Localization
7
- ): UI_I_TableTexts => {
8
- return {
9
- rowsPerPage: localization.common.rowsPerPage,
10
- of: localization.common.of,
11
- searchHere: localization.common.searchHere,
12
- selected: localization.common.selected,
13
- columns: localization.common.columns,
14
- previous: localization.common.previous,
15
- next: localization.common.next,
16
- noItemsFound: localization.common.noItemsFound,
17
- exportSelected: localization.common.exportSelected,
18
- exportAll: localization.common.exportAll,
19
- }
20
- }
7
+ ): UI_I_TableTexts => ({
8
+ searchHere: localization.common.searchHere,
9
+ rowsPerPage: localization.common.rowsPerPage,
10
+ of: localization.common.of,
11
+ selected: localization.common.selected,
12
+ columns: localization.common.columns,
13
+ previous: localization.common.previous,
14
+ next: localization.common.next,
15
+ noItemsFound: localization.common.noItemsFound,
16
+ exportAll: localization.common.exportAll,
17
+ exportSelected: localization.common.exportSelected,
18
+ all: localization.common.all,
19
+ filter: localization.common.filter,
20
+ })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.877",
4
+ "version": "1.4.878",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -35,7 +35,7 @@
35
35
  "@vueuse/components": "^10.1.2",
36
36
  "date-fns": "^2.29.3",
37
37
  "bfg-nuxt-3-graph": "1.0.21",
38
- "bfg-uikit": "1.0.356",
38
+ "bfg-uikit": "1.0.362",
39
39
  "html2canvas": "^1.4.1",
40
40
  "prettier-eslint": "^15.0.1"
41
41
  }