@fastkit/vui 0.16.45 → 0.16.47
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/vui.d.ts +6 -6
- package/dist/vui.mjs +11 -11
- package/dist/vui.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/VDataTable/VDataTable.tsx +12 -43
package/dist/vui.d.ts
CHANGED
|
@@ -7191,7 +7191,7 @@ declare const DATA_TABLE_DEFAULTS: {
|
|
|
7191
7191
|
descQueryValue: string;
|
|
7192
7192
|
limits: number[];
|
|
7193
7193
|
limitDefault: number;
|
|
7194
|
-
|
|
7194
|
+
controlThreshold: number;
|
|
7195
7195
|
searchQuery: string | string[];
|
|
7196
7196
|
};
|
|
7197
7197
|
type DataTableDefaults = typeof DATA_TABLE_DEFAULTS;
|
|
@@ -7294,7 +7294,7 @@ declare const VDataTable: vue.DefineComponent<{
|
|
|
7294
7294
|
type: NumberConstructor;
|
|
7295
7295
|
default: () => number;
|
|
7296
7296
|
};
|
|
7297
|
-
|
|
7297
|
+
controlThreshold: {
|
|
7298
7298
|
type: NumberConstructor;
|
|
7299
7299
|
default: () => number;
|
|
7300
7300
|
};
|
|
@@ -7317,7 +7317,7 @@ declare const VDataTable: vue.DefineComponent<{
|
|
|
7317
7317
|
noResultsMessage: PropType<VNodeChildOrSlot>;
|
|
7318
7318
|
rowSettings: PropType<RawDataTableRowSettings<DataTableItem>>;
|
|
7319
7319
|
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
7320
|
-
input: (
|
|
7320
|
+
input: (selectedValues: string[]) => boolean;
|
|
7321
7321
|
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
7322
7322
|
/** 選択中のkeyの配列 */
|
|
7323
7323
|
modelValue: {
|
|
@@ -7383,7 +7383,7 @@ declare const VDataTable: vue.DefineComponent<{
|
|
|
7383
7383
|
type: NumberConstructor;
|
|
7384
7384
|
default: () => number;
|
|
7385
7385
|
};
|
|
7386
|
-
|
|
7386
|
+
controlThreshold: {
|
|
7387
7387
|
type: NumberConstructor;
|
|
7388
7388
|
default: () => number;
|
|
7389
7389
|
};
|
|
@@ -7406,7 +7406,7 @@ declare const VDataTable: vue.DefineComponent<{
|
|
|
7406
7406
|
noResultsMessage: PropType<VNodeChildOrSlot>;
|
|
7407
7407
|
rowSettings: PropType<RawDataTableRowSettings<DataTableItem>>;
|
|
7408
7408
|
}>> & {
|
|
7409
|
-
onInput?: ((
|
|
7409
|
+
onInput?: ((selectedValues: string[]) => any) | undefined;
|
|
7410
7410
|
}, {
|
|
7411
7411
|
modelValue: string[];
|
|
7412
7412
|
items: DataTableItem[];
|
|
@@ -7420,7 +7420,7 @@ declare const VDataTable: vue.DefineComponent<{
|
|
|
7420
7420
|
descQueryValue: string;
|
|
7421
7421
|
limits: number[];
|
|
7422
7422
|
limitDefault: number;
|
|
7423
|
-
|
|
7423
|
+
controlThreshold: number;
|
|
7424
7424
|
searchQuery: string | string[];
|
|
7425
7425
|
total: number;
|
|
7426
7426
|
selectable: boolean;
|
package/dist/vui.mjs
CHANGED
|
@@ -3888,7 +3888,7 @@ var DATA_TABLE_DEFAULTS = {
|
|
|
3888
3888
|
descQueryValue: "DESC",
|
|
3889
3889
|
limits: [5, 10, 20, 50, 100],
|
|
3890
3890
|
limitDefault: 20,
|
|
3891
|
-
|
|
3891
|
+
controlThreshold: 10,
|
|
3892
3892
|
searchQuery: []
|
|
3893
3893
|
};
|
|
3894
3894
|
function configureDataTableDefaults(defaults) {
|
|
@@ -3965,9 +3965,9 @@ var VDataTable = defineComponent({
|
|
|
3965
3965
|
type: Number,
|
|
3966
3966
|
default: () => DATA_TABLE_DEFAULTS.limitDefault
|
|
3967
3967
|
},
|
|
3968
|
-
|
|
3968
|
+
controlThreshold: {
|
|
3969
3969
|
type: Number,
|
|
3970
|
-
default: () => DATA_TABLE_DEFAULTS.
|
|
3970
|
+
default: () => DATA_TABLE_DEFAULTS.controlThreshold
|
|
3971
3971
|
},
|
|
3972
3972
|
headers: {
|
|
3973
3973
|
type: Array,
|
|
@@ -3991,7 +3991,7 @@ var VDataTable = defineComponent({
|
|
|
3991
3991
|
rowSettings: [Object, Function]
|
|
3992
3992
|
},
|
|
3993
3993
|
emits: {
|
|
3994
|
-
input: (
|
|
3994
|
+
input: (selectedValues) => true
|
|
3995
3995
|
},
|
|
3996
3996
|
setup(props11, ctx) {
|
|
3997
3997
|
const vui = useVui();
|
|
@@ -4074,7 +4074,7 @@ var VDataTable = defineComponent({
|
|
|
4074
4074
|
return;
|
|
4075
4075
|
}
|
|
4076
4076
|
return {
|
|
4077
|
-
maxHeight: layout.
|
|
4077
|
+
maxHeight: layout.calculateViewHeight(_maxHeight, -footerHeight - 100, 200)
|
|
4078
4078
|
};
|
|
4079
4079
|
});
|
|
4080
4080
|
const defaultOrderQueryRef = computed(() => props11.defaultOrder === props11.ascQueryValue ? props11.ascQueryValue : props11.descQueryValue);
|
|
@@ -4082,7 +4082,7 @@ var VDataTable = defineComponent({
|
|
|
4082
4082
|
return vui.location.isQueryOnlyTransitioning([props11.pageQuery, props11.sortQuery, props11.orderQuery, props11.limitQuery]);
|
|
4083
4083
|
});
|
|
4084
4084
|
const pageRef = computed(() => vui.location.getQuery(props11.pageQuery, Number, 1));
|
|
4085
|
-
const needShowHeaderControlRef = computed(() => props11.items.length > props11.
|
|
4085
|
+
const needShowHeaderControlRef = computed(() => props11.items.length > props11.controlThreshold);
|
|
4086
4086
|
const sortByRef = computed({
|
|
4087
4087
|
get: () => {
|
|
4088
4088
|
return vui.location.getQuery(props11.sortQuery);
|
|
@@ -4095,7 +4095,7 @@ var VDataTable = defineComponent({
|
|
|
4095
4095
|
}
|
|
4096
4096
|
});
|
|
4097
4097
|
const ordersRef = computed(() => [props11.ascQueryValue, props11.descQueryValue]);
|
|
4098
|
-
const
|
|
4098
|
+
const usePagingRef = computed(() => props11.limits.length > 0);
|
|
4099
4099
|
const orderByRef = computed({
|
|
4100
4100
|
get: () => {
|
|
4101
4101
|
const value = vui.location.getQuery(props11.orderQuery);
|
|
@@ -4169,7 +4169,7 @@ var VDataTable = defineComponent({
|
|
|
4169
4169
|
}
|
|
4170
4170
|
vui.location.pushQuery({
|
|
4171
4171
|
...queries,
|
|
4172
|
-
...
|
|
4172
|
+
...usePagingRef.value ? {
|
|
4173
4173
|
[props11.pageQuery]: 1
|
|
4174
4174
|
} : void 0
|
|
4175
4175
|
});
|
|
@@ -4466,10 +4466,10 @@ var VDataTable = defineComponent({
|
|
|
4466
4466
|
});
|
|
4467
4467
|
return () => {
|
|
4468
4468
|
const isEmpty = isEmptyRef.value;
|
|
4469
|
-
const
|
|
4469
|
+
const usePaging = usePagingRef.value;
|
|
4470
4470
|
return createVNode("div", {
|
|
4471
4471
|
"class": ["v-data-table", classesRef.value]
|
|
4472
|
-
}, [!isEmpty &&
|
|
4472
|
+
}, [!isEmpty && usePaging && needShowHeaderControlRef.value && createVNode("div", {
|
|
4473
4473
|
"class": "v-data-table__header"
|
|
4474
4474
|
}, [genControls()]), createVNode("div", {
|
|
4475
4475
|
"class": "v-data-table__body container-pull"
|
|
@@ -4492,7 +4492,7 @@ var VDataTable = defineComponent({
|
|
|
4492
4492
|
}, [createVNode(loading_exports.VProgressCircular, {
|
|
4493
4493
|
"indeterminate": true
|
|
4494
4494
|
}, null)])]
|
|
4495
|
-
})]), !isEmpty &&
|
|
4495
|
+
})]), !isEmpty && usePaging && withDirectives(createVNode("div", {
|
|
4496
4496
|
"class": "v-data-table__footer"
|
|
4497
4497
|
}, [genControls()]), [resizeDirectiveArgument(({
|
|
4498
4498
|
height
|