bfg-common 1.3.612 → 1.3.613
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/assets/localization/local_be.json +9 -5
- package/assets/localization/local_en.json +11 -7
- package/assets/localization/local_hy.json +11 -7
- package/assets/localization/local_kk.json +10 -6
- package/assets/localization/local_ru.json +30 -26
- package/assets/localization/local_zh.json +10 -6
- package/components/atoms/TheIcon2.vue +1368 -1366
- package/components/common/browse/Browse.vue +240 -240
- package/components/common/browse/blocks/Title.vue +91 -91
- package/components/common/browse/blocks/info/Date.vue +21 -21
- package/components/common/context/recursion/Recursion.vue +86 -86
- package/components/common/context/recursion/RecursionNew.vue +198 -198
- package/components/common/context/recursion/RecursionOld.vue +212 -212
- package/components/common/home/alertsTable/AlertsTable.vue +114 -114
- package/components/common/split/horizontal/HorizontalNew.vue +321 -321
- package/components/common/wizards/datastore/add/Add.vue +437 -437
- package/package.json +1 -1
- package/plugins/recursion.ts +293 -293
- package/store/tasks/mappers/recentTasks.ts +45 -45
|
@@ -1,240 +1,240 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-modal
|
|
3
|
-
test-id="browse"
|
|
4
|
-
width="864px"
|
|
5
|
-
height="586px"
|
|
6
|
-
:show="props.show"
|
|
7
|
-
:title="localization.selectFile"
|
|
8
|
-
:disabled-submit="!props.selectedFile"
|
|
9
|
-
>
|
|
10
|
-
<template #modalBody>
|
|
11
|
-
<div class="filter-content">
|
|
12
|
-
<atoms-the-icon
|
|
13
|
-
width="16"
|
|
14
|
-
class="filter-icon"
|
|
15
|
-
name="filter"
|
|
16
|
-
fill="#666"
|
|
17
|
-
/>
|
|
18
|
-
<input
|
|
19
|
-
type="text"
|
|
20
|
-
data-id="browse-filter-input"
|
|
21
|
-
:placeholder="localization.filter"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
<common-browse-blocks-container
|
|
25
|
-
type="horizontal"
|
|
26
|
-
:blocks-width="blocksWidth"
|
|
27
|
-
@change-widths="onChangeWidths"
|
|
28
|
-
>
|
|
29
|
-
<template #firstBlock>
|
|
30
|
-
<common-browse-blocks-title
|
|
31
|
-
:width="blocksWidth[0]"
|
|
32
|
-
:title="localization.common.datastores"
|
|
33
|
-
:sorting="firstBlockSorting"
|
|
34
|
-
@sort="onSortFirstBlock"
|
|
35
|
-
>
|
|
36
|
-
<template #content>
|
|
37
|
-
<div class="">
|
|
38
|
-
<common-recursion-tree
|
|
39
|
-
:nodes="nodesLocal"
|
|
40
|
-
class="recursion-tree"
|
|
41
|
-
@get-nodes="onShowNodes"
|
|
42
|
-
@select-node="onSelectNode"
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
46
|
-
</common-browse-blocks-title>
|
|
47
|
-
</template>
|
|
48
|
-
<template #secondBlock>
|
|
49
|
-
<common-browse-blocks-title
|
|
50
|
-
:width="blocksWidth[1]"
|
|
51
|
-
:title="localization.contents"
|
|
52
|
-
:sorting="secondBlockSorting"
|
|
53
|
-
@sort="onSortSecondBlock"
|
|
54
|
-
>
|
|
55
|
-
<template #content>
|
|
56
|
-
<common-browse-blocks-contents-files
|
|
57
|
-
:selected-folder-files="filesLocal"
|
|
58
|
-
:selected-file="props.selectedFile"
|
|
59
|
-
@select-file="onSelectFile"
|
|
60
|
-
/>
|
|
61
|
-
</template>
|
|
62
|
-
</common-browse-blocks-title>
|
|
63
|
-
</template>
|
|
64
|
-
<template #thirdBlock>
|
|
65
|
-
<common-browse-blocks-title
|
|
66
|
-
:width="blocksWidth[2]"
|
|
67
|
-
:title="localization.information"
|
|
68
|
-
>
|
|
69
|
-
<template v-if="info" #content>
|
|
70
|
-
<div
|
|
71
|
-
v-for="item in info"
|
|
72
|
-
:key="item.title"
|
|
73
|
-
class="info-container"
|
|
74
|
-
>
|
|
75
|
-
<common-browse-blocks-info-text
|
|
76
|
-
v-if="item.type === 'text'"
|
|
77
|
-
:title="item.title"
|
|
78
|
-
:value="item.value"
|
|
79
|
-
/>
|
|
80
|
-
<common-browse-blocks-info-size
|
|
81
|
-
v-if="item.type === 'size'"
|
|
82
|
-
:title="item.title"
|
|
83
|
-
:value="item.value"
|
|
84
|
-
/>
|
|
85
|
-
<common-browse-blocks-info-date
|
|
86
|
-
v-if="item.type === 'date'"
|
|
87
|
-
:title="item.title"
|
|
88
|
-
:value="item.value"
|
|
89
|
-
/>
|
|
90
|
-
</div>
|
|
91
|
-
</template>
|
|
92
|
-
</common-browse-blocks-title>
|
|
93
|
-
</template>
|
|
94
|
-
</common-browse-blocks-container>
|
|
95
|
-
<div v-if="props.fileTypes" class="ptm">
|
|
96
|
-
<b>{{ localization.fileType }}:</b>
|
|
97
|
-
<select
|
|
98
|
-
v-model="selectedFileTypeLocal"
|
|
99
|
-
:data-id="`${props.testId}-select`"
|
|
100
|
-
>
|
|
101
|
-
<option
|
|
102
|
-
v-for="item in props.fileTypes"
|
|
103
|
-
:key="item.value"
|
|
104
|
-
:value="item.value"
|
|
105
|
-
>
|
|
106
|
-
{{ item.text }}
|
|
107
|
-
</option>
|
|
108
|
-
</select>
|
|
109
|
-
</div>
|
|
110
|
-
</template>
|
|
111
|
-
</atoms-modal>
|
|
112
|
-
</template>
|
|
113
|
-
|
|
114
|
-
<script setup lang="ts">
|
|
115
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
116
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
117
|
-
import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
|
|
118
|
-
import type { UI_I_FileInfo } from '~/components/common/browse/lib/models/interfaces'
|
|
119
|
-
|
|
120
|
-
const props = defineProps<{
|
|
121
|
-
show: boolean
|
|
122
|
-
nodes: any[]
|
|
123
|
-
files: any[]
|
|
124
|
-
info: UI_I_FileInfo[] | null
|
|
125
|
-
selectedFile: any | null
|
|
126
|
-
fileTypes?: UI_I_OptionItem[]
|
|
127
|
-
selectedFileType?: any
|
|
128
|
-
testId?: string
|
|
129
|
-
}>()
|
|
130
|
-
const emits = defineEmits<{
|
|
131
|
-
(
|
|
132
|
-
event: 'get-nodes',
|
|
133
|
-
value: {
|
|
134
|
-
node: any | null
|
|
135
|
-
cb: () => void
|
|
136
|
-
}
|
|
137
|
-
): void
|
|
138
|
-
(event: 'select-node', value: any): void
|
|
139
|
-
(event: 'update:selected-file', value: any): void
|
|
140
|
-
(event: 'update:selected-file-type', value: any): void
|
|
141
|
-
}>()
|
|
142
|
-
|
|
143
|
-
const { $recursion }: any = useNuxtApp()
|
|
144
|
-
|
|
145
|
-
const nodesLocal = computed<any[]>(() => {
|
|
146
|
-
if (!firstBlockSorting.value[0]) return props.nodes
|
|
147
|
-
|
|
148
|
-
const nodesCopy = useDeepCopy(props.nodes)
|
|
149
|
-
$recursion.sortByProp(nodesCopy, 'name', firstBlockSorting.value[1], 'nodes')
|
|
150
|
-
|
|
151
|
-
return nodesCopy
|
|
152
|
-
})
|
|
153
|
-
const filesLocal = computed<any[]>(() => {
|
|
154
|
-
if (!secondBlockSorting.value[0]) return props.files
|
|
155
|
-
|
|
156
|
-
const value = secondBlockSorting.value[1] ? 1 : -1
|
|
157
|
-
return [...props.files].sort((a, b) => {
|
|
158
|
-
const first = a.name.toLowerCase()
|
|
159
|
-
const second = b.name.toLowerCase()
|
|
160
|
-
return first > second ? value : first < second ? -value : 0
|
|
161
|
-
})
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
165
|
-
|
|
166
|
-
const blocksWidth = ref<UI_T_BlocksWidth>([272, 272, 256])
|
|
167
|
-
|
|
168
|
-
const onChangeWidths = (width: number, index: number): void => {
|
|
169
|
-
blocksWidth.value[index] = width
|
|
170
|
-
}
|
|
171
|
-
const onSelectFile = (file: any): void => {
|
|
172
|
-
emits('update:selected-file', file)
|
|
173
|
-
}
|
|
174
|
-
const onSelectNode = (node: any): void => {
|
|
175
|
-
emits('select-node', node)
|
|
176
|
-
}
|
|
177
|
-
const onShowNodes = (data: { node: any | null; cb: () => void }): void => {
|
|
178
|
-
emits('get-nodes', data)
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const selectedFileTypeLocal = computed<any>({
|
|
182
|
-
get() {
|
|
183
|
-
return props.selectedFileType
|
|
184
|
-
},
|
|
185
|
-
set(newValue) {
|
|
186
|
-
emits('update:selected-file-type', newValue)
|
|
187
|
-
},
|
|
188
|
-
})
|
|
189
|
-
|
|
190
|
-
const firstBlockSorting = ref<[boolean, boolean]>([false, false])
|
|
191
|
-
const secondBlockSorting = ref<[boolean, boolean]>([false, false])
|
|
192
|
-
|
|
193
|
-
const onSortFirstBlock = (): void => {
|
|
194
|
-
firstBlockSorting.value = [true, !firstBlockSorting.value[1]]
|
|
195
|
-
}
|
|
196
|
-
const onSortSecondBlock = (): void => {
|
|
197
|
-
secondBlockSorting.value = [true, !secondBlockSorting.value[1]]
|
|
198
|
-
}
|
|
199
|
-
</script>
|
|
200
|
-
|
|
201
|
-
<style scoped lang="scss">
|
|
202
|
-
:deep(.recursion-tree) {
|
|
203
|
-
.tree-node-text-drag {
|
|
204
|
-
border-radius: 3px 0 0 3px;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
:deep(.modal-body) {
|
|
209
|
-
overflow: hidden;
|
|
210
|
-
min-height: 430px;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.info-container {
|
|
214
|
-
padding: 3px;
|
|
215
|
-
div {
|
|
216
|
-
line-height: 17px;
|
|
217
|
-
span {
|
|
218
|
-
font-size: 13px;
|
|
219
|
-
font-weight: 400;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.ptm {
|
|
225
|
-
padding-top: 5px;
|
|
226
|
-
|
|
227
|
-
select {
|
|
228
|
-
outline: none;
|
|
229
|
-
border-color: rgb(118, 118, 118);
|
|
230
|
-
color: rgb(133, 133, 133);
|
|
231
|
-
margin-left: 5px;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.filter-content {
|
|
236
|
-
display: flex;
|
|
237
|
-
justify-content: flex-end;
|
|
238
|
-
margin-bottom: 6px;
|
|
239
|
-
}
|
|
240
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-modal
|
|
3
|
+
test-id="browse"
|
|
4
|
+
width="864px"
|
|
5
|
+
height="586px"
|
|
6
|
+
:show="props.show"
|
|
7
|
+
:title="localization.selectFile"
|
|
8
|
+
:disabled-submit="!props.selectedFile"
|
|
9
|
+
>
|
|
10
|
+
<template #modalBody>
|
|
11
|
+
<div class="filter-content">
|
|
12
|
+
<atoms-the-icon
|
|
13
|
+
width="16"
|
|
14
|
+
class="filter-icon"
|
|
15
|
+
name="filter"
|
|
16
|
+
fill="#666"
|
|
17
|
+
/>
|
|
18
|
+
<input
|
|
19
|
+
type="text"
|
|
20
|
+
data-id="browse-filter-input"
|
|
21
|
+
:placeholder="localization.filter"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
<common-browse-blocks-container
|
|
25
|
+
type="horizontal"
|
|
26
|
+
:blocks-width="blocksWidth"
|
|
27
|
+
@change-widths="onChangeWidths"
|
|
28
|
+
>
|
|
29
|
+
<template #firstBlock>
|
|
30
|
+
<common-browse-blocks-title
|
|
31
|
+
:width="blocksWidth[0]"
|
|
32
|
+
:title="localization.common.datastores"
|
|
33
|
+
:sorting="firstBlockSorting"
|
|
34
|
+
@sort="onSortFirstBlock"
|
|
35
|
+
>
|
|
36
|
+
<template #content>
|
|
37
|
+
<div class="">
|
|
38
|
+
<common-recursion-tree
|
|
39
|
+
:nodes="nodesLocal"
|
|
40
|
+
class="recursion-tree"
|
|
41
|
+
@get-nodes="onShowNodes"
|
|
42
|
+
@select-node="onSelectNode"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
</common-browse-blocks-title>
|
|
47
|
+
</template>
|
|
48
|
+
<template #secondBlock>
|
|
49
|
+
<common-browse-blocks-title
|
|
50
|
+
:width="blocksWidth[1]"
|
|
51
|
+
:title="localization.contents"
|
|
52
|
+
:sorting="secondBlockSorting"
|
|
53
|
+
@sort="onSortSecondBlock"
|
|
54
|
+
>
|
|
55
|
+
<template #content>
|
|
56
|
+
<common-browse-blocks-contents-files
|
|
57
|
+
:selected-folder-files="filesLocal"
|
|
58
|
+
:selected-file="props.selectedFile"
|
|
59
|
+
@select-file="onSelectFile"
|
|
60
|
+
/>
|
|
61
|
+
</template>
|
|
62
|
+
</common-browse-blocks-title>
|
|
63
|
+
</template>
|
|
64
|
+
<template #thirdBlock>
|
|
65
|
+
<common-browse-blocks-title
|
|
66
|
+
:width="blocksWidth[2]"
|
|
67
|
+
:title="localization.information"
|
|
68
|
+
>
|
|
69
|
+
<template v-if="info" #content>
|
|
70
|
+
<div
|
|
71
|
+
v-for="item in info"
|
|
72
|
+
:key="item.title"
|
|
73
|
+
class="info-container"
|
|
74
|
+
>
|
|
75
|
+
<common-browse-blocks-info-text
|
|
76
|
+
v-if="item.type === 'text'"
|
|
77
|
+
:title="item.title"
|
|
78
|
+
:value="item.value"
|
|
79
|
+
/>
|
|
80
|
+
<common-browse-blocks-info-size
|
|
81
|
+
v-if="item.type === 'size'"
|
|
82
|
+
:title="item.title"
|
|
83
|
+
:value="item.value"
|
|
84
|
+
/>
|
|
85
|
+
<common-browse-blocks-info-date
|
|
86
|
+
v-if="item.type === 'date'"
|
|
87
|
+
:title="item.title"
|
|
88
|
+
:value="item.value"
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
92
|
+
</common-browse-blocks-title>
|
|
93
|
+
</template>
|
|
94
|
+
</common-browse-blocks-container>
|
|
95
|
+
<div v-if="props.fileTypes" class="ptm">
|
|
96
|
+
<b>{{ localization.fileType }}:</b>
|
|
97
|
+
<select
|
|
98
|
+
v-model="selectedFileTypeLocal"
|
|
99
|
+
:data-id="`${props.testId}-select`"
|
|
100
|
+
>
|
|
101
|
+
<option
|
|
102
|
+
v-for="item in props.fileTypes"
|
|
103
|
+
:key="item.value"
|
|
104
|
+
:value="item.value"
|
|
105
|
+
>
|
|
106
|
+
{{ item.text }}
|
|
107
|
+
</option>
|
|
108
|
+
</select>
|
|
109
|
+
</div>
|
|
110
|
+
</template>
|
|
111
|
+
</atoms-modal>
|
|
112
|
+
</template>
|
|
113
|
+
|
|
114
|
+
<script setup lang="ts">
|
|
115
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
116
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
117
|
+
import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
|
|
118
|
+
import type { UI_I_FileInfo } from '~/components/common/browse/lib/models/interfaces'
|
|
119
|
+
|
|
120
|
+
const props = defineProps<{
|
|
121
|
+
show: boolean
|
|
122
|
+
nodes: any[]
|
|
123
|
+
files: any[]
|
|
124
|
+
info: UI_I_FileInfo[] | null
|
|
125
|
+
selectedFile: any | null
|
|
126
|
+
fileTypes?: UI_I_OptionItem[]
|
|
127
|
+
selectedFileType?: any
|
|
128
|
+
testId?: string
|
|
129
|
+
}>()
|
|
130
|
+
const emits = defineEmits<{
|
|
131
|
+
(
|
|
132
|
+
event: 'get-nodes',
|
|
133
|
+
value: {
|
|
134
|
+
node: any | null
|
|
135
|
+
cb: () => void
|
|
136
|
+
}
|
|
137
|
+
): void
|
|
138
|
+
(event: 'select-node', value: any): void
|
|
139
|
+
(event: 'update:selected-file', value: any): void
|
|
140
|
+
(event: 'update:selected-file-type', value: any): void
|
|
141
|
+
}>()
|
|
142
|
+
|
|
143
|
+
const { $recursion }: any = useNuxtApp()
|
|
144
|
+
|
|
145
|
+
const nodesLocal = computed<any[]>(() => {
|
|
146
|
+
if (!firstBlockSorting.value[0]) return props.nodes
|
|
147
|
+
|
|
148
|
+
const nodesCopy = useDeepCopy(props.nodes)
|
|
149
|
+
$recursion.sortByProp(nodesCopy, 'name', firstBlockSorting.value[1], 'nodes')
|
|
150
|
+
|
|
151
|
+
return nodesCopy
|
|
152
|
+
})
|
|
153
|
+
const filesLocal = computed<any[]>(() => {
|
|
154
|
+
if (!secondBlockSorting.value[0]) return props.files
|
|
155
|
+
|
|
156
|
+
const value = secondBlockSorting.value[1] ? 1 : -1
|
|
157
|
+
return [...props.files].sort((a, b) => {
|
|
158
|
+
const first = a.name.toLowerCase()
|
|
159
|
+
const second = b.name.toLowerCase()
|
|
160
|
+
return first > second ? value : first < second ? -value : 0
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
165
|
+
|
|
166
|
+
const blocksWidth = ref<UI_T_BlocksWidth>([272, 272, 256])
|
|
167
|
+
|
|
168
|
+
const onChangeWidths = (width: number, index: number): void => {
|
|
169
|
+
blocksWidth.value[index] = width
|
|
170
|
+
}
|
|
171
|
+
const onSelectFile = (file: any): void => {
|
|
172
|
+
emits('update:selected-file', file)
|
|
173
|
+
}
|
|
174
|
+
const onSelectNode = (node: any): void => {
|
|
175
|
+
emits('select-node', node)
|
|
176
|
+
}
|
|
177
|
+
const onShowNodes = (data: { node: any | null; cb: () => void }): void => {
|
|
178
|
+
emits('get-nodes', data)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const selectedFileTypeLocal = computed<any>({
|
|
182
|
+
get() {
|
|
183
|
+
return props.selectedFileType
|
|
184
|
+
},
|
|
185
|
+
set(newValue) {
|
|
186
|
+
emits('update:selected-file-type', newValue)
|
|
187
|
+
},
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
const firstBlockSorting = ref<[boolean, boolean]>([false, false])
|
|
191
|
+
const secondBlockSorting = ref<[boolean, boolean]>([false, false])
|
|
192
|
+
|
|
193
|
+
const onSortFirstBlock = (): void => {
|
|
194
|
+
firstBlockSorting.value = [true, !firstBlockSorting.value[1]]
|
|
195
|
+
}
|
|
196
|
+
const onSortSecondBlock = (): void => {
|
|
197
|
+
secondBlockSorting.value = [true, !secondBlockSorting.value[1]]
|
|
198
|
+
}
|
|
199
|
+
</script>
|
|
200
|
+
|
|
201
|
+
<style scoped lang="scss">
|
|
202
|
+
:deep(.recursion-tree) {
|
|
203
|
+
.tree-node-text-drag {
|
|
204
|
+
border-radius: 3px 0 0 3px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:deep(.modal-body) {
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
min-height: 430px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.info-container {
|
|
214
|
+
padding: 3px;
|
|
215
|
+
div {
|
|
216
|
+
line-height: 17px;
|
|
217
|
+
span {
|
|
218
|
+
font-size: 13px;
|
|
219
|
+
font-weight: 400;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ptm {
|
|
225
|
+
padding-top: 5px;
|
|
226
|
+
|
|
227
|
+
select {
|
|
228
|
+
outline: none;
|
|
229
|
+
border-color: rgb(118, 118, 118);
|
|
230
|
+
color: rgb(133, 133, 133);
|
|
231
|
+
margin-left: 5px;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.filter-content {
|
|
236
|
+
display: flex;
|
|
237
|
+
justify-content: flex-end;
|
|
238
|
+
margin-bottom: 6px;
|
|
239
|
+
}
|
|
240
|
+
</style>
|
|
@@ -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>
|