bfg-common 1.4.557 → 1.4.559

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.
@@ -1,237 +1,237 @@
1
- <template>
2
- <ui-modal
3
- v-if="props.show"
4
- :title="localization.common.selectFile"
5
- test-id="browse"
6
- size="md"
7
- show
8
- width="864px"
9
- :texts="modalButtonsText"
10
- :is-disabled-accept="!props.selectedFile"
11
- @submit="emits('submit')"
12
- @hide="emits('hide')"
13
- >
14
- <template #content>
15
- <div class="browse-container">
16
- <common-browse-blocks-container
17
- type="horizontal"
18
- :blocks-width="props.blocksWidth"
19
- @change-widths="onChangeWidths"
20
- >
21
- <template #firstBlock>
22
- <common-browse-blocks-title-new
23
- :width="props.blocksWidth[0]"
24
- :title="localization.common.datastores"
25
- :sorting="props.firstBlockSorting"
26
- @sort="emits('sort-first')"
27
- >
28
- <template #content>
29
- <div>
30
- <ui-tree
31
- :nodes="props.nodesLocalWithLoading"
32
- @toggle-node="onShowNodes"
33
- @select-node="onSelectNode"
34
- >
35
- <template #content="{ node }">
36
- <div
37
- :class="['browse-tree-item', { active: node.isActive }]"
38
- >
39
- <span :class="node.iconClassName"></span>
40
- <span class="text-ellipsis">{{ node.name }}</span>
41
- </div>
42
- </template>
43
- </ui-tree>
44
- </div>
45
- </template>
46
- </common-browse-blocks-title-new>
47
- </template>
48
- <template #secondBlock>
49
- <common-browse-blocks-title-new
50
- :width="props.blocksWidth[1]"
51
- :title="localization.common.contents"
52
- :sorting="props.secondBlockSorting"
53
- position="second-block"
54
- @sort="emits('sort-second')"
55
- >
56
- <template #content>
57
- <common-browse-blocks-contents-files
58
- :selected-folder-files="props.filesLocal"
59
- :selected-file="props.selectedFile"
60
- :files-loading="props.filesLoading"
61
- @select-file="onSelectFile"
62
- />
63
- </template>
64
- </common-browse-blocks-title-new>
65
- </template>
66
- <template #thirdBlock>
67
- <common-browse-blocks-title-new
68
- :width="props.blocksWidth[2]"
69
- :title="localization.common.information"
70
- position="third-block"
71
- >
72
- <template v-if="props.info" #content>
73
- <div class="new-view-info">
74
- <div class="new-view-info_prop">
75
- <template v-for="item in props.info" :key="item.title">
76
- <span class="new-view-info_prop-item">
77
- {{ item.title }}:
78
- </span>
79
- </template>
80
- </div>
81
- <div class="text-ellipsis">
82
- <div v-for="item in props.info" :key="item.title">
83
- <common-browse-blocks-info-text
84
- v-if="item.type === 'text'"
85
- :title="item.title"
86
- :value="item.value"
87
- />
88
- <common-browse-blocks-info-size
89
- v-if="item.type === 'size'"
90
- :title="item.title"
91
- :value="item.value"
92
- />
93
- <common-browse-blocks-info-date
94
- v-if="item.type === 'date'"
95
- :title="item.title"
96
- :value="item.value"
97
- />
98
- </div>
99
- </div>
100
- </div>
101
- </template>
102
- </common-browse-blocks-title-new>
103
- </template>
104
- </common-browse-blocks-container>
105
- <div v-if="props.fileTypes" class="ptm">
106
- <b>{{ localization.common.fileType }}:</b>
107
- <select
108
- v-model="selectedFileTypeLocal"
109
- :data-id="`${props.testId}-select`"
110
- >
111
- <option
112
- v-for="item in props.fileTypes"
113
- :key="item.value"
114
- :value="item.value"
115
- >
116
- {{ item.text }}
117
- </option>
118
- </select>
119
- </div>
120
- </div>
121
- </template>
122
- <template #footerLeftContent>
123
- <span></span>
124
- </template>
125
- </ui-modal>
126
- </template>
127
-
128
- <script setup lang="ts">
129
- import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
130
- import type { UI_I_Localization } from '~/lib/models/interfaces'
131
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
132
- import type { UI_I_FileInfo } from '~/components/common/browse/lib/models/interfaces'
133
- import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
134
-
135
- const props = defineProps<{
136
- show: boolean
137
- selectedFile: any | null
138
- blocksWidth: UI_T_BlocksWidth
139
- firstBlockSorting: [boolean, boolean]
140
- secondBlockSorting: [boolean, boolean]
141
- nodesLocalWithLoading: any[]
142
- filesLocal: any[]
143
- filesLoading: boolean
144
- selectedFileType?: any
145
- testId?: string
146
- fileTypes?: UI_I_OptionItem[]
147
- info: UI_I_FileInfo[] | null
148
- }>()
149
-
150
- const emits = defineEmits<{
151
- (event: 'change-widths', value1: number, value2: number): void
152
- (event: 'sort-first'): void
153
- (event: 'sort-second'): void
154
- (event: 'toggle-node', value: { node: any | null; cb: () => void }): void
155
- (event: 'select-node', value: any): void
156
- (event: 'select-file', value: any): void
157
- (event: 'update:selected-file-type', value: any): void
158
- (event: 'submit'): void
159
- (event: 'hide'): void
160
- }>()
161
-
162
- const localization = computed<UI_I_Localization>(() => useLocal())
163
-
164
- const modalButtonsText = computed<UI_I_ModalTexts>(() => ({
165
- button1: localization.value.common.cancel,
166
- button2: localization.value.common.select,
167
- }))
168
-
169
- const onChangeWidths = (width: number, index: number): void => {
170
- emits('change-widths', width, index)
171
- }
172
-
173
- const onShowNodes = (data: { node: any | null; cb: () => void }): void => {
174
- emits('toggle-node', data)
175
- }
176
-
177
- const onSelectNode = (node: any): void => {
178
- emits('select-node', node)
179
- }
180
-
181
- const onSelectFile = (file: any): void => {
182
- emits('select-file', file)
183
- }
184
-
185
- const selectedFileTypeLocal = computed<any>({
186
- get() {
187
- return props.selectedFileType
188
- },
189
- set(newValue) {
190
- emits('update:selected-file-type', newValue)
191
- },
192
- })
193
- </script>
194
-
195
- <style scoped lang="scss">
196
- .ptm {
197
- padding-top: 5px;
198
-
199
- select {
200
- outline: none;
201
- border-color: rgb(118, 118, 118);
202
- color: rgb(133, 133, 133);
203
- margin-left: 5px;
204
- }
205
- }
206
-
207
- .new-view-info {
208
- display: flex;
209
-
210
- &_prop {
211
- margin-right: 16px;
212
-
213
- &-item {
214
- display: block;
215
- font-size: 12px;
216
- font-weight: 500;
217
- line-height: 14.52px;
218
- color: #9da6ad;
219
- padding-bottom: 12px;
220
- }
221
- }
222
- }
223
-
224
- :deep(.node-wrapper) {
225
- border-radius: 4px;
226
- }
227
-
228
- .browse-container {
229
- padding: 0 32px;
230
- }
231
-
232
- .browse-tree-item {
233
- display: flex;
234
- align-items: center;
235
- column-gap: 8px;
236
- }
237
- </style>
1
+ <template>
2
+ <!-- v-if="props.show"-->
3
+ <ui-modal
4
+ :show="props.show"
5
+ :title="localization.common.selectFile"
6
+ test-id="browse"
7
+ size="md"
8
+ width="864px"
9
+ :texts="modalButtonsText"
10
+ :is-disabled-accept="!props.selectedFile"
11
+ @submit="emits('submit')"
12
+ @hide="emits('hide')"
13
+ >
14
+ <template #content>
15
+ <div class="browse-container">
16
+ <common-browse-blocks-container
17
+ type="horizontal"
18
+ :blocks-width="props.blocksWidth"
19
+ @change-widths="onChangeWidths"
20
+ >
21
+ <template #firstBlock>
22
+ <common-browse-blocks-title-new
23
+ :width="props.blocksWidth[0]"
24
+ :title="localization.common.datastores"
25
+ :sorting="props.firstBlockSorting"
26
+ @sort="emits('sort-first')"
27
+ >
28
+ <template #content>
29
+ <div>
30
+ <ui-tree
31
+ :nodes="props.nodesLocalWithLoading"
32
+ @toggle-node="onShowNodes"
33
+ @select-node="onSelectNode"
34
+ >
35
+ <template #content="{ node }">
36
+ <div
37
+ :class="['browse-tree-item', { active: node.isActive }]"
38
+ >
39
+ <span :class="node.iconClassName"></span>
40
+ <span class="text-ellipsis">{{ node.name }}</span>
41
+ </div>
42
+ </template>
43
+ </ui-tree>
44
+ </div>
45
+ </template>
46
+ </common-browse-blocks-title-new>
47
+ </template>
48
+ <template #secondBlock>
49
+ <common-browse-blocks-title-new
50
+ :width="props.blocksWidth[1]"
51
+ :title="localization.common.contents"
52
+ :sorting="props.secondBlockSorting"
53
+ position="second-block"
54
+ @sort="emits('sort-second')"
55
+ >
56
+ <template #content>
57
+ <common-browse-blocks-contents-files
58
+ :selected-folder-files="props.filesLocal"
59
+ :selected-file="props.selectedFile"
60
+ :files-loading="props.filesLoading"
61
+ @select-file="onSelectFile"
62
+ />
63
+ </template>
64
+ </common-browse-blocks-title-new>
65
+ </template>
66
+ <template #thirdBlock>
67
+ <common-browse-blocks-title-new
68
+ :width="props.blocksWidth[2]"
69
+ :title="localization.common.information"
70
+ position="third-block"
71
+ >
72
+ <template v-if="props.info" #content>
73
+ <div class="new-view-info">
74
+ <div class="new-view-info_prop">
75
+ <template v-for="item in props.info" :key="item.title">
76
+ <span class="new-view-info_prop-item">
77
+ {{ item.title }}:
78
+ </span>
79
+ </template>
80
+ </div>
81
+ <div class="text-ellipsis">
82
+ <div v-for="item in props.info" :key="item.title">
83
+ <common-browse-blocks-info-text
84
+ v-if="item.type === 'text'"
85
+ :title="item.title"
86
+ :value="item.value"
87
+ />
88
+ <common-browse-blocks-info-size
89
+ v-if="item.type === 'size'"
90
+ :title="item.title"
91
+ :value="item.value"
92
+ />
93
+ <common-browse-blocks-info-date
94
+ v-if="item.type === 'date'"
95
+ :title="item.title"
96
+ :value="item.value"
97
+ />
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </template>
102
+ </common-browse-blocks-title-new>
103
+ </template>
104
+ </common-browse-blocks-container>
105
+ <div v-if="props.fileTypes" class="ptm">
106
+ <b>{{ localization.common.fileType }}:</b>
107
+ <select
108
+ v-model="selectedFileTypeLocal"
109
+ :data-id="`${props.testId}-select`"
110
+ >
111
+ <option
112
+ v-for="item in props.fileTypes"
113
+ :key="item.value"
114
+ :value="item.value"
115
+ >
116
+ {{ item.text }}
117
+ </option>
118
+ </select>
119
+ </div>
120
+ </div>
121
+ </template>
122
+ <template #footerLeftContent>
123
+ <span></span>
124
+ </template>
125
+ </ui-modal>
126
+ </template>
127
+
128
+ <script setup lang="ts">
129
+ import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
130
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
131
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
132
+ import type { UI_I_FileInfo } from '~/components/common/browse/lib/models/interfaces'
133
+ import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
134
+
135
+ const props = defineProps<{
136
+ show: boolean
137
+ selectedFile: any | null
138
+ blocksWidth: UI_T_BlocksWidth
139
+ firstBlockSorting: [boolean, boolean]
140
+ secondBlockSorting: [boolean, boolean]
141
+ nodesLocalWithLoading: any[]
142
+ filesLocal: any[]
143
+ filesLoading: boolean
144
+ selectedFileType?: any
145
+ testId?: string
146
+ fileTypes?: UI_I_OptionItem[]
147
+ info: UI_I_FileInfo[] | null
148
+ }>()
149
+
150
+ const emits = defineEmits<{
151
+ (event: 'change-widths', value1: number, value2: number): void
152
+ (event: 'sort-first'): void
153
+ (event: 'sort-second'): void
154
+ (event: 'toggle-node', value: { node: any | null; cb: () => void }): void
155
+ (event: 'select-node', value: any): void
156
+ (event: 'select-file', value: any): void
157
+ (event: 'update:selected-file-type', value: any): void
158
+ (event: 'submit'): void
159
+ (event: 'hide'): void
160
+ }>()
161
+
162
+ const localization = computed<UI_I_Localization>(() => useLocal())
163
+
164
+ const modalButtonsText = computed<UI_I_ModalTexts>(() => ({
165
+ button1: localization.value.common.cancel,
166
+ button2: localization.value.common.select,
167
+ }))
168
+
169
+ const onChangeWidths = (width: number, index: number): void => {
170
+ emits('change-widths', width, index)
171
+ }
172
+
173
+ const onShowNodes = (data: { node: any | null; cb: () => void }): void => {
174
+ emits('toggle-node', data)
175
+ }
176
+
177
+ const onSelectNode = (node: any): void => {
178
+ emits('select-node', node)
179
+ }
180
+
181
+ const onSelectFile = (file: any): void => {
182
+ emits('select-file', file)
183
+ }
184
+
185
+ const selectedFileTypeLocal = computed<any>({
186
+ get() {
187
+ return props.selectedFileType
188
+ },
189
+ set(newValue) {
190
+ emits('update:selected-file-type', newValue)
191
+ },
192
+ })
193
+ </script>
194
+
195
+ <style scoped lang="scss">
196
+ .ptm {
197
+ padding-top: 5px;
198
+
199
+ select {
200
+ outline: none;
201
+ border-color: rgb(118, 118, 118);
202
+ color: rgb(133, 133, 133);
203
+ margin-left: 5px;
204
+ }
205
+ }
206
+
207
+ .new-view-info {
208
+ display: flex;
209
+
210
+ &_prop {
211
+ margin-right: 16px;
212
+
213
+ &-item {
214
+ display: block;
215
+ font-size: 12px;
216
+ font-weight: 500;
217
+ line-height: 14.52px;
218
+ color: #9da6ad;
219
+ padding-bottom: 12px;
220
+ }
221
+ }
222
+ }
223
+
224
+ :deep(.node-wrapper) {
225
+ border-radius: 4px;
226
+ }
227
+
228
+ .browse-container {
229
+ padding: 0 32px;
230
+ }
231
+
232
+ .browse-tree-item {
233
+ display: flex;
234
+ align-items: center;
235
+ column-gap: 8px;
236
+ }
237
+ </style>
@@ -1,217 +1,217 @@
1
- <template>
2
- <atoms-modal
3
- test-id="browse"
4
- width="864px"
5
- height="586px"
6
- :show="props.show"
7
- :title="localization.common.selectFile"
8
- :disabled-submit="!props.selectedFile"
9
- @submit="emits('submit')"
10
- @hide="emits('hide')"
11
- >
12
- <template #modalBody>
13
- <div class="filter-content">
14
- <atoms-the-icon
15
- width="16"
16
- class="filter-icon"
17
- name="filter"
18
- fill="#666"
19
- />
20
- <input
21
- type="text"
22
- data-id="browse-filter-input"
23
- :placeholder="localization.common.filter"
24
- />
25
- </div>
26
- <common-browse-blocks-container
27
- type="horizontal"
28
- :blocks-width="props.blocksWidth"
29
- @change-widths="onChangeWidths"
30
- >
31
- <template #firstBlock>
32
- <common-browse-blocks-title-old
33
- :width="props.blocksWidth[0]"
34
- :title="localization.common.datastores"
35
- :sorting="props.firstBlockSorting"
36
- @sort="emits('sort-first')"
37
- >
38
- <template #content>
39
- <div>
40
- <common-recursion-tree
41
- :nodes="props.nodesLocal"
42
- class="recursion-tree"
43
- @get-nodes="onShowNodes"
44
- @select-node="onSelectNode"
45
- />
46
- </div>
47
- </template>
48
- </common-browse-blocks-title-old>
49
- </template>
50
- <template #secondBlock>
51
- <common-browse-blocks-title-old
52
- :width="props.blocksWidth[1]"
53
- :title="localization.common.contents"
54
- :sorting="props.secondBlockSorting"
55
- @sort="emits('sort-second')"
56
- >
57
- <template #content>
58
- <common-browse-blocks-contents-files
59
- :selected-folder-files="props.filesLocal"
60
- :selected-file="props.selectedFile"
61
- :files-loading="props.filesLoading"
62
- @select-file="onSelectFile"
63
- />
64
- </template>
65
- </common-browse-blocks-title-old>
66
- </template>
67
- <template #thirdBlock>
68
- <common-browse-blocks-title-old
69
- :width="props.blocksWidth[2]"
70
- :title="localization.common.information"
71
- >
72
- <template v-if="props.info" #content>
73
- <div
74
- v-for="item in props.info"
75
- :key="item.title"
76
- class="info-container"
77
- >
78
- <common-browse-blocks-info-text
79
- v-if="item.type === 'text'"
80
- :title="item.title"
81
- :value="item.value"
82
- />
83
- <common-browse-blocks-info-size
84
- v-if="item.type === 'size'"
85
- :title="item.title"
86
- :value="item.value"
87
- />
88
- <common-browse-blocks-info-date
89
- v-if="item.type === 'date'"
90
- :title="item.title"
91
- :value="item.value"
92
- />
93
- </div>
94
- </template>
95
- </common-browse-blocks-title-old>
96
- </template>
97
- </common-browse-blocks-container>
98
- <div v-if="props.fileTypes" class="ptm">
99
- <b>{{ localization.common.fileType }}:</b>
100
- <select
101
- v-model="selectedFileTypeLocal"
102
- :data-id="`${props.testId}-select`"
103
- >
104
- <option
105
- v-for="item in props.fileTypes"
106
- :key="item.value"
107
- :value="item.value"
108
- >
109
- {{ item.text }}
110
- </option>
111
- </select>
112
- </div>
113
- </template>
114
- </atoms-modal>
115
- </template>
116
-
117
- <script setup lang="ts">
118
- import type { UI_I_Localization } from '~/lib/models/interfaces'
119
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
120
- import type { UI_I_FileInfo } from '~/components/common/browse/lib/models/interfaces'
121
- import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
122
-
123
- const props = defineProps<{
124
- show: boolean
125
- selectedFile: any | null
126
- blocksWidth: UI_T_BlocksWidth
127
- firstBlockSorting: [boolean, boolean]
128
- secondBlockSorting: [boolean, boolean]
129
- nodesLocal: any[]
130
- filesLocal: any[]
131
- filesLoading: boolean
132
- selectedFileType?: any
133
- testId?: string
134
- fileTypes?: UI_I_OptionItem[]
135
- info: UI_I_FileInfo[] | null
136
- }>()
137
-
138
- const emits = defineEmits<{
139
- (event: 'change-widths', value1: number, value2: number): void
140
- (event: 'sort-first'): void
141
- (event: 'sort-second'): void
142
- (event: 'toggle-node', value: { node: any | null; cb: () => void }): void
143
- (event: 'select-node', value: any): void
144
- (event: 'select-file', value: any): void
145
- (event: 'update:selected-file-type', value: any): void
146
- (event: 'submit'): void
147
- (event: 'hide'): void
148
- }>()
149
-
150
- const localization = computed<UI_I_Localization>(() => useLocal())
151
-
152
- const onChangeWidths = (width: number, index: number): void => {
153
- emits('change-widths', width, index)
154
- }
155
-
156
- const onShowNodes = (data: { node: any | null; cb: () => void }): void => {
157
- emits('toggle-node', data)
158
- }
159
-
160
- const onSelectNode = (node: any): void => {
161
- emits('select-node', node)
162
- }
163
-
164
- const onSelectFile = (file: any): void => {
165
- emits('select-file', file)
166
- }
167
-
168
- const selectedFileTypeLocal = computed<any>({
169
- get() {
170
- return props.selectedFileType
171
- },
172
- set(newValue) {
173
- emits('update:selected-file-type', newValue)
174
- },
175
- })
176
- </script>
177
-
178
- <style scoped lang="scss">
179
- :deep(.recursion-tree) {
180
- .tree-node-text-drag {
181
- border-radius: 3px 0 0 3px;
182
- }
183
- }
184
-
185
- :deep(.modal-body) {
186
- overflow: hidden;
187
- min-height: 430px;
188
- }
189
-
190
- .info-container {
191
- padding: 3px;
192
- div {
193
- line-height: 17px;
194
- span {
195
- font-size: 13px;
196
- font-weight: 400;
197
- }
198
- }
199
- }
200
-
201
- .ptm {
202
- padding-top: 5px;
203
-
204
- select {
205
- outline: none;
206
- border-color: rgb(118, 118, 118);
207
- color: rgb(133, 133, 133);
208
- margin-left: 5px;
209
- }
210
- }
211
-
212
- .filter-content {
213
- display: flex;
214
- justify-content: flex-end;
215
- margin-bottom: 6px;
216
- }
217
- </style>
1
+ <template>
2
+ <atoms-modal
3
+ :show="props.show"
4
+ test-id="browse"
5
+ width="864px"
6
+ height="586px"
7
+ :title="localization.common.selectFile"
8
+ :disabled-submit="!props.selectedFile"
9
+ @submit="emits('submit')"
10
+ @hide="emits('hide')"
11
+ >
12
+ <template #modalBody>
13
+ <div class="filter-content">
14
+ <atoms-the-icon
15
+ width="16"
16
+ class="filter-icon"
17
+ name="filter"
18
+ fill="#666"
19
+ />
20
+ <input
21
+ type="text"
22
+ data-id="browse-filter-input"
23
+ :placeholder="localization.common.filter"
24
+ />
25
+ </div>
26
+ <common-browse-blocks-container
27
+ type="horizontal"
28
+ :blocks-width="props.blocksWidth"
29
+ @change-widths="onChangeWidths"
30
+ >
31
+ <template #firstBlock>
32
+ <common-browse-blocks-title-old
33
+ :width="props.blocksWidth[0]"
34
+ :title="localization.common.datastores"
35
+ :sorting="props.firstBlockSorting"
36
+ @sort="emits('sort-first')"
37
+ >
38
+ <template #content>
39
+ <div>
40
+ <common-recursion-tree
41
+ :nodes="props.nodesLocal"
42
+ class="recursion-tree"
43
+ @get-nodes="onShowNodes"
44
+ @select-node="onSelectNode"
45
+ />
46
+ </div>
47
+ </template>
48
+ </common-browse-blocks-title-old>
49
+ </template>
50
+ <template #secondBlock>
51
+ <common-browse-blocks-title-old
52
+ :width="props.blocksWidth[1]"
53
+ :title="localization.common.contents"
54
+ :sorting="props.secondBlockSorting"
55
+ @sort="emits('sort-second')"
56
+ >
57
+ <template #content>
58
+ <common-browse-blocks-contents-files
59
+ :selected-folder-files="props.filesLocal"
60
+ :selected-file="props.selectedFile"
61
+ :files-loading="props.filesLoading"
62
+ @select-file="onSelectFile"
63
+ />
64
+ </template>
65
+ </common-browse-blocks-title-old>
66
+ </template>
67
+ <template #thirdBlock>
68
+ <common-browse-blocks-title-old
69
+ :width="props.blocksWidth[2]"
70
+ :title="localization.common.information"
71
+ >
72
+ <template v-if="props.info" #content>
73
+ <div
74
+ v-for="item in props.info"
75
+ :key="item.title"
76
+ class="info-container"
77
+ >
78
+ <common-browse-blocks-info-text
79
+ v-if="item.type === 'text'"
80
+ :title="item.title"
81
+ :value="item.value"
82
+ />
83
+ <common-browse-blocks-info-size
84
+ v-if="item.type === 'size'"
85
+ :title="item.title"
86
+ :value="item.value"
87
+ />
88
+ <common-browse-blocks-info-date
89
+ v-if="item.type === 'date'"
90
+ :title="item.title"
91
+ :value="item.value"
92
+ />
93
+ </div>
94
+ </template>
95
+ </common-browse-blocks-title-old>
96
+ </template>
97
+ </common-browse-blocks-container>
98
+ <div v-if="props.fileTypes" class="ptm">
99
+ <b>{{ localization.common.fileType }}:</b>
100
+ <select
101
+ v-model="selectedFileTypeLocal"
102
+ :data-id="`${props.testId}-select`"
103
+ >
104
+ <option
105
+ v-for="item in props.fileTypes"
106
+ :key="item.value"
107
+ :value="item.value"
108
+ >
109
+ {{ item.text }}
110
+ </option>
111
+ </select>
112
+ </div>
113
+ </template>
114
+ </atoms-modal>
115
+ </template>
116
+
117
+ <script setup lang="ts">
118
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
119
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
120
+ import type { UI_I_FileInfo } from '~/components/common/browse/lib/models/interfaces'
121
+ import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
122
+
123
+ const props = defineProps<{
124
+ show: boolean
125
+ selectedFile: any | null
126
+ blocksWidth: UI_T_BlocksWidth
127
+ firstBlockSorting: [boolean, boolean]
128
+ secondBlockSorting: [boolean, boolean]
129
+ nodesLocal: any[]
130
+ filesLocal: any[]
131
+ filesLoading: boolean
132
+ selectedFileType?: any
133
+ testId?: string
134
+ fileTypes?: UI_I_OptionItem[]
135
+ info: UI_I_FileInfo[] | null
136
+ }>()
137
+
138
+ const emits = defineEmits<{
139
+ (event: 'change-widths', value1: number, value2: number): void
140
+ (event: 'sort-first'): void
141
+ (event: 'sort-second'): void
142
+ (event: 'toggle-node', value: { node: any | null; cb: () => void }): void
143
+ (event: 'select-node', value: any): void
144
+ (event: 'select-file', value: any): void
145
+ (event: 'update:selected-file-type', value: any): void
146
+ (event: 'submit'): void
147
+ (event: 'hide'): void
148
+ }>()
149
+
150
+ const localization = computed<UI_I_Localization>(() => useLocal())
151
+
152
+ const onChangeWidths = (width: number, index: number): void => {
153
+ emits('change-widths', width, index)
154
+ }
155
+
156
+ const onShowNodes = (data: { node: any | null; cb: () => void }): void => {
157
+ emits('toggle-node', data)
158
+ }
159
+
160
+ const onSelectNode = (node: any): void => {
161
+ emits('select-node', node)
162
+ }
163
+
164
+ const onSelectFile = (file: any): void => {
165
+ emits('select-file', file)
166
+ }
167
+
168
+ const selectedFileTypeLocal = computed<any>({
169
+ get() {
170
+ return props.selectedFileType
171
+ },
172
+ set(newValue) {
173
+ emits('update:selected-file-type', newValue)
174
+ },
175
+ })
176
+ </script>
177
+
178
+ <style scoped lang="scss">
179
+ :deep(.recursion-tree) {
180
+ .tree-node-text-drag {
181
+ border-radius: 3px 0 0 3px;
182
+ }
183
+ }
184
+
185
+ :deep(.modal-body) {
186
+ overflow: hidden;
187
+ min-height: 430px;
188
+ }
189
+
190
+ .info-container {
191
+ padding: 3px;
192
+ div {
193
+ line-height: 17px;
194
+ span {
195
+ font-size: 13px;
196
+ font-weight: 400;
197
+ }
198
+ }
199
+ }
200
+
201
+ .ptm {
202
+ padding-top: 5px;
203
+
204
+ select {
205
+ outline: none;
206
+ border-color: rgb(118, 118, 118);
207
+ color: rgb(133, 133, 133);
208
+ margin-left: 5px;
209
+ }
210
+ }
211
+
212
+ .filter-content {
213
+ display: flex;
214
+ justify-content: flex-end;
215
+ margin-bottom: 6px;
216
+ }
217
+ </style>
@@ -182,7 +182,7 @@
182
182
  <Teleport to="body">
183
183
  <!-- v-if="props.isShowFileModal"-->
184
184
  <common-vm-actions-common-customize-hardware-virtual-hardware-browse-view
185
- show
185
+ :show="props.isShowFileModal"
186
186
  :nodes="props.nodes"
187
187
  :files="props.files"
188
188
  :files-loading="props.filesLoading"
@@ -134,7 +134,7 @@
134
134
  <Teleport to="body">
135
135
  <!-- v-if="props.isShowFileModal"-->
136
136
  <common-vm-actions-common-customize-hardware-virtual-hardware-browse-view
137
- show
137
+ :show="props.isShowFileModal"
138
138
  :nodes="props.nodes"
139
139
  :files="props.files"
140
140
  :files-loading="props.filesLoading"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.557",
4
+ "version": "1.4.559",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",