@usssa/component-library 1.0.0-alpha.136 → 1.0.0-alpha.138
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/README.md +1 -1
- package/package.json +1 -1
- package/src/assets/upload-illustration.svg +48 -0
- package/src/components/core/UDialogStd.vue +85 -15
- package/src/components/core/USheet.vue +15 -15
- package/src/components/core/UTable/UTable.vue +12 -2
- package/src/components/core/UTabsStd.vue +26 -2
- package/src/components/core/UUploader.vue +29 -10
- package/src/assets/files.png +0 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_4523_215)">
|
|
3
|
+
<path d="M75 150C116.421 150 150 116.421 150 75C150 33.5786 116.421 0 75 0C33.5786 0 0 33.5786 0 75C0 116.421 33.5786 150 75 150Z" fill="#12316C"/>
|
|
4
|
+
<mask id="mask0_4523_215" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="150" height="150">
|
|
5
|
+
<path d="M75 150C116.421 150 150 116.421 150 75C150 33.5786 116.421 0 75 0C33.5786 0 0 33.5786 0 75C0 116.421 33.5786 150 75 150Z" fill="#0C5DF3"/>
|
|
6
|
+
</mask>
|
|
7
|
+
<g mask="url(#mask0_4523_215)">
|
|
8
|
+
<path d="M-50.8244 24C-95.4313 24 -145.021 56.6832 -161.587 97C-178.152 137.317 -155.421 170 -110.814 170H81.9069C93.7832 141.226 72.0204 109.882 40.1655 109.882H-25.6088V152.824L-55.4051 127.059L-104.922 152.824L-74.4839 109.882L-105.032 84.1177H-56.177L-25.6144 41.1765V84.1177H50.7853C90.9569 84.1177 127.081 60.3089 142 24H-50.8244Z" fill="#1048BD"/>
|
|
9
|
+
<rect x="55.5648" y="44.3368" width="89.4842" height="119.927" rx="8" transform="rotate(15 55.5648 44.3368)" fill="white"/>
|
|
10
|
+
</g>
|
|
11
|
+
<rect x="61.6106" y="57.4174" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(15 61.6106 57.4174)" fill="#B9E0FF"/>
|
|
12
|
+
<rect x="55.8801" y="78.8034" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(15 55.8801 78.8034)" fill="#B9E0FF"/>
|
|
13
|
+
<rect x="50.1498" y="100.189" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(15 50.1498 100.189)" fill="#52B3FF"/>
|
|
14
|
+
<rect x="44.4194" y="121.575" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(15 44.4194 121.575)" fill="#B9E0FF"/>
|
|
15
|
+
<rect x="38.6891" y="142.961" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(15 38.6891 142.961)" fill="#B9E0FF"/>
|
|
16
|
+
<rect x="58.7454" y="68.1104" width="59.9637" height="5.53511" rx="2.76755" transform="rotate(15 58.7454 68.1104)" fill="#52B3FF"/>
|
|
17
|
+
<rect x="53.015" y="89.4965" width="63.6537" height="5.53511" rx="2.76755" transform="rotate(15 53.015 89.4965)" fill="#B9E0FF"/>
|
|
18
|
+
<rect x="47.2847" y="110.882" width="67.3438" height="5.53511" rx="2.76755" transform="rotate(15 47.2847 110.882)" fill="#B9E0FF"/>
|
|
19
|
+
<rect x="41.5542" y="132.268" width="28.5981" height="5.53511" rx="2.76755" transform="rotate(15 41.5542 132.268)" fill="#52B3FF"/>
|
|
20
|
+
<g filter="url(#filter0_d_4523_215)">
|
|
21
|
+
<rect x="9" y="56.7385" width="89.4842" height="119.927" rx="8" transform="rotate(-15 9 56.7385)" fill="white"/>
|
|
22
|
+
</g>
|
|
23
|
+
<rect x="20.776" y="65.0439" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(-15 20.776 65.0439)" fill="#B9E0FF"/>
|
|
24
|
+
<rect x="26.5063" y="86.4299" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(-15 26.5063 86.4299)" fill="#B9E0FF"/>
|
|
25
|
+
<rect x="32.2367" y="107.816" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(-15 32.2367 107.816)" fill="#52B3FF"/>
|
|
26
|
+
<rect x="37.967" y="129.202" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(-15 37.967 129.202)" fill="#B9E0FF"/>
|
|
27
|
+
<rect x="43.6975" y="150.588" width="71.0339" height="5.53511" rx="2.76755" transform="rotate(-15 43.6975 150.588)" fill="#B9E0FF"/>
|
|
28
|
+
<rect x="23.6411" y="75.7369" width="59.9637" height="5.53511" rx="2.76755" transform="rotate(-15 23.6411 75.7369)" fill="#52B3FF"/>
|
|
29
|
+
<rect x="29.3716" y="97.1229" width="63.6537" height="5.53511" rx="2.76755" transform="rotate(-15 29.3716 97.1229)" fill="#B9E0FF"/>
|
|
30
|
+
<rect x="35.1019" y="118.509" width="67.3438" height="5.53511" rx="2.76755" transform="rotate(-15 35.1019 118.509)" fill="#B9E0FF"/>
|
|
31
|
+
<rect x="40.8323" y="139.895" width="28.5981" height="5.53511" rx="2.76755" transform="rotate(-15 40.8323 139.895)" fill="#52B3FF"/>
|
|
32
|
+
</g>
|
|
33
|
+
<defs>
|
|
34
|
+
<filter id="filter0_d_4523_215" x="2.79602" y="27.3742" width="129.883" height="151.409" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
35
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
36
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
37
|
+
<feOffset/>
|
|
38
|
+
<feGaussianBlur stdDeviation="4"/>
|
|
39
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
40
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0.0627451 0 0 0 0 0.0666667 0 0 0 0 0.0784314 0 0 0 0.12 0"/>
|
|
41
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4523_215"/>
|
|
42
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4523_215" result="shape"/>
|
|
43
|
+
</filter>
|
|
44
|
+
<clipPath id="clip0_4523_215">
|
|
45
|
+
<rect width="150" height="150" rx="75" fill="white"/>
|
|
46
|
+
</clipPath>
|
|
47
|
+
</defs>
|
|
48
|
+
</svg>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { useQuasar } from 'quasar'
|
|
2
3
|
import { computed, onMounted, onUnmounted, ref, useSlots, watch } from 'vue'
|
|
3
4
|
import { useScreenType } from '../../composables/useScreenType'
|
|
4
5
|
import UBtnStd from './UBtnStd.vue'
|
|
@@ -15,10 +16,6 @@ const props = defineProps({
|
|
|
15
16
|
type: String,
|
|
16
17
|
default: 'dialog',
|
|
17
18
|
},
|
|
18
|
-
dialogHeight: {
|
|
19
|
-
default: 850,
|
|
20
|
-
type: Number,
|
|
21
|
-
},
|
|
22
19
|
divider: Boolean,
|
|
23
20
|
heading: {
|
|
24
21
|
type: String,
|
|
@@ -36,7 +33,7 @@ const props = defineProps({
|
|
|
36
33
|
})
|
|
37
34
|
|
|
38
35
|
// constants
|
|
39
|
-
const MAX_HEIGHT =
|
|
36
|
+
const MAX_HEIGHT = 750
|
|
40
37
|
const MIN_HEIGHT = 120
|
|
41
38
|
let isDragging = false
|
|
42
39
|
let startHeight = 0
|
|
@@ -44,8 +41,10 @@ let startY = 0
|
|
|
44
41
|
|
|
45
42
|
const $screen = useScreenType()
|
|
46
43
|
const $slots = useSlots()
|
|
44
|
+
const $q = useQuasar()
|
|
47
45
|
|
|
48
|
-
const
|
|
46
|
+
const dialogMaxHeight = ref(MAX_HEIGHT)
|
|
47
|
+
const currentDialogHeight = ref(dialogMaxHeight.value)
|
|
49
48
|
const dialogRef = ref(true)
|
|
50
49
|
const scrollableMarginHeight = ref(null)
|
|
51
50
|
|
|
@@ -57,9 +56,16 @@ const headerClass = computed(() => {
|
|
|
57
56
|
return props.divider ? 'divider' : ''
|
|
58
57
|
})
|
|
59
58
|
|
|
59
|
+
const isDesktop = computed(() => $screen.value.isDesktop)
|
|
60
60
|
const isMobile = computed(() => $screen.value.isMobile)
|
|
61
|
+
const isSmallWidthDevices = computed(() => $q.screen.width < 400)
|
|
62
|
+
const smallDevices = computed(() => {
|
|
63
|
+
return {
|
|
64
|
+
sm: $q.screen.height < 800 && $q.screen.height > 700,
|
|
65
|
+
xs: $q.screen.height < 700,
|
|
66
|
+
}
|
|
67
|
+
})
|
|
61
68
|
const isTablet = computed(() => $screen.value.isTablet)
|
|
62
|
-
const isDesktop = computed(() => $screen.value.isDesktop)
|
|
63
69
|
|
|
64
70
|
const getDialogHeaderheight = () => {
|
|
65
71
|
setTimeout(() => {
|
|
@@ -109,9 +115,12 @@ const onDragMove = (event) => {
|
|
|
109
115
|
// limiting dialog height to MAX HEIGHT
|
|
110
116
|
currentDialogHeight.value = Math.min(
|
|
111
117
|
Math.max(MIN_HEIGHT, newHeight),
|
|
112
|
-
|
|
118
|
+
dialogMaxHeight.value
|
|
113
119
|
)
|
|
114
|
-
if (
|
|
120
|
+
if (
|
|
121
|
+
Math.min(Math.max(MIN_HEIGHT, newHeight), dialogMaxHeight.value) <=
|
|
122
|
+
MIN_HEIGHT
|
|
123
|
+
) {
|
|
115
124
|
setTimeout(() => {
|
|
116
125
|
dialogRef.value.hide() // if user is dragging then it should close from here
|
|
117
126
|
}, 200)
|
|
@@ -148,12 +157,32 @@ onMounted(() => {
|
|
|
148
157
|
getDialogHeaderheight()
|
|
149
158
|
})
|
|
150
159
|
|
|
160
|
+
watch(
|
|
161
|
+
smallDevices,
|
|
162
|
+
(newData) => {
|
|
163
|
+
getDialogHeaderheight()
|
|
164
|
+
if (newData.xs || newData.sm) {
|
|
165
|
+
dialogMaxHeight.value = newData.xs ? 550 : 580
|
|
166
|
+
currentDialogHeight.value = newData.xs ? 550 : 580
|
|
167
|
+
} else {
|
|
168
|
+
dialogMaxHeight.value = MAX_HEIGHT
|
|
169
|
+
currentDialogHeight.value = MAX_HEIGHT
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{ immediate: true }
|
|
173
|
+
)
|
|
174
|
+
|
|
151
175
|
watch(
|
|
152
176
|
model,
|
|
153
177
|
(newData) => {
|
|
154
178
|
getDialogHeaderheight()
|
|
155
179
|
if (!newData) {
|
|
156
|
-
currentDialogHeight.value =
|
|
180
|
+
currentDialogHeight.value =
|
|
181
|
+
smallDevices.value.xs || smallDevices.value.sm
|
|
182
|
+
? smallDevices.value.xs
|
|
183
|
+
? 550
|
|
184
|
+
: 580
|
|
185
|
+
: 750
|
|
157
186
|
}
|
|
158
187
|
},
|
|
159
188
|
{ immediate: true }
|
|
@@ -266,12 +295,14 @@ watch(
|
|
|
266
295
|
v-if="showActionButtons"
|
|
267
296
|
:class="`q-pa-ba action-wrapper${
|
|
268
297
|
isMobile ? ' fixed-action-wrapper' : ''
|
|
269
|
-
}`"
|
|
298
|
+
}${isTablet && hasAllActionSlots() ? ' tablet-full-btn-actions' : ''}`"
|
|
299
|
+
id="dialog-action-wrapper"
|
|
270
300
|
:style="{
|
|
271
301
|
gap: hasSlots(),
|
|
272
|
-
flexWrap:
|
|
302
|
+
flexWrap:
|
|
303
|
+
(isMobile || isTablet) && hasAllActionSlots() ? 'wrap' : 'no-wrap',
|
|
273
304
|
justifyContent:
|
|
274
|
-
(isMobile && hasAllActionSlots()) || hasSlots()
|
|
305
|
+
((isMobile || !isTablet) && hasAllActionSlots()) || hasSlots()
|
|
275
306
|
? 'space-between'
|
|
276
307
|
: 'flex-end',
|
|
277
308
|
}"
|
|
@@ -280,17 +311,40 @@ watch(
|
|
|
280
311
|
v-if="
|
|
281
312
|
!!$slots['action_secondary_one'] || !!$slots['action_secondary_two']
|
|
282
313
|
"
|
|
283
|
-
:class="`action-buttons${
|
|
314
|
+
:class="`action-buttons${
|
|
315
|
+
isMobile || isTablet ? ' full-width-actions' : ''
|
|
316
|
+
}${
|
|
317
|
+
!isDesktop
|
|
318
|
+
? isMobile && !isSmallWidthDevices
|
|
319
|
+
? ' justify-center mobile-btn-actions'
|
|
320
|
+
: !!$slots['action_secondary_one'] ||
|
|
321
|
+
!!$slots['action_secondary_two']
|
|
322
|
+
? ' justify-start small-device-class'
|
|
323
|
+
: ' justify-end'
|
|
324
|
+
: ''
|
|
325
|
+
}`"
|
|
284
326
|
align="left"
|
|
285
327
|
>
|
|
286
328
|
<slot name="action_secondary_one" />
|
|
287
329
|
<slot name="action_secondary_two" />
|
|
288
330
|
</q-card-actions>
|
|
331
|
+
|
|
289
332
|
<q-card-actions
|
|
290
333
|
v-if="
|
|
291
334
|
!!$slots['action_primary_one'] || !!$slots['action_primary_two']
|
|
292
335
|
"
|
|
293
|
-
:class="`action-buttons${
|
|
336
|
+
:class="`action-buttons${
|
|
337
|
+
isMobile || isTablet ? ' full-width-actions' : ''
|
|
338
|
+
}${
|
|
339
|
+
!isDesktop
|
|
340
|
+
? isMobile && !isSmallWidthDevices
|
|
341
|
+
? ' justify-center mobile-btn-actions'
|
|
342
|
+
: !!$slots['action_primary_one'] ||
|
|
343
|
+
!!$slots['action_primary_two']
|
|
344
|
+
? ' justify-start small-device-class'
|
|
345
|
+
: ' justify-end'
|
|
346
|
+
: ''
|
|
347
|
+
}`"
|
|
294
348
|
align="right"
|
|
295
349
|
>
|
|
296
350
|
<slot name="action_primary_one" />
|
|
@@ -393,6 +447,7 @@ watch(
|
|
|
393
447
|
display: flex
|
|
394
448
|
align-items: center
|
|
395
449
|
gap: $xs
|
|
450
|
+
flex-wrap: nowrap
|
|
396
451
|
.q-btn
|
|
397
452
|
margin: 0 !important
|
|
398
453
|
|
|
@@ -434,6 +489,11 @@ watch(
|
|
|
434
489
|
|
|
435
490
|
.full-width-actions
|
|
436
491
|
width: 100%
|
|
492
|
+
flex-wrap: nowrap
|
|
493
|
+
|
|
494
|
+
.mobile-btn-actions, .tablet-full-btn-actions
|
|
495
|
+
.q-btn
|
|
496
|
+
width: 100%
|
|
437
497
|
|
|
438
498
|
.dialog-full .no-heading-section
|
|
439
499
|
padding-top: 0px !important
|
|
@@ -465,4 +525,14 @@ watch(
|
|
|
465
525
|
|
|
466
526
|
.scrollable::-webkit-scrollbar
|
|
467
527
|
z-index: 9999
|
|
528
|
+
|
|
529
|
+
.small-device-class
|
|
530
|
+
justify-content: center
|
|
531
|
+
.q-btn
|
|
532
|
+
width: 100%
|
|
533
|
+
.button-label
|
|
534
|
+
white-space: nowrap
|
|
535
|
+
width: 9.5rem
|
|
536
|
+
overflow: hidden
|
|
537
|
+
text-overflow: ellipsis
|
|
468
538
|
</style>
|
|
@@ -193,10 +193,8 @@ watch(
|
|
|
193
193
|
<div class="drag-handle" />
|
|
194
194
|
</div>
|
|
195
195
|
|
|
196
|
-
<q-card-section
|
|
197
|
-
|
|
198
|
-
>
|
|
199
|
-
<div class="row items-start justify-between no-wrap">
|
|
196
|
+
<q-card-section class="column q-pt-none q-pb-xs q-px-ba q-mt-ba">
|
|
197
|
+
<div class="row items-start justify-between no-wrap">
|
|
200
198
|
<div class="heading-wrapper row">
|
|
201
199
|
<div
|
|
202
200
|
class="flex items-center justify-center dialog-heading-container"
|
|
@@ -243,19 +241,21 @@ watch(
|
|
|
243
241
|
tabindex="-1"
|
|
244
242
|
/>
|
|
245
243
|
</UBtnStd>
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
<q-card-section
|
|
251
|
-
class="main-content-dialog q-px-ba"
|
|
252
|
-
tabindex="-1"
|
|
253
|
-
>
|
|
244
|
+
</div>
|
|
245
|
+
<slot name="header"></slot>
|
|
246
|
+
</q-card-section>
|
|
247
|
+
<q-card-section class="main-content-dialog q-px-ba" tabindex="-1">
|
|
254
248
|
<slot name="content"></slot>
|
|
255
249
|
</q-card-section>
|
|
256
250
|
</q-card>
|
|
257
|
-
<div
|
|
258
|
-
|
|
251
|
+
<div
|
|
252
|
+
v-if="showActionButtons && dialog.height > 70"
|
|
253
|
+
class="sheet-action-wrapper"
|
|
254
|
+
>
|
|
255
|
+
<q-card-actions
|
|
256
|
+
class="sheet-action-buttons q-px-sm q-py-ba"
|
|
257
|
+
align="center"
|
|
258
|
+
>
|
|
259
259
|
<slot name="action_primary_one"></slot>
|
|
260
260
|
<slot name="action_primary_two"></slot>
|
|
261
261
|
</q-card-actions>
|
|
@@ -307,7 +307,7 @@ watch(
|
|
|
307
307
|
.outer-wrapper
|
|
308
308
|
overflow: auto
|
|
309
309
|
|
|
310
|
-
.action-buttons
|
|
310
|
+
.sheet-action-buttons
|
|
311
311
|
display: flex
|
|
312
312
|
align-items: center
|
|
313
313
|
gap: $xs
|
|
@@ -170,6 +170,11 @@ const handleOpenMobileMoreActions = (id) => {
|
|
|
170
170
|
moreActionsDialogs.value = dialogObjMap
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
// checking for tooltip is content is visible
|
|
174
|
+
const isContentVisible = (field, id, type) => {
|
|
175
|
+
return document.getElementById(`long-${type}-${field}-${id}`)
|
|
176
|
+
}
|
|
177
|
+
|
|
173
178
|
watch(
|
|
174
179
|
moreActionDialogData,
|
|
175
180
|
(newData) => {
|
|
@@ -335,7 +340,11 @@ watch(
|
|
|
335
340
|
{{ col.value }}
|
|
336
341
|
</span>
|
|
337
342
|
<UTooltip
|
|
338
|
-
v-if="
|
|
343
|
+
v-if="
|
|
344
|
+
col.value &&
|
|
345
|
+
col.value.length > 12 &&
|
|
346
|
+
isContentVisible(col.field, props.row.id, 'content')
|
|
347
|
+
"
|
|
339
348
|
anchor="bottom middle"
|
|
340
349
|
:description="col.value"
|
|
341
350
|
:offset="[10, 40]"
|
|
@@ -352,7 +361,8 @@ watch(
|
|
|
352
361
|
<UTooltip
|
|
353
362
|
v-if="
|
|
354
363
|
props.row[col.captionKey] &&
|
|
355
|
-
props.row[col.captionKey].length > 12
|
|
364
|
+
props.row[col.captionKey].length > 12 &&
|
|
365
|
+
isContentVisible(col.field, props.row.id, 'caption')
|
|
356
366
|
"
|
|
357
367
|
anchor="bottom middle"
|
|
358
368
|
:description="props.row[col.captionKey]"
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { useScreenType } from '../../composables/useScreenType'
|
|
4
|
+
|
|
2
5
|
const selectedTab = defineModel({
|
|
3
6
|
required: true,
|
|
4
7
|
type: [Boolean, String, Number],
|
|
@@ -15,12 +18,20 @@ const props = defineProps({
|
|
|
15
18
|
required: true,
|
|
16
19
|
},
|
|
17
20
|
})
|
|
21
|
+
|
|
22
|
+
const $screen = useScreenType()
|
|
23
|
+
|
|
24
|
+
const isMobileOrTablet = computed(
|
|
25
|
+
() => $screen.value.isMobile || $screen.value.isTablet
|
|
26
|
+
)
|
|
18
27
|
</script>
|
|
19
28
|
|
|
20
29
|
<template>
|
|
21
30
|
<q-tabs
|
|
22
31
|
v-model="selectedTab"
|
|
23
|
-
class="u-tabs-std text-caption-md
|
|
32
|
+
:class="`u-tabs-std text-caption-md${
|
|
33
|
+
isMobileOrTablet ? ' mobile-tabs remove-actions' : ''
|
|
34
|
+
}`"
|
|
24
35
|
active-color="primary"
|
|
25
36
|
:align="align"
|
|
26
37
|
:dataTestId="dataTestId"
|
|
@@ -88,6 +99,8 @@ const props = defineProps({
|
|
|
88
99
|
.u-tabs-std
|
|
89
100
|
color: $dark
|
|
90
101
|
font-weight: 500
|
|
102
|
+
.q-tabs__content
|
|
103
|
+
overflow: auto
|
|
91
104
|
|
|
92
105
|
& .q-tab__content
|
|
93
106
|
& .q-icon
|
|
@@ -106,11 +119,22 @@ const props = defineProps({
|
|
|
106
119
|
|
|
107
120
|
.q-tab--inactive, .q-tab--active
|
|
108
121
|
min-width: 5.5rem
|
|
122
|
+
height: $lg
|
|
109
123
|
|
|
110
124
|
.q-tab--inactive
|
|
111
125
|
border-bottom: 2px solid $neutral-3
|
|
112
126
|
opacity: 1
|
|
113
127
|
|
|
114
128
|
.q-tab--inactive:hover
|
|
115
|
-
color:
|
|
129
|
+
color: inherit
|
|
130
|
+
|
|
131
|
+
.mobile-tabs
|
|
132
|
+
.q-tab--inactive, .q-tab--active
|
|
133
|
+
min-width: auto !important
|
|
134
|
+
|
|
135
|
+
.remove-actions
|
|
136
|
+
.q-tabs__arrow
|
|
137
|
+
display: none
|
|
138
|
+
padding-left: 0px !important
|
|
139
|
+
padding-right: 0px !important
|
|
116
140
|
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { useQuasar } from 'quasar'
|
|
3
|
+
import { computed, ref } from 'vue'
|
|
3
4
|
import { fixStringLength, formatDate, getFileCategory } from '../../utils/data'
|
|
4
5
|
import UBtnIcon from './UBtnIcon.vue'
|
|
5
6
|
import UBtnStd from './UBtnStd.vue'
|
|
@@ -74,10 +75,14 @@ const props = defineProps({
|
|
|
74
75
|
},
|
|
75
76
|
})
|
|
76
77
|
|
|
78
|
+
const $q = useQuasar()
|
|
79
|
+
|
|
77
80
|
const fileDisplayName = ref([])
|
|
78
81
|
const isEditing = ref([])
|
|
79
82
|
const uploaderRef = ref(null)
|
|
80
83
|
|
|
84
|
+
const isSmallWidthDevices = computed(() => $q.screen.width < 350)
|
|
85
|
+
|
|
81
86
|
const cancelEdit = (payload) => {
|
|
82
87
|
const { index, file } = payload
|
|
83
88
|
fileDisplayName.value[file['__key']] = file.displayName
|
|
@@ -144,14 +149,17 @@ defineExpose({ upload })
|
|
|
144
149
|
<template v-slot:header="scope">
|
|
145
150
|
<div v-if="scope.canAddFiles" class="q-py-md q-px-xl bg-neutral-2">
|
|
146
151
|
<div class="text-center">
|
|
147
|
-
<img
|
|
148
|
-
|
|
152
|
+
<img
|
|
153
|
+
alt="Upload Files"
|
|
154
|
+
src="../../assets/upload-illustration.svg"
|
|
155
|
+
/>
|
|
156
|
+
<div class="text-body-md q-mt-ba" dataTestId="description">
|
|
149
157
|
{{ description }}
|
|
150
158
|
</div>
|
|
151
159
|
</div>
|
|
152
160
|
<div class="list-items row">
|
|
153
161
|
<UBtnStd
|
|
154
|
-
class="q-mt-md
|
|
162
|
+
class="q-mt-md"
|
|
155
163
|
color="primary"
|
|
156
164
|
dataTestId="select-file-btn"
|
|
157
165
|
:full-width="true"
|
|
@@ -182,12 +190,12 @@ defineExpose({ upload })
|
|
|
182
190
|
<template v-slot:list="scope">
|
|
183
191
|
<div
|
|
184
192
|
v-if="!listExternal && scope.files"
|
|
185
|
-
class="list-container
|
|
193
|
+
class="list-container"
|
|
186
194
|
dataTestId="file-list"
|
|
187
195
|
>
|
|
188
196
|
<q-card
|
|
189
197
|
v-for="(file, index) in scope.files"
|
|
190
|
-
:class="`uploader-list
|
|
198
|
+
:class="`uploader-list ${
|
|
191
199
|
file.__status == 'uploading'
|
|
192
200
|
? 'q-py-xs q-px-sm'
|
|
193
201
|
: 'uploaded-container'
|
|
@@ -426,6 +434,9 @@ defineExpose({ upload })
|
|
|
426
434
|
/>
|
|
427
435
|
|
|
428
436
|
<UBtnStd
|
|
437
|
+
:class="`update-file-action${
|
|
438
|
+
isSmallWidthDevices ? ' uploader-small-device-class' : ''
|
|
439
|
+
}`"
|
|
429
440
|
color="primary"
|
|
430
441
|
:full-width="true"
|
|
431
442
|
label="Update file name"
|
|
@@ -455,6 +466,8 @@ defineExpose({ upload })
|
|
|
455
466
|
display: grid
|
|
456
467
|
place-items: center
|
|
457
468
|
gap: $xxs
|
|
469
|
+
.q-card__section img
|
|
470
|
+
width: 100%
|
|
458
471
|
.q-uploader
|
|
459
472
|
width: auto !important
|
|
460
473
|
max-height: unset !important
|
|
@@ -462,6 +475,7 @@ defineExpose({ upload })
|
|
|
462
475
|
background: $neutral-2
|
|
463
476
|
border-radius: $xs
|
|
464
477
|
box-shadow: 0px 0px 2px 0px rgba(16, 17, 20, 0.04)
|
|
478
|
+
width: 100%
|
|
465
479
|
.uploaded-container
|
|
466
480
|
padding: $sm
|
|
467
481
|
.list-items
|
|
@@ -472,10 +486,6 @@ defineExpose({ upload })
|
|
|
472
486
|
gap:$ba
|
|
473
487
|
.update-button
|
|
474
488
|
gap:$sm
|
|
475
|
-
.list-size-sm
|
|
476
|
-
width: 21.75rem
|
|
477
|
-
.list-size-md
|
|
478
|
-
width: 100%
|
|
479
489
|
.title
|
|
480
490
|
color: $dark
|
|
481
491
|
.info
|
|
@@ -505,4 +515,13 @@ defineExpose({ upload })
|
|
|
505
515
|
border-radius:$sm
|
|
506
516
|
.u-uploader
|
|
507
517
|
display: flex
|
|
518
|
+
.update-file-action
|
|
519
|
+
padding-left: $xs !important
|
|
520
|
+
padding-right: $xs !important
|
|
521
|
+
.uploader-small-device-class
|
|
522
|
+
.button-label
|
|
523
|
+
white-space: nowrap
|
|
524
|
+
width: 6.5rem
|
|
525
|
+
overflow: hidden
|
|
526
|
+
text-overflow: ellipsis
|
|
508
527
|
</style>
|
package/src/assets/files.png
DELETED
|
Binary file
|