lkt-table 2.0.27 → 2.0.28
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/build.js
CHANGED
|
@@ -986,7 +986,8 @@ const la = (t) => t && nl(t), na = re({
|
|
|
986
986
|
columns: { default: () => [] },
|
|
987
987
|
i: { default: 0 },
|
|
988
988
|
editModeEnabled: { type: Boolean, default: !1 },
|
|
989
|
-
hasInlineEditPerm: { type: Boolean, default: !1 }
|
|
989
|
+
hasInlineEditPerm: { type: Boolean, default: !1 },
|
|
990
|
+
tableType: {}
|
|
990
991
|
},
|
|
991
992
|
emits: [
|
|
992
993
|
"update:modelValue"
|
|
@@ -1011,10 +1012,10 @@ const la = (t) => t && nl(t), na = re({
|
|
|
1011
1012
|
return (V = n.column.field) == null ? void 0 : V.modalData;
|
|
1012
1013
|
}), T = s(() => typeof n.column.field == "string" && n.column.field.startsWith("prop:") ? Oa(n.column.field, l.value) : n.column.field), u = s(() => {
|
|
1013
1014
|
var m, c, S, V;
|
|
1014
|
-
return n.column.type === ht.Field ? !((c = (m = n.column) == null ? void 0 : m.field) != null && c.label) && [
|
|
1015
|
+
return n.column.type === ht.Field ? !((c = (m = n.column) == null ? void 0 : m.field) != null && c.label) && (n.column.ensureFieldLabel || [
|
|
1015
1016
|
xt.Switch,
|
|
1016
1017
|
xt.Check
|
|
1017
|
-
].includes((S = n.column.field) == null ? void 0 : S.type) ? n.column.label : (V = n.column.field) == null ? void 0 : V.label : "";
|
|
1018
|
+
].includes((S = n.column.field) == null ? void 0 : S.type)) ? n.column.label : (V = n.column.field) == null ? void 0 : V.label : "";
|
|
1018
1019
|
});
|
|
1019
1020
|
return (m, c) => {
|
|
1020
1021
|
const S = ye("lkt-anchor"), V = ye("lkt-button"), E = ye("lkt-field");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Column, LktObject } from "lkt-vue-kernel";
|
|
1
|
+
import { Column, LktObject, TableType } from "lkt-vue-kernel";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
modelValue: LktObject;
|
|
4
4
|
column: Column;
|
|
@@ -6,6 +6,7 @@ type __VLS_Props = {
|
|
|
6
6
|
i: number;
|
|
7
7
|
editModeEnabled: boolean;
|
|
8
8
|
hasInlineEditPerm: boolean;
|
|
9
|
+
tableType: TableType;
|
|
9
10
|
};
|
|
10
11
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
12
|
"update:modelValue": (...args: any[]) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import {getColumnDisplayContent} from "../functions/table-functions";
|
|
3
3
|
import {computed, ref, watch} from "vue";
|
|
4
|
-
import {Column, ColumnType, extractPropValue, FieldType, LktObject} from "lkt-vue-kernel";
|
|
4
|
+
import {Column, ColumnType, extractPropValue, FieldType, LktObject, TableType} from "lkt-vue-kernel";
|
|
5
5
|
|
|
6
6
|
const emit = defineEmits([
|
|
7
7
|
'update:modelValue'
|
|
@@ -14,6 +14,7 @@ const props = withDefaults(defineProps<{
|
|
|
14
14
|
i: number
|
|
15
15
|
editModeEnabled: boolean
|
|
16
16
|
hasInlineEditPerm: boolean
|
|
17
|
+
tableType: TableType
|
|
17
18
|
}>(), {
|
|
18
19
|
modelValue: () => ({}),
|
|
19
20
|
column: () => (new Column()),
|
|
@@ -66,11 +67,13 @@ const computedFieldConfig = computed(() => {
|
|
|
66
67
|
|
|
67
68
|
const computedFieldLabel = computed(() => {
|
|
68
69
|
if (props.column.type === ColumnType.Field) {
|
|
69
|
-
if (!props.column?.field?.label
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
if (!props.column?.field?.label) {
|
|
71
|
+
if (props.column.ensureFieldLabel || [
|
|
72
|
+
FieldType.Switch,
|
|
73
|
+
FieldType.Check,
|
|
74
|
+
].includes(props.column.field?.type)) {
|
|
75
|
+
return props.column.label;
|
|
76
|
+
}
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
return props.column.field?.label;
|