@bagelink/vue 0.0.821 → 0.0.823
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/dist/components/TableSchema.vue.d.ts +1 -0
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/layout/Skeleton.vue.d.ts +27 -0
- package/dist/components/layout/Skeleton.vue.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/index.cjs +222 -173
- package/dist/index.mjs +222 -173
- package/dist/style.css +70 -46
- package/package.json +1 -1
- package/src/components/TableSchema.vue +17 -2
- package/src/components/layout/Skeleton.vue +52 -0
- package/src/components/layout/index.ts +1 -0
package/dist/style.css
CHANGED
|
@@ -1814,6 +1814,30 @@ p {
|
|
|
1814
1814
|
transform: translateX(-20px);
|
|
1815
1815
|
}
|
|
1816
1816
|
|
|
1817
|
+
.skeleton-wrap[data-v-a06bec19] {
|
|
1818
|
+
--skeleton-radius: 0.25rem;
|
|
1819
|
+
--skeleton-bg: #f0f0f0;
|
|
1820
|
+
--skeleton-margin: 1rem;
|
|
1821
|
+
margin-bottom: var(--skeleton-margin);
|
|
1822
|
+
}
|
|
1823
|
+
.skeleton[data-v-a06bec19] {
|
|
1824
|
+
animation: skeleton-a06bec19 2s infinite;
|
|
1825
|
+
background-color: var(--skeleton-bg);
|
|
1826
|
+
border-radius: var(--bg-card-radius);
|
|
1827
|
+
margin-bottom: 0.25em;
|
|
1828
|
+
}
|
|
1829
|
+
@keyframes skeleton-a06bec19 {
|
|
1830
|
+
0% {
|
|
1831
|
+
opacity: 0.5;
|
|
1832
|
+
}
|
|
1833
|
+
50% {
|
|
1834
|
+
opacity: 1;
|
|
1835
|
+
}
|
|
1836
|
+
100% {
|
|
1837
|
+
opacity: 0.5;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1817
1841
|
.tab[data-v-0a54cdeb] {
|
|
1818
1842
|
text-transform: capitalize;
|
|
1819
1843
|
}
|
|
@@ -3211,22 +3235,22 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
3211
3235
|
background: transparent;
|
|
3212
3236
|
}
|
|
3213
3237
|
|
|
3214
|
-
.table-list-wrap[data-v-
|
|
3238
|
+
.table-list-wrap[data-v-54f3c477] {
|
|
3215
3239
|
min-height: 150px;
|
|
3216
3240
|
}
|
|
3217
|
-
.selected[data-v-
|
|
3241
|
+
.selected[data-v-54f3c477] {
|
|
3218
3242
|
background: var(--bgl-primary-tint);
|
|
3219
3243
|
}
|
|
3220
|
-
tbody tr.selected[data-v-
|
|
3244
|
+
tbody tr.selected[data-v-54f3c477]:hover {
|
|
3221
3245
|
background: var(--bgl-primary-light);
|
|
3222
3246
|
}
|
|
3223
|
-
.loading-table[data-v-
|
|
3247
|
+
.loading-table[data-v-54f3c477] {
|
|
3224
3248
|
position: relative;
|
|
3225
3249
|
}
|
|
3226
|
-
.inset[data-v-
|
|
3250
|
+
.inset[data-v-54f3c477] {
|
|
3227
3251
|
inset: 0;
|
|
3228
3252
|
}
|
|
3229
|
-
.loading-table-animation[data-v-
|
|
3253
|
+
.loading-table-animation[data-v-54f3c477] {
|
|
3230
3254
|
--size: 60px;
|
|
3231
3255
|
top: 30vh;
|
|
3232
3256
|
inset-inline-start: calc(50% - var(--size));
|
|
@@ -3234,9 +3258,9 @@ tbody tr.selected[data-v-692391a3]:hover {
|
|
|
3234
3258
|
border-top: 4px solid var(--bgl-primary);
|
|
3235
3259
|
width: var(--size);
|
|
3236
3260
|
height: var(--size);
|
|
3237
|
-
animation: loading-table-
|
|
3261
|
+
animation: loading-table-54f3c477 1s linear infinite;
|
|
3238
3262
|
}
|
|
3239
|
-
@keyframes loading-table-
|
|
3263
|
+
@keyframes loading-table-54f3c477 {
|
|
3240
3264
|
0% {
|
|
3241
3265
|
transform: translate(-50%, -50%) rotate(0deg);
|
|
3242
3266
|
}
|
|
@@ -3244,52 +3268,52 @@ tbody tr.selected[data-v-692391a3]:hover {
|
|
|
3244
3268
|
transform: translate(-50%, -50%) rotate(360deg);
|
|
3245
3269
|
}
|
|
3246
3270
|
}
|
|
3247
|
-
.list-arrows[data-v-
|
|
3271
|
+
.list-arrows[data-v-54f3c477] {
|
|
3248
3272
|
opacity: 0;
|
|
3249
3273
|
}
|
|
3250
|
-
.list-arrows .bgl_icon-font[data-v-
|
|
3274
|
+
.list-arrows .bgl_icon-font[data-v-54f3c477] {
|
|
3251
3275
|
transition: all ease-in-out 0.2s;
|
|
3252
3276
|
}
|
|
3253
|
-
.list-arrows.sorted[data-v-
|
|
3277
|
+
.list-arrows.sorted[data-v-54f3c477] {
|
|
3254
3278
|
opacity: 1;
|
|
3255
3279
|
}
|
|
3256
|
-
.col img[data-v-
|
|
3280
|
+
.col img[data-v-54f3c477] {
|
|
3257
3281
|
height: 35px;
|
|
3258
3282
|
margin-top: -14px;
|
|
3259
3283
|
margin-bottom: -14px;
|
|
3260
3284
|
border-radius: 5px;
|
|
3261
3285
|
}
|
|
3262
|
-
.list-arrows.sorted .desc[data-v-
|
|
3286
|
+
.list-arrows.sorted .desc[data-v-54f3c477] {
|
|
3263
3287
|
transform: rotate(180deg);
|
|
3264
3288
|
display: inline-block;
|
|
3265
3289
|
}
|
|
3266
|
-
table[data-v-
|
|
3290
|
+
table[data-v-54f3c477] {
|
|
3267
3291
|
border-collapse: separate;
|
|
3268
3292
|
border-spacing: 0 15px;
|
|
3269
3293
|
border-collapse: collapse;
|
|
3270
3294
|
width: 100%;
|
|
3271
3295
|
}
|
|
3272
|
-
th[data-v-
|
|
3296
|
+
th[data-v-54f3c477] {
|
|
3273
3297
|
font-size: 0.8rem;
|
|
3274
3298
|
color: var(--bgl-black-tint);
|
|
3275
3299
|
position: sticky;
|
|
3276
3300
|
top: 0;
|
|
3277
3301
|
z-index: 2;
|
|
3278
3302
|
background: var(--bgl-box-bg);
|
|
3279
|
-
height: var(--
|
|
3303
|
+
height: var(--ced4aeb8);
|
|
3280
3304
|
vertical-align: bottom;
|
|
3281
3305
|
font-weight: 400;
|
|
3282
3306
|
text-align: start;
|
|
3283
3307
|
}
|
|
3284
|
-
.embedded-field[data-v-
|
|
3308
|
+
.embedded-field[data-v-54f3c477] {
|
|
3285
3309
|
margin-bottom: -0.2rem;
|
|
3286
3310
|
margin-top: -0.2rem;
|
|
3287
3311
|
}
|
|
3288
|
-
.row[data-v-
|
|
3312
|
+
.row[data-v-54f3c477] {
|
|
3289
3313
|
border-bottom: 1px solid var(--border-color);
|
|
3290
3314
|
cursor: pointer;
|
|
3291
3315
|
}
|
|
3292
|
-
.row.first-row[data-v-
|
|
3316
|
+
.row.first-row[data-v-54f3c477] {
|
|
3293
3317
|
font-size: 0.8rem;
|
|
3294
3318
|
color: var(--bgl-black-tint);
|
|
3295
3319
|
position: sticky;
|
|
@@ -3298,7 +3322,7 @@ th[data-v-692391a3] {
|
|
|
3298
3322
|
background: var(--bgl-box-bg);
|
|
3299
3323
|
vertical-align: bottom;
|
|
3300
3324
|
}
|
|
3301
|
-
.row.first-row[data-v-
|
|
3325
|
+
.row.first-row[data-v-54f3c477]::after {
|
|
3302
3326
|
content: '';
|
|
3303
3327
|
border-bottom: 1px solid var(--border-color);
|
|
3304
3328
|
position: absolute;
|
|
@@ -3306,30 +3330,30 @@ th[data-v-692391a3] {
|
|
|
3306
3330
|
right: 0;
|
|
3307
3331
|
bottom: -1px;
|
|
3308
3332
|
}
|
|
3309
|
-
.first-row .col[data-v-
|
|
3333
|
+
.first-row .col[data-v-54f3c477] {
|
|
3310
3334
|
cursor: pointer;
|
|
3311
3335
|
background: var(--bgl-box-bg);
|
|
3312
3336
|
}
|
|
3313
|
-
.col[data-v-
|
|
3337
|
+
.col[data-v-54f3c477] {
|
|
3314
3338
|
white-space: nowrap;
|
|
3315
3339
|
padding: 0.75rem 1rem;
|
|
3316
3340
|
transition: var(--bgl-transition);
|
|
3317
3341
|
line-height: 1;
|
|
3318
3342
|
align-items: center;
|
|
3319
3343
|
}
|
|
3320
|
-
.col[data-v-
|
|
3344
|
+
.col[data-v-54f3c477]:has(.bagel-input) {
|
|
3321
3345
|
padding: 0rem 0.25rem;
|
|
3322
3346
|
}
|
|
3323
|
-
.col > div[data-v-
|
|
3347
|
+
.col > div[data-v-54f3c477] {
|
|
3324
3348
|
display: flex;
|
|
3325
3349
|
gap: 0.5rem;
|
|
3326
3350
|
}
|
|
3327
|
-
.max-col-width[data-v-
|
|
3351
|
+
.max-col-width[data-v-54f3c477] {
|
|
3328
3352
|
max-width: 30vw;
|
|
3329
3353
|
overflow: hidden;
|
|
3330
3354
|
text-overflow: ellipsis;
|
|
3331
3355
|
}
|
|
3332
|
-
.col.check .bgl_icon-font[data-v-
|
|
3356
|
+
.col.check .bgl_icon-font[data-v-54f3c477] {
|
|
3333
3357
|
border-radius: 100%;
|
|
3334
3358
|
background: var(--bgl-blue-20);
|
|
3335
3359
|
color: var(--bgl-primary);
|
|
@@ -3340,35 +3364,35 @@ th[data-v-692391a3] {
|
|
|
3340
3364
|
justify-content: center;
|
|
3341
3365
|
margin-top: -2px;
|
|
3342
3366
|
}
|
|
3343
|
-
.rows[data-v-
|
|
3367
|
+
.rows[data-v-54f3c477] {
|
|
3344
3368
|
font-size: 0.88em;
|
|
3345
3369
|
}
|
|
3346
|
-
.table-list[data-v-
|
|
3370
|
+
.table-list[data-v-54f3c477] {
|
|
3347
3371
|
height: 100%;
|
|
3348
3372
|
position: relative;
|
|
3349
3373
|
padding-left: 0 !important;
|
|
3350
3374
|
padding-right: 0 !important;
|
|
3351
3375
|
overflow: auto;
|
|
3352
3376
|
}
|
|
3353
|
-
.BagelTable .table-list[data-v-
|
|
3377
|
+
.BagelTable .table-list[data-v-54f3c477] {
|
|
3354
3378
|
overflow: unset;
|
|
3355
3379
|
}
|
|
3356
|
-
.row-item[data-v-
|
|
3357
|
-
height: var(--
|
|
3380
|
+
.row-item[data-v-54f3c477] {
|
|
3381
|
+
height: var(--ced4aeb8);
|
|
3358
3382
|
transition: all 200ms ease;
|
|
3359
3383
|
}
|
|
3360
|
-
.row-item[data-v-
|
|
3384
|
+
.row-item[data-v-54f3c477]:hover {
|
|
3361
3385
|
background: var(--bgl-gray-light);
|
|
3362
3386
|
}
|
|
3363
|
-
.row-item input[type='checkbox'][data-v-
|
|
3387
|
+
.row-item input[type='checkbox'][data-v-54f3c477] {
|
|
3364
3388
|
margin-top: 0.45rem !important;
|
|
3365
3389
|
accent-color: var(--bgl-accent-color);
|
|
3366
3390
|
}
|
|
3367
|
-
.infinite-wrapper[data-v-
|
|
3391
|
+
.infinite-wrapper[data-v-54f3c477] {
|
|
3368
3392
|
overflow-y: auto;
|
|
3369
3393
|
width: 100%;
|
|
3370
3394
|
}
|
|
3371
|
-
input[type='checkbox'][data-v-
|
|
3395
|
+
input[type='checkbox'][data-v-54f3c477] {
|
|
3372
3396
|
margin-top: 0.3rem !important;
|
|
3373
3397
|
accent-color: var(--bgl-accent-color);
|
|
3374
3398
|
transform: scale(1.2);
|
|
@@ -3380,7 +3404,7 @@ input[type='checkbox'][data-v-692391a3] {
|
|
|
3380
3404
|
height: 0.85rem;
|
|
3381
3405
|
width: 0.85rem;
|
|
3382
3406
|
}
|
|
3383
|
-
input[type='checkbox'][data-v-
|
|
3407
|
+
input[type='checkbox'][data-v-54f3c477]::before {
|
|
3384
3408
|
content: '';
|
|
3385
3409
|
height: 0.85rem;
|
|
3386
3410
|
width: 0.85rem;
|
|
@@ -3393,18 +3417,18 @@ input[type='checkbox'][data-v-692391a3]::before {
|
|
|
3393
3417
|
transform: scale(1);
|
|
3394
3418
|
position: absolute;
|
|
3395
3419
|
}
|
|
3396
|
-
input[type='checkbox'][data-v-
|
|
3420
|
+
input[type='checkbox'][data-v-54f3c477]:hover::before {
|
|
3397
3421
|
opacity: 0.2;
|
|
3398
3422
|
transform: scale(2);
|
|
3399
3423
|
}
|
|
3400
|
-
[lang='he'] [dir='ltr'][data-v-
|
|
3424
|
+
[lang='he'] [dir='ltr'][data-v-54f3c477] {
|
|
3401
3425
|
text-align: right;
|
|
3402
3426
|
}
|
|
3403
|
-
th input[type='checkbox'][data-v-
|
|
3427
|
+
th input[type='checkbox'][data-v-54f3c477] {
|
|
3404
3428
|
transform: translateY(0.2rem) scale(1.2);
|
|
3405
3429
|
accent-color: var(--bgl-accent-color);
|
|
3406
3430
|
}
|
|
3407
|
-
th[data-v-
|
|
3431
|
+
th[data-v-54f3c477]::after {
|
|
3408
3432
|
content: '';
|
|
3409
3433
|
border-bottom: 1px solid var(--border-color);
|
|
3410
3434
|
position: absolute;
|
|
@@ -3412,24 +3436,24 @@ th[data-v-692391a3]::after {
|
|
|
3412
3436
|
right: 0;
|
|
3413
3437
|
bottom: -1px;
|
|
3414
3438
|
}
|
|
3415
|
-
tr[data-v-
|
|
3439
|
+
tr[data-v-54f3c477] {
|
|
3416
3440
|
border-bottom: 1px solid var(--border-color);
|
|
3417
3441
|
cursor: pointer;
|
|
3418
3442
|
align-items: center;
|
|
3419
3443
|
}
|
|
3420
|
-
td[data-v-
|
|
3421
|
-
th[data-v-
|
|
3444
|
+
td[data-v-54f3c477],
|
|
3445
|
+
th[data-v-54f3c477] {
|
|
3422
3446
|
white-space: nowrap;
|
|
3423
3447
|
padding: 0.75rem 0.65rem;
|
|
3424
3448
|
transition: var(--bgl-transition);
|
|
3425
3449
|
line-height: 1;
|
|
3426
3450
|
}
|
|
3427
|
-
tbody tr[data-v-
|
|
3451
|
+
tbody tr[data-v-54f3c477] {
|
|
3428
3452
|
font-size: 0.88em;
|
|
3429
|
-
height: var(--
|
|
3453
|
+
height: var(--ced4aeb8);
|
|
3430
3454
|
transition: all 200ms ease;
|
|
3431
3455
|
}
|
|
3432
|
-
tbody tr[data-v-
|
|
3456
|
+
tbody tr[data-v-54f3c477]:hover {
|
|
3433
3457
|
background: var(--bgl-gray-light);
|
|
3434
3458
|
}
|
|
3435
3459
|
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useBglSchema,
|
|
9
9
|
} from '@bagelink/vue'
|
|
10
10
|
import { useVirtualList } from '@vueuse/core'
|
|
11
|
-
import { computed, useSlots, watch } from 'vue'
|
|
11
|
+
import { computed, useSlots, watch, onMounted, onUnmounted } from 'vue'
|
|
12
12
|
|
|
13
13
|
export type SortDirectionsT = 'ASC' | 'DESC'
|
|
14
14
|
export type EmitOrderT = `${string} ${SortDirectionsT}`
|
|
@@ -17,6 +17,7 @@ const {
|
|
|
17
17
|
data,
|
|
18
18
|
schema,
|
|
19
19
|
showFields,
|
|
20
|
+
onLastItemVisible,
|
|
20
21
|
useServerSort = false,
|
|
21
22
|
selectable = false
|
|
22
23
|
} = defineProps<{
|
|
@@ -25,6 +26,7 @@ const {
|
|
|
25
26
|
showFields?: string[]
|
|
26
27
|
useServerSort?: boolean
|
|
27
28
|
selectable?: boolean
|
|
29
|
+
onLastItemVisible?: () => void
|
|
28
30
|
}>()
|
|
29
31
|
|
|
30
32
|
const emit = defineEmits<{
|
|
@@ -141,7 +143,7 @@ const { list, containerProps, wrapperProps, scrollTo } = useVirtualList(
|
|
|
141
143
|
watch(
|
|
142
144
|
() => computedData.value.length,
|
|
143
145
|
(newLength, oldLength) => {
|
|
144
|
-
if (newLength === oldLength) return
|
|
146
|
+
if (newLength === oldLength || onLastItemVisible !== undefined) return
|
|
145
147
|
scrollTo(0)
|
|
146
148
|
}
|
|
147
149
|
)
|
|
@@ -183,6 +185,18 @@ function toggleSelectAll(event: Event) {
|
|
|
183
185
|
selectedItems.value = value ? computedData.value.map((d: any) => d.id) : []
|
|
184
186
|
}
|
|
185
187
|
// #endregion ? SELECT COLUMN
|
|
188
|
+
const lastItem = $ref<HTMLTableRowElement | null>()
|
|
189
|
+
let observer: IntersectionObserver | undefined
|
|
190
|
+
|
|
191
|
+
onMounted(() => {
|
|
192
|
+
if (onLastItemVisible === undefined) return
|
|
193
|
+
observer = new IntersectionObserver(([entry]) => {
|
|
194
|
+
if (entry.isIntersecting && computedData.value.length) onLastItemVisible()
|
|
195
|
+
})
|
|
196
|
+
if (lastItem) observer.observe(lastItem)
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
onUnmounted(() => { observer?.disconnect() })
|
|
186
200
|
</script>
|
|
187
201
|
|
|
188
202
|
<template>
|
|
@@ -266,6 +280,7 @@ function toggleSelectAll(event: Event) {
|
|
|
266
280
|
</div>
|
|
267
281
|
</td>
|
|
268
282
|
</tr>
|
|
283
|
+
<tr v-if="onLastItemVisible !== undefined" ref="lastItem" />
|
|
269
284
|
</tbody>
|
|
270
285
|
</table>
|
|
271
286
|
</div>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const {
|
|
3
|
+
count = 1,
|
|
4
|
+
height = '50px',
|
|
5
|
+
width = 'auto',
|
|
6
|
+
borderRadius = 'var(--skeleton-radius)',
|
|
7
|
+
} = defineProps<{
|
|
8
|
+
count?: number
|
|
9
|
+
height?: string
|
|
10
|
+
width?: string
|
|
11
|
+
borderRadius?: string
|
|
12
|
+
}>()
|
|
13
|
+
import { useSlots } from 'vue'
|
|
14
|
+
|
|
15
|
+
const slots = useSlots()
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<template v-for="i in count" :key="i">
|
|
20
|
+
<div v-if="slots.default" class="skeleton-wrap">
|
|
21
|
+
<slot />
|
|
22
|
+
</div>
|
|
23
|
+
<div v-else class="skeleton" :style="{ height, width, borderRadius }" />
|
|
24
|
+
</template>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style scoped>
|
|
28
|
+
.skeleton-wrap {
|
|
29
|
+
--skeleton-radius: 0.25rem;
|
|
30
|
+
--skeleton-bg: #f0f0f0;
|
|
31
|
+
--skeleton-margin: 1rem;
|
|
32
|
+
margin-bottom: var(--skeleton-margin);
|
|
33
|
+
}
|
|
34
|
+
.skeleton {
|
|
35
|
+
animation: skeleton 2s infinite;
|
|
36
|
+
background-color: var(--skeleton-bg);
|
|
37
|
+
border-radius: var(--bg-card-radius);
|
|
38
|
+
margin-bottom: 0.25em;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes skeleton {
|
|
42
|
+
0% {
|
|
43
|
+
opacity: 0.5;
|
|
44
|
+
}
|
|
45
|
+
50% {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
100% {
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as BottomMenu } from './BottomMenu.vue'
|
|
2
2
|
export { default as Layout } from './Layout.vue'
|
|
3
3
|
export { default as SidebarMenu } from './SidebarMenu.vue'
|
|
4
|
+
export { default as Skeleton } from './Skeleton.vue'
|
|
4
5
|
export { default as TabbedLayout } from './TabbedLayout.vue'
|
|
5
6
|
export { default as Tabs } from './Tabs.vue'
|
|
6
7
|
export { default as TabsBody } from './TabsBody.vue'
|