@bagelink/vue 0.0.845 → 0.0.847
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.map +1 -1
- package/dist/index.cjs +8 -7
- package/dist/index.mjs +8 -7
- package/dist/style.css +46 -47
- package/package.json +1 -1
- package/src/components/TableSchema.vue +10 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableSchema.vue.d.ts","sourceRoot":"","sources":["../../src/components/TableSchema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableSchema.vue.d.ts","sourceRoot":"","sources":["../../src/components/TableSchema.vue"],"names":[],"mappings":"AA4iBA,OAAO,EAEN,KAAK,cAAc,EAKnB,MAAM,eAAe,CAAA;AAItB,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,CAAA;AAC5C,MAAM,MAAM,UAAU,GAAG,GAAG,MAAM,IAAI,eAAe,EAAE,CAAA;yBAGtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAsaxD,mBAAmB,CAAC;;;;;;;;;wBAtNZ,MAAM,EAAE;;cA5MnB,CAAC,EAAE;iBACA,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,cAAc,CAAC,CAAC,CAAC,CAAC;qBACzC,MAAM,EAAE;wBACL,OAAO;qBACV,OAAO;4BACA,MAAM,IAAI;MA6ZwD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;;;UApDuE,GAAG;UAsD9E;0BAvNS,CAAC,OAAO,SAAiC,CAAC;6BACvC,CAAC,UAAU,QAAoC,CAAC;gCAC7C,CAAC,aAAa,EAAC,MAAM,EAAE,CAAC;KAqNL;;;;YAGC,OAAO,CAAC,OAAO,WAAW,CAAC;;AAhbvE,wBAgb4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -53985,13 +53985,13 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
53985
53985
|
emits: /* @__PURE__ */ vue.mergeModels(["update:selectedItems", "orderBy", "select"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
|
|
53986
53986
|
setup(__props, { emit: __emit }) {
|
|
53987
53987
|
vue.useCssVars((_ctx) => ({
|
|
53988
|
-
"
|
|
53988
|
+
"706cfbe3": vue.unref(computedItemHeight)
|
|
53989
53989
|
}));
|
|
53990
53990
|
const emit2 = __emit;
|
|
53991
53991
|
const slots = vue.useSlots();
|
|
53992
53992
|
const loading = vue.useModel(__props, "loading");
|
|
53993
53993
|
const itemHeight = vue.useModel(__props, "itemHeight");
|
|
53994
|
-
const
|
|
53994
|
+
const computedItemHeight = vue.computed(() => `${itemHeight.value}px`);
|
|
53995
53995
|
let sortField = vue.ref("");
|
|
53996
53996
|
let sortDirection = vue.ref("ASC");
|
|
53997
53997
|
const selectedItems = vue.useModel(
|
|
@@ -54014,8 +54014,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
54014
54014
|
function transform(rowData) {
|
|
54015
54015
|
var _a2;
|
|
54016
54016
|
const obj = { ...rowData };
|
|
54017
|
-
const
|
|
54018
|
-
for (const field of
|
|
54017
|
+
const schemaFields = computedSchema.value.filter((f2) => f2.id);
|
|
54018
|
+
for (const field of schemaFields) {
|
|
54019
54019
|
const fieldData = rowData[`${field.id}`];
|
|
54020
54020
|
const newFieldVal = (_a2 = field.transform) == null ? void 0 : _a2.call(field, fieldData, rowData);
|
|
54021
54021
|
Object.assign(obj, {
|
|
@@ -54025,6 +54025,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
54025
54025
|
}
|
|
54026
54026
|
return obj;
|
|
54027
54027
|
}
|
|
54028
|
+
const NON_DIGIT_REGEX = /[^\d.-]/g;
|
|
54028
54029
|
const computedData = vue.computed(() => {
|
|
54029
54030
|
if (!sortField.value || __props.useServerSort === true) return __props.data.map(transform);
|
|
54030
54031
|
return __props.data.map(transform).sort(
|
|
@@ -54035,8 +54036,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
54035
54036
|
aValue = new Date(aValue).getTime();
|
|
54036
54037
|
bValue = new Date(bValue).getTime();
|
|
54037
54038
|
}
|
|
54038
|
-
const numAValue = Number.parseInt(`${aValue}`.replaceAll(
|
|
54039
|
-
const numBValue = Number.parseInt(`${bValue}`.replaceAll(
|
|
54039
|
+
const numAValue = Number.parseInt(`${aValue}`.replaceAll(NON_DIGIT_REGEX, ""), 10);
|
|
54040
|
+
const numBValue = Number.parseInt(`${bValue}`.replaceAll(NON_DIGIT_REGEX, ""), 10);
|
|
54040
54041
|
if (!Number.isNaN(numAValue) && !Number.isNaN(numBValue)) {
|
|
54041
54042
|
if (sortDirection.value === "ASC") return numAValue - numBValue;
|
|
54042
54043
|
return numBValue - numAValue;
|
|
@@ -54207,7 +54208,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
54207
54208
|
};
|
|
54208
54209
|
}
|
|
54209
54210
|
});
|
|
54210
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
54211
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-d8ca38b1"]]);
|
|
54211
54212
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
54212
54213
|
__name: "Title",
|
|
54213
54214
|
props: {
|
package/dist/index.mjs
CHANGED
|
@@ -53983,13 +53983,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
53983
53983
|
emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
|
|
53984
53984
|
setup(__props, { emit: __emit }) {
|
|
53985
53985
|
useCssVars((_ctx) => ({
|
|
53986
|
-
"
|
|
53986
|
+
"706cfbe3": unref(computedItemHeight)
|
|
53987
53987
|
}));
|
|
53988
53988
|
const emit2 = __emit;
|
|
53989
53989
|
const slots = useSlots();
|
|
53990
53990
|
const loading = useModel(__props, "loading");
|
|
53991
53991
|
const itemHeight = useModel(__props, "itemHeight");
|
|
53992
|
-
const
|
|
53992
|
+
const computedItemHeight = computed(() => `${itemHeight.value}px`);
|
|
53993
53993
|
let sortField = ref("");
|
|
53994
53994
|
let sortDirection = ref("ASC");
|
|
53995
53995
|
const selectedItems = useModel(
|
|
@@ -54012,8 +54012,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54012
54012
|
function transform(rowData) {
|
|
54013
54013
|
var _a2;
|
|
54014
54014
|
const obj = { ...rowData };
|
|
54015
|
-
const
|
|
54016
|
-
for (const field of
|
|
54015
|
+
const schemaFields = computedSchema.value.filter((f2) => f2.id);
|
|
54016
|
+
for (const field of schemaFields) {
|
|
54017
54017
|
const fieldData = rowData[`${field.id}`];
|
|
54018
54018
|
const newFieldVal = (_a2 = field.transform) == null ? void 0 : _a2.call(field, fieldData, rowData);
|
|
54019
54019
|
Object.assign(obj, {
|
|
@@ -54023,6 +54023,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54023
54023
|
}
|
|
54024
54024
|
return obj;
|
|
54025
54025
|
}
|
|
54026
|
+
const NON_DIGIT_REGEX = /[^\d.-]/g;
|
|
54026
54027
|
const computedData = computed(() => {
|
|
54027
54028
|
if (!sortField.value || __props.useServerSort === true) return __props.data.map(transform);
|
|
54028
54029
|
return __props.data.map(transform).sort(
|
|
@@ -54033,8 +54034,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54033
54034
|
aValue = new Date(aValue).getTime();
|
|
54034
54035
|
bValue = new Date(bValue).getTime();
|
|
54035
54036
|
}
|
|
54036
|
-
const numAValue = Number.parseInt(`${aValue}`.replaceAll(
|
|
54037
|
-
const numBValue = Number.parseInt(`${bValue}`.replaceAll(
|
|
54037
|
+
const numAValue = Number.parseInt(`${aValue}`.replaceAll(NON_DIGIT_REGEX, ""), 10);
|
|
54038
|
+
const numBValue = Number.parseInt(`${bValue}`.replaceAll(NON_DIGIT_REGEX, ""), 10);
|
|
54038
54039
|
if (!Number.isNaN(numAValue) && !Number.isNaN(numBValue)) {
|
|
54039
54040
|
if (sortDirection.value === "ASC") return numAValue - numBValue;
|
|
54040
54041
|
return numBValue - numAValue;
|
|
@@ -54205,7 +54206,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54205
54206
|
};
|
|
54206
54207
|
}
|
|
54207
54208
|
});
|
|
54208
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
54209
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-d8ca38b1"]]);
|
|
54209
54210
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
54210
54211
|
__name: "Title",
|
|
54211
54212
|
props: {
|
package/dist/style.css
CHANGED
|
@@ -3237,22 +3237,22 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
3237
3237
|
background: transparent;
|
|
3238
3238
|
}
|
|
3239
3239
|
|
|
3240
|
-
.table-list-wrap[data-v-
|
|
3240
|
+
.table-list-wrap[data-v-d8ca38b1] {
|
|
3241
3241
|
min-height: 150px;
|
|
3242
3242
|
}
|
|
3243
|
-
.selected[data-v-
|
|
3243
|
+
.selected[data-v-d8ca38b1] {
|
|
3244
3244
|
background: var(--bgl-primary-tint);
|
|
3245
3245
|
}
|
|
3246
|
-
tbody tr.selected[data-v-
|
|
3246
|
+
tbody tr.selected[data-v-d8ca38b1]:hover {
|
|
3247
3247
|
background: var(--bgl-primary-light);
|
|
3248
3248
|
}
|
|
3249
|
-
.loading-table[data-v-
|
|
3249
|
+
.loading-table[data-v-d8ca38b1] {
|
|
3250
3250
|
position: relative;
|
|
3251
3251
|
}
|
|
3252
|
-
.inset[data-v-
|
|
3252
|
+
.inset[data-v-d8ca38b1] {
|
|
3253
3253
|
inset: 0;
|
|
3254
3254
|
}
|
|
3255
|
-
.loading-table-animation[data-v-
|
|
3255
|
+
.loading-table-animation[data-v-d8ca38b1] {
|
|
3256
3256
|
--size: 60px;
|
|
3257
3257
|
top: 30vh;
|
|
3258
3258
|
inset-inline-start: calc(50% - var(--size));
|
|
@@ -3260,9 +3260,9 @@ tbody tr.selected[data-v-54f3c477]:hover {
|
|
|
3260
3260
|
border-top: 4px solid var(--bgl-primary);
|
|
3261
3261
|
width: var(--size);
|
|
3262
3262
|
height: var(--size);
|
|
3263
|
-
animation: loading-table-
|
|
3263
|
+
animation: loading-table-d8ca38b1 1s linear infinite;
|
|
3264
3264
|
}
|
|
3265
|
-
@keyframes loading-table-
|
|
3265
|
+
@keyframes loading-table-d8ca38b1 {
|
|
3266
3266
|
0% {
|
|
3267
3267
|
transform: translate(-50%, -50%) rotate(0deg);
|
|
3268
3268
|
}
|
|
@@ -3270,52 +3270,51 @@ tbody tr.selected[data-v-54f3c477]:hover {
|
|
|
3270
3270
|
transform: translate(-50%, -50%) rotate(360deg);
|
|
3271
3271
|
}
|
|
3272
3272
|
}
|
|
3273
|
-
.list-arrows[data-v-
|
|
3273
|
+
.list-arrows[data-v-d8ca38b1] {
|
|
3274
3274
|
opacity: 0;
|
|
3275
3275
|
}
|
|
3276
|
-
.list-arrows .bgl_icon-font[data-v-
|
|
3276
|
+
.list-arrows .bgl_icon-font[data-v-d8ca38b1] {
|
|
3277
3277
|
transition: all ease-in-out 0.2s;
|
|
3278
3278
|
}
|
|
3279
|
-
.list-arrows.sorted[data-v-
|
|
3279
|
+
.list-arrows.sorted[data-v-d8ca38b1] {
|
|
3280
3280
|
opacity: 1;
|
|
3281
3281
|
}
|
|
3282
|
-
.col img[data-v-
|
|
3282
|
+
.col img[data-v-d8ca38b1] {
|
|
3283
3283
|
height: 35px;
|
|
3284
3284
|
margin-top: -14px;
|
|
3285
3285
|
margin-bottom: -14px;
|
|
3286
3286
|
border-radius: 5px;
|
|
3287
3287
|
}
|
|
3288
|
-
.list-arrows.sorted .desc[data-v-
|
|
3288
|
+
.list-arrows.sorted .desc[data-v-d8ca38b1] {
|
|
3289
3289
|
transform: rotate(180deg);
|
|
3290
3290
|
display: inline-block;
|
|
3291
3291
|
}
|
|
3292
|
-
table[data-v-
|
|
3293
|
-
border-collapse: separate;
|
|
3292
|
+
table[data-v-d8ca38b1] {
|
|
3294
3293
|
border-spacing: 0 15px;
|
|
3295
3294
|
border-collapse: collapse;
|
|
3296
3295
|
width: 100%;
|
|
3297
3296
|
}
|
|
3298
|
-
th[data-v-
|
|
3297
|
+
th[data-v-d8ca38b1] {
|
|
3299
3298
|
font-size: 0.8rem;
|
|
3300
3299
|
color: var(--bgl-black-tint);
|
|
3301
3300
|
position: sticky;
|
|
3302
3301
|
top: 0;
|
|
3303
3302
|
z-index: 2;
|
|
3304
3303
|
background: var(--bgl-box-bg);
|
|
3305
|
-
height: var(--
|
|
3304
|
+
height: var(--706cfbe3);
|
|
3306
3305
|
vertical-align: bottom;
|
|
3307
3306
|
font-weight: 400;
|
|
3308
3307
|
text-align: start;
|
|
3309
3308
|
}
|
|
3310
|
-
.embedded-field[data-v-
|
|
3309
|
+
.embedded-field[data-v-d8ca38b1] {
|
|
3311
3310
|
margin-bottom: -0.2rem;
|
|
3312
3311
|
margin-top: -0.2rem;
|
|
3313
3312
|
}
|
|
3314
|
-
.row[data-v-
|
|
3313
|
+
.row[data-v-d8ca38b1] {
|
|
3315
3314
|
border-bottom: 1px solid var(--border-color);
|
|
3316
3315
|
cursor: pointer;
|
|
3317
3316
|
}
|
|
3318
|
-
.row.first-row[data-v-
|
|
3317
|
+
.row.first-row[data-v-d8ca38b1] {
|
|
3319
3318
|
font-size: 0.8rem;
|
|
3320
3319
|
color: var(--bgl-black-tint);
|
|
3321
3320
|
position: sticky;
|
|
@@ -3324,7 +3323,7 @@ th[data-v-54f3c477] {
|
|
|
3324
3323
|
background: var(--bgl-box-bg);
|
|
3325
3324
|
vertical-align: bottom;
|
|
3326
3325
|
}
|
|
3327
|
-
.row.first-row[data-v-
|
|
3326
|
+
.row.first-row[data-v-d8ca38b1]::after {
|
|
3328
3327
|
content: '';
|
|
3329
3328
|
border-bottom: 1px solid var(--border-color);
|
|
3330
3329
|
position: absolute;
|
|
@@ -3332,30 +3331,30 @@ th[data-v-54f3c477] {
|
|
|
3332
3331
|
right: 0;
|
|
3333
3332
|
bottom: -1px;
|
|
3334
3333
|
}
|
|
3335
|
-
.first-row .col[data-v-
|
|
3334
|
+
.first-row .col[data-v-d8ca38b1] {
|
|
3336
3335
|
cursor: pointer;
|
|
3337
3336
|
background: var(--bgl-box-bg);
|
|
3338
3337
|
}
|
|
3339
|
-
.col[data-v-
|
|
3338
|
+
.col[data-v-d8ca38b1] {
|
|
3340
3339
|
white-space: nowrap;
|
|
3341
3340
|
padding: 0.75rem 1rem;
|
|
3342
3341
|
transition: var(--bgl-transition);
|
|
3343
3342
|
line-height: 1;
|
|
3344
3343
|
align-items: center;
|
|
3345
3344
|
}
|
|
3346
|
-
.col[data-v-
|
|
3345
|
+
.col[data-v-d8ca38b1]:has(.bagel-input) {
|
|
3347
3346
|
padding: 0rem 0.25rem;
|
|
3348
3347
|
}
|
|
3349
|
-
.col > div[data-v-
|
|
3348
|
+
.col > div[data-v-d8ca38b1] {
|
|
3350
3349
|
display: flex;
|
|
3351
3350
|
gap: 0.5rem;
|
|
3352
3351
|
}
|
|
3353
|
-
.max-col-width[data-v-
|
|
3352
|
+
.max-col-width[data-v-d8ca38b1] {
|
|
3354
3353
|
max-width: 30vw;
|
|
3355
3354
|
overflow: hidden;
|
|
3356
3355
|
text-overflow: ellipsis;
|
|
3357
3356
|
}
|
|
3358
|
-
.col.check .bgl_icon-font[data-v-
|
|
3357
|
+
.col.check .bgl_icon-font[data-v-d8ca38b1] {
|
|
3359
3358
|
border-radius: 100%;
|
|
3360
3359
|
background: var(--bgl-blue-20);
|
|
3361
3360
|
color: var(--bgl-primary);
|
|
@@ -3366,35 +3365,35 @@ th[data-v-54f3c477] {
|
|
|
3366
3365
|
justify-content: center;
|
|
3367
3366
|
margin-top: -2px;
|
|
3368
3367
|
}
|
|
3369
|
-
.rows[data-v-
|
|
3368
|
+
.rows[data-v-d8ca38b1] {
|
|
3370
3369
|
font-size: 0.88em;
|
|
3371
3370
|
}
|
|
3372
|
-
.table-list[data-v-
|
|
3371
|
+
.table-list[data-v-d8ca38b1] {
|
|
3373
3372
|
height: 100%;
|
|
3374
3373
|
position: relative;
|
|
3375
3374
|
padding-left: 0 !important;
|
|
3376
3375
|
padding-right: 0 !important;
|
|
3377
3376
|
overflow: auto;
|
|
3378
3377
|
}
|
|
3379
|
-
.BagelTable .table-list[data-v-
|
|
3378
|
+
.BagelTable .table-list[data-v-d8ca38b1] {
|
|
3380
3379
|
overflow: unset;
|
|
3381
3380
|
}
|
|
3382
|
-
.row-item[data-v-
|
|
3383
|
-
height: var(--
|
|
3381
|
+
.row-item[data-v-d8ca38b1] {
|
|
3382
|
+
height: var(--706cfbe3);
|
|
3384
3383
|
transition: all 200ms ease;
|
|
3385
3384
|
}
|
|
3386
|
-
.row-item[data-v-
|
|
3385
|
+
.row-item[data-v-d8ca38b1]:hover {
|
|
3387
3386
|
background: var(--bgl-gray-light);
|
|
3388
3387
|
}
|
|
3389
|
-
.row-item input[type='checkbox'][data-v-
|
|
3388
|
+
.row-item input[type='checkbox'][data-v-d8ca38b1] {
|
|
3390
3389
|
margin-top: 0.45rem !important;
|
|
3391
3390
|
accent-color: var(--bgl-accent-color);
|
|
3392
3391
|
}
|
|
3393
|
-
.infinite-wrapper[data-v-
|
|
3392
|
+
.infinite-wrapper[data-v-d8ca38b1] {
|
|
3394
3393
|
overflow-y: auto;
|
|
3395
3394
|
width: 100%;
|
|
3396
3395
|
}
|
|
3397
|
-
input[type='checkbox'][data-v-
|
|
3396
|
+
input[type='checkbox'][data-v-d8ca38b1] {
|
|
3398
3397
|
margin-top: 0.3rem !important;
|
|
3399
3398
|
accent-color: var(--bgl-accent-color);
|
|
3400
3399
|
transform: scale(1.2);
|
|
@@ -3406,7 +3405,7 @@ input[type='checkbox'][data-v-54f3c477] {
|
|
|
3406
3405
|
height: 0.85rem;
|
|
3407
3406
|
width: 0.85rem;
|
|
3408
3407
|
}
|
|
3409
|
-
input[type='checkbox'][data-v-
|
|
3408
|
+
input[type='checkbox'][data-v-d8ca38b1]::before {
|
|
3410
3409
|
content: '';
|
|
3411
3410
|
height: 0.85rem;
|
|
3412
3411
|
width: 0.85rem;
|
|
@@ -3419,18 +3418,18 @@ input[type='checkbox'][data-v-54f3c477]::before {
|
|
|
3419
3418
|
transform: scale(1);
|
|
3420
3419
|
position: absolute;
|
|
3421
3420
|
}
|
|
3422
|
-
input[type='checkbox'][data-v-
|
|
3421
|
+
input[type='checkbox'][data-v-d8ca38b1]:hover::before {
|
|
3423
3422
|
opacity: 0.2;
|
|
3424
3423
|
transform: scale(2);
|
|
3425
3424
|
}
|
|
3426
|
-
[lang='he'] [dir='ltr'][data-v-
|
|
3425
|
+
[lang='he'] [dir='ltr'][data-v-d8ca38b1] {
|
|
3427
3426
|
text-align: right;
|
|
3428
3427
|
}
|
|
3429
|
-
th input[type='checkbox'][data-v-
|
|
3428
|
+
th input[type='checkbox'][data-v-d8ca38b1] {
|
|
3430
3429
|
transform: translateY(0.2rem) scale(1.2);
|
|
3431
3430
|
accent-color: var(--bgl-accent-color);
|
|
3432
3431
|
}
|
|
3433
|
-
th[data-v-
|
|
3432
|
+
th[data-v-d8ca38b1]::after {
|
|
3434
3433
|
content: '';
|
|
3435
3434
|
border-bottom: 1px solid var(--border-color);
|
|
3436
3435
|
position: absolute;
|
|
@@ -3438,24 +3437,24 @@ th[data-v-54f3c477]::after {
|
|
|
3438
3437
|
right: 0;
|
|
3439
3438
|
bottom: -1px;
|
|
3440
3439
|
}
|
|
3441
|
-
tr[data-v-
|
|
3440
|
+
tr[data-v-d8ca38b1] {
|
|
3442
3441
|
border-bottom: 1px solid var(--border-color);
|
|
3443
3442
|
cursor: pointer;
|
|
3444
3443
|
align-items: center;
|
|
3445
3444
|
}
|
|
3446
|
-
td[data-v-
|
|
3447
|
-
th[data-v-
|
|
3445
|
+
td[data-v-d8ca38b1],
|
|
3446
|
+
th[data-v-d8ca38b1] {
|
|
3448
3447
|
white-space: nowrap;
|
|
3449
3448
|
padding: 0.75rem 0.65rem;
|
|
3450
3449
|
transition: var(--bgl-transition);
|
|
3451
3450
|
line-height: 1;
|
|
3452
3451
|
}
|
|
3453
|
-
tbody tr[data-v-
|
|
3452
|
+
tbody tr[data-v-d8ca38b1] {
|
|
3454
3453
|
font-size: 0.88em;
|
|
3455
|
-
height: var(--
|
|
3454
|
+
height: var(--706cfbe3);
|
|
3456
3455
|
transition: all 200ms ease;
|
|
3457
3456
|
}
|
|
3458
|
-
tbody tr[data-v-
|
|
3457
|
+
tbody tr[data-v-d8ca38b1]:hover {
|
|
3459
3458
|
background: var(--bgl-gray-light);
|
|
3460
3459
|
}
|
|
3461
3460
|
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@ const slots = useSlots()
|
|
|
39
39
|
const loading = defineModel('loading', { default: false })
|
|
40
40
|
|
|
41
41
|
const itemHeight = defineModel('itemHeight', { default: 50 })
|
|
42
|
-
const
|
|
42
|
+
const computedItemHeight = $computed(() => `${itemHeight.value}px`)
|
|
43
43
|
|
|
44
44
|
let sortField = $ref('')
|
|
45
45
|
let sortDirection = $ref<SortDirectionsT>('ASC')
|
|
@@ -67,9 +67,9 @@ const computedSchema = $computed(() => useBglSchema<T>({
|
|
|
67
67
|
|
|
68
68
|
function transform(rowData: any) {
|
|
69
69
|
const obj: { [key: string]: any } = { ...rowData }
|
|
70
|
-
const
|
|
70
|
+
const schemaFields = computedSchema.filter(f => f.id)
|
|
71
71
|
|
|
72
|
-
for (const field of
|
|
72
|
+
for (const field of schemaFields) {
|
|
73
73
|
const fieldData = rowData[`${field.id}`]
|
|
74
74
|
|
|
75
75
|
const newFieldVal = field.transform?.(fieldData, rowData)
|
|
@@ -82,6 +82,8 @@ function transform(rowData: any) {
|
|
|
82
82
|
return obj
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
const NON_DIGIT_REGEX = /[^\d.-]/g
|
|
86
|
+
|
|
85
87
|
const computedData = computed(() => {
|
|
86
88
|
if (!sortField || useServerSort === true) return data.map(transform)
|
|
87
89
|
|
|
@@ -99,8 +101,8 @@ const computedData = computed(() => {
|
|
|
99
101
|
bValue = new Date(bValue).getTime()
|
|
100
102
|
}
|
|
101
103
|
|
|
102
|
-
const numAValue = Number.parseInt(`${aValue}`.replaceAll(
|
|
103
|
-
const numBValue = Number.parseInt(`${bValue}`.replaceAll(
|
|
104
|
+
const numAValue = Number.parseInt(`${aValue}`.replaceAll(NON_DIGIT_REGEX, ''), 10)
|
|
105
|
+
const numBValue = Number.parseInt(`${bValue}`.replaceAll(NON_DIGIT_REGEX, ''), 10)
|
|
104
106
|
|
|
105
107
|
if (!Number.isNaN(numAValue) && !Number.isNaN(numBValue)) {
|
|
106
108
|
if (sortDirection === 'ASC') return numAValue - numBValue
|
|
@@ -354,7 +356,6 @@ tbody tr.selected:hover {
|
|
|
354
356
|
}
|
|
355
357
|
|
|
356
358
|
table {
|
|
357
|
-
border-collapse: separate;
|
|
358
359
|
border-spacing: 0 15px;
|
|
359
360
|
border-collapse: collapse;
|
|
360
361
|
width: 100%;
|
|
@@ -367,7 +368,7 @@ th {
|
|
|
367
368
|
top: 0;
|
|
368
369
|
z-index: 2;
|
|
369
370
|
background: var(--bgl-box-bg);
|
|
370
|
-
height: v-bind(
|
|
371
|
+
height: v-bind(computedItemHeight);
|
|
371
372
|
vertical-align: bottom;
|
|
372
373
|
font-weight: 400;
|
|
373
374
|
text-align: start;
|
|
@@ -459,7 +460,7 @@ th {
|
|
|
459
460
|
}
|
|
460
461
|
|
|
461
462
|
.row-item {
|
|
462
|
-
height: v-bind(
|
|
463
|
+
height: v-bind(computedItemHeight);
|
|
463
464
|
transition: all 200ms ease;
|
|
464
465
|
}
|
|
465
466
|
|
|
@@ -543,7 +544,7 @@ th {
|
|
|
543
544
|
|
|
544
545
|
tbody tr {
|
|
545
546
|
font-size: 0.88em;
|
|
546
|
-
height: v-bind(
|
|
547
|
+
height: v-bind(computedItemHeight);
|
|
547
548
|
transition: all 200ms ease;
|
|
548
549
|
}
|
|
549
550
|
|