bfg-common 1.3.625 → 1.3.627

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.
@@ -2489,5 +2489,8 @@
2489
2489
  "alarmRules": "Правілы сігналізацыі",
2490
2490
  "deleteAlarmDefinition": "Выдаліць вызначэнне будзільніка",
2491
2491
  "deleteAlarmDefinitionDesc": "Вы ўпэўнены, што хочаце выдаліць вызначэнне будзільніка \"{0}\"?",
2492
- "backupRules": "Правілы рэзервовага капіравання"
2492
+ "backupRules": "Правілы рэзервовага капіравання",
2493
+ "restoreExisting": "Restore Existing",
2494
+ "restoreAsNew": "Restore as New",
2495
+ "restoreDiskOnly": "Restore Disk only"
2493
2496
  }
@@ -2493,5 +2493,8 @@
2493
2493
  "alarmRules": "Alarm Rules",
2494
2494
  "deleteAlarmDefinition": "Delete Alarm Definition",
2495
2495
  "deleteAlarmDefinitionDesc": "Are you sure you want to delete alarm definition '{0}'?",
2496
- "backupRules": "Backup Rules"
2496
+ "backupRules": "Backup Rules",
2497
+ "restoreExisting": "Restore Existing",
2498
+ "restoreAsNew": "Restore as New",
2499
+ "restoreDiskOnly": "Restore Disk only"
2497
2500
  }
@@ -2493,5 +2493,8 @@
2493
2493
  "alarmRules": "Տագնապային կանոններ",
2494
2494
  "deleteAlarmDefinition": "Ջնջել ահազանգի սահմանումը",
2495
2495
  "deleteAlarmDefinitionDesc": "Իսկապե՞ս ուզում եք ջնջել «{0}» ահազանգի սահմանումը:",
2496
- "backupRules": "Պահուստավորման կանոններ"
2496
+ "backupRules": "Պահուստավորման կանոններ",
2497
+ "restoreExisting": "Restore Existing",
2498
+ "restoreAsNew": "Restore as New",
2499
+ "restoreDiskOnly": "Restore Disk only"
2497
2500
  }
@@ -2492,5 +2492,8 @@
2492
2492
  "alarmRules": "Дабыл ережелері",
2493
2493
  "deleteAlarmDefinition": "Дабыл анықтамасын жою",
2494
2494
  "deleteAlarmDefinitionDesc": "\"{0}\" дабыл анықтамасын шынымен жойғыңыз келе ме?",
2495
- "backupRules": "Сақтық көшірме жасау ережелері"
2495
+ "backupRules": "Сақтық көшірме жасау ережелері",
2496
+ "restoreExisting": "Restore Existing",
2497
+ "restoreAsNew": "Restore as New",
2498
+ "restoreDiskOnly": "Restore Disk only"
2496
2499
  }
@@ -2495,5 +2495,8 @@
2495
2495
  "alarmRules": "Правила тревоги",
2496
2496
  "deleteAlarmDefinition": "Удалить определение тревоги",
2497
2497
  "deleteAlarmDefinitionDesc": "Вы уверены, что хотите удалить определение будильника «{0}»?",
2498
- "backupRules": "Правила резервного копирования"
2498
+ "backupRules": "Правила резервного копирования",
2499
+ "restoreExisting": "Restore Existing",
2500
+ "restoreAsNew": "Restore as New",
2501
+ "restoreDiskOnly": "Restore Disk only"
2499
2502
  }
@@ -2491,5 +2491,8 @@
2491
2491
  "alarmRules": "报警规则",
2492
2492
  "deleteAlarmDefinition": "删除警报定义",
2493
2493
  "deleteAlarmDefinitionDesc": "您确定要删除警报定义“{0}”吗?",
2494
- "backupRules": "备份规则"
2494
+ "backupRules": "备份规则",
2495
+ "restoreExisting": "Restore Existing",
2496
+ "restoreAsNew": "Restore as New",
2497
+ "restoreDiskOnly": "Restore Disk only"
2495
2498
  }
@@ -1,91 +1,91 @@
1
- <template>
2
- <div class="title-block" :style="blockWidth">
3
- <div class="title-block__container" :style="blockWidth">
4
- <div
5
- class="title-block__title pointer"
6
- :style="blockTitleWidth"
7
- @click="emits('sort')"
8
- >
9
- <b>{{ props.title }}</b>
10
- <atoms-the-icon
11
- v-show="props.sorting[0]"
12
- :class="['sort-arrow', { down: !props.sorting[1] }]"
13
- width="14px"
14
- height="14px"
15
- name="sort-arrow"
16
- />
17
- </div>
18
- <div class="title-block__body">
19
- <slot name="content"></slot>
20
- </div>
21
- </div>
22
- </div>
23
- </template>
24
-
25
- <script setup lang="ts">
26
- const props = withDefaults(
27
- defineProps<{
28
- title: string
29
- width: number
30
- sorting?: [boolean, boolean]
31
- }>(),
32
- {
33
- sorting: () => [false, false],
34
- }
35
- )
36
- const emits = defineEmits<{
37
- (event: 'sort'): void
38
- }>()
39
-
40
- const blockWidth = computed(() => ({ width: `${props.width}px` }))
41
- const blockTitleWidth = computed(() => ({ width: `${props.width - 2}px` }))
42
- </script>
43
-
44
- <style scoped lang="scss">
45
- .title-block {
46
- width: 100%;
47
- min-height: 400px;
48
- position: relative;
49
-
50
- &__container {
51
- position: absolute;
52
- top: 0;
53
- left: 0;
54
- display: flex;
55
- flex-direction: column;
56
- height: 400px;
57
- border-width: 1px;
58
- border-style: solid;
59
- border-image: initial;
60
- background: var(--block-view-bg-color5);
61
- border-color: var(--block-border-color2);
62
- }
63
- &__title {
64
- display: inline-block;
65
- flex: 0 0 auto;
66
- background-color: var(--block-view-bg-color6);
67
- border-bottom: 1px solid var(--block-border-color2);
68
- padding: 8px;
69
- white-space: nowrap;
70
- overflow: hidden !important;
71
- text-overflow: ellipsis;
72
-
73
- b {
74
- font-family: Metropolis, Avenir Next, Helvetica Neue, Arial, sans-serif;
75
- font-size: 13px;
76
- color: var(--global-font-color9);
77
- font-weight: bolder;
78
- letter-spacing: normal;
79
- }
80
- .sort-arrow {
81
- &.down {
82
- transform: rotate(180deg);
83
- }
84
- }
85
- }
86
- &__body {
87
- flex: 1 1 auto;
88
- overflow-y: auto;
89
- }
90
- }
91
- </style>
1
+ <template>
2
+ <div class="title-block" :style="blockWidth">
3
+ <div class="title-block__container" :style="blockWidth">
4
+ <div
5
+ class="title-block__title pointer"
6
+ :style="blockTitleWidth"
7
+ @click="emits('sort')"
8
+ >
9
+ <b>{{ props.title }}</b>
10
+ <atoms-the-icon
11
+ v-show="props.sorting[0]"
12
+ :class="['sort-arrow', { down: !props.sorting[1] }]"
13
+ width="14px"
14
+ height="14px"
15
+ name="sort-arrow"
16
+ />
17
+ </div>
18
+ <div class="title-block__body">
19
+ <slot name="content"></slot>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </template>
24
+
25
+ <script setup lang="ts">
26
+ const props = withDefaults(
27
+ defineProps<{
28
+ title: string
29
+ width: number
30
+ sorting?: [boolean, boolean]
31
+ }>(),
32
+ {
33
+ sorting: () => [false, false],
34
+ }
35
+ )
36
+ const emits = defineEmits<{
37
+ (event: 'sort'): void
38
+ }>()
39
+
40
+ const blockWidth = computed(() => ({ width: `${props.width}px` }))
41
+ const blockTitleWidth = computed(() => ({ width: `${props.width - 2}px` }))
42
+ </script>
43
+
44
+ <style scoped lang="scss">
45
+ .title-block {
46
+ width: 100%;
47
+ min-height: 400px;
48
+ position: relative;
49
+
50
+ &__container {
51
+ position: absolute;
52
+ top: 0;
53
+ left: 0;
54
+ display: flex;
55
+ flex-direction: column;
56
+ height: 400px;
57
+ border-width: 1px;
58
+ border-style: solid;
59
+ border-image: initial;
60
+ background: var(--block-view-bg-color5);
61
+ border-color: var(--block-border-color2);
62
+ }
63
+ &__title {
64
+ display: inline-block;
65
+ flex: 0 0 auto;
66
+ background-color: var(--block-view-bg-color6);
67
+ border-bottom: 1px solid var(--block-border-color2);
68
+ padding: 8px;
69
+ white-space: nowrap;
70
+ overflow: hidden !important;
71
+ text-overflow: ellipsis;
72
+
73
+ b {
74
+ font-family: Metropolis, Avenir Next, Helvetica Neue, Arial, sans-serif;
75
+ font-size: 13px;
76
+ color: var(--global-font-color9);
77
+ font-weight: bolder;
78
+ letter-spacing: normal;
79
+ }
80
+ .sort-arrow {
81
+ &.down {
82
+ transform: rotate(180deg);
83
+ }
84
+ }
85
+ }
86
+ &__body {
87
+ flex: 1 1 auto;
88
+ overflow-y: auto;
89
+ }
90
+ }
91
+ </style>
@@ -1,21 +1,21 @@
1
- <template>
2
- <div>
3
- <span>{{ props.title }}:</span>
4
- <span>{{ formattedDateString }}</span>
5
- </div>
6
- </template>
7
-
8
- <script setup lang="ts">
9
- import { format } from 'date-fns'
10
- const props = defineProps<{
11
- title: string
12
- value: number
13
- }>()
14
-
15
- const getDateString = (dateAlias: number): string =>
16
- format(new Date(dateAlias), 'MM/dd/yyyy HH:mm:ss a')
17
-
18
- const formattedDateString = computed<string>(() => getDateString(props.value))
19
- </script>
20
-
21
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <div>
3
+ <span>{{ props.title }}:</span>
4
+ <span>{{ formattedDateString }}</span>
5
+ </div>
6
+ </template>
7
+
8
+ <script setup lang="ts">
9
+ import { format } from 'date-fns'
10
+ const props = defineProps<{
11
+ title: string
12
+ value: number
13
+ }>()
14
+
15
+ const getDateString = (dateAlias: number): string =>
16
+ format(new Date(dateAlias), 'MM/dd/yyyy HH:mm:ss a')
17
+
18
+ const formattedDateString = computed<string>(() => getDateString(props.value))
19
+ </script>
20
+
21
+ <style scoped lang="scss"></style>
@@ -1,86 +1,86 @@
1
- <template>
2
- <common-context-recursion-new
3
- v-if="isNewView"
4
- :items="props.items"
5
- :action-loading="props.actionLoading"
6
- :is-loading="isLoading"
7
- :test-id="props.testId"
8
- @select-item="selectItem"
9
- @toggle-items="toggleItems"
10
- />
11
- <common-context-recursion-old
12
- v-else
13
- :items="props.items"
14
- :action-loading="props.actionLoading"
15
- :is-loading="isLoading"
16
- :test-id="props.testId"
17
- @select-item="selectItem"
18
- @toggle-items="toggleItems"
19
- />
20
- </template>
21
-
22
- <script setup lang="ts">
23
- import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
24
- import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
25
-
26
- const props = defineProps<{
27
- items: UI_I_ContextMenuItem[]
28
- actionLoading: string | null
29
- testId?: string
30
- }>()
31
- const emits = defineEmits<{
32
- (event: 'select-item', value: UI_I_ContextMenuItem): void
33
- }>()
34
-
35
- const { $store }: any = useNuxtApp()
36
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
37
-
38
- const isLoading = computed<boolean>(
39
- () => !!props.items.find((item) => item.actionType === props.actionLoading)
40
- )
41
-
42
- const selectItem = (item: UI_I_ContextMenuItem): void => {
43
- if (item.disabled) return
44
-
45
- emits('select-item', item)
46
- }
47
-
48
- const setElementPosition = (event: I_HTMLLiElement): void => {
49
- const top = event.target.getBoundingClientRect().top
50
- const childMenu = event.target.children[1].children[0]
51
- childMenu.style.top = `${top}px`
52
-
53
- const childMenuRect = (childMenu.getBoundingClientRect() as DOMRect) || null
54
-
55
- // Обрабатываем, если попап вишел за viewport (с права)
56
- if (childMenuRect.right > window.innerWidth) {
57
- event.target.classList.add('left')
58
- } else {
59
- event.target.classList.remove('left')
60
- }
61
-
62
- // Обрабатываем, если попап вишел за viewport (с низу)
63
- if (childMenuRect.bottom > window.innerHeight) {
64
- childMenu.style.top = 'auto'
65
- childMenu.style.bottom = '0px'
66
- } else {
67
- childMenu.style.bottom = 'unset'
68
- }
69
- }
70
-
71
- const toggleItems = (
72
- data: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
73
- ): void => {
74
- const [item, show, e] = data
75
- if (!item.items.length || item.disabled) {
76
- return
77
- }
78
- item.isShowItems = show
79
-
80
- nextTick(() => {
81
- setElementPosition(e)
82
- })
83
- }
84
- </script>
85
-
86
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <common-context-recursion-new
3
+ v-if="isNewView"
4
+ :items="props.items"
5
+ :action-loading="props.actionLoading"
6
+ :is-loading="isLoading"
7
+ :test-id="props.testId"
8
+ @select-item="selectItem"
9
+ @toggle-items="toggleItems"
10
+ />
11
+ <common-context-recursion-old
12
+ v-else
13
+ :items="props.items"
14
+ :action-loading="props.actionLoading"
15
+ :is-loading="isLoading"
16
+ :test-id="props.testId"
17
+ @select-item="selectItem"
18
+ @toggle-items="toggleItems"
19
+ />
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
24
+ import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
25
+
26
+ const props = defineProps<{
27
+ items: UI_I_ContextMenuItem[]
28
+ actionLoading: string | null
29
+ testId?: string
30
+ }>()
31
+ const emits = defineEmits<{
32
+ (event: 'select-item', value: UI_I_ContextMenuItem): void
33
+ }>()
34
+
35
+ const { $store }: any = useNuxtApp()
36
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
37
+
38
+ const isLoading = computed<boolean>(
39
+ () => !!props.items.find((item) => item.actionType === props.actionLoading)
40
+ )
41
+
42
+ const selectItem = (item: UI_I_ContextMenuItem): void => {
43
+ if (item.disabled) return
44
+
45
+ emits('select-item', item)
46
+ }
47
+
48
+ const setElementPosition = (event: I_HTMLLiElement): void => {
49
+ const top = event.target.getBoundingClientRect().top
50
+ const childMenu = event.target.children[1].children[0]
51
+ childMenu.style.top = `${top}px`
52
+
53
+ const childMenuRect = (childMenu.getBoundingClientRect() as DOMRect) || null
54
+
55
+ // Обрабатываем, если попап вишел за viewport (с права)
56
+ if (childMenuRect.right > window.innerWidth) {
57
+ event.target.classList.add('left')
58
+ } else {
59
+ event.target.classList.remove('left')
60
+ }
61
+
62
+ // Обрабатываем, если попап вишел за viewport (с низу)
63
+ if (childMenuRect.bottom > window.innerHeight) {
64
+ childMenu.style.top = 'auto'
65
+ childMenu.style.bottom = '0px'
66
+ } else {
67
+ childMenu.style.bottom = 'unset'
68
+ }
69
+ }
70
+
71
+ const toggleItems = (
72
+ data: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
73
+ ): void => {
74
+ const [item, show, e] = data
75
+ if (!item.items.length || item.disabled) {
76
+ return
77
+ }
78
+ item.isShowItems = show
79
+
80
+ nextTick(() => {
81
+ setElementPosition(e)
82
+ })
83
+ }
84
+ </script>
85
+
86
+ <style scoped lang="scss"></style>