tsv2-library 1.0.61-alpha.119 → 1.0.61-alpha.120
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/style.css +1 -1
- package/dist/tsv2-library.es.js +14 -7
- package/dist/tsv2-library.umd.js +2 -2
- package/package.json +1 -1
package/dist/tsv2-library.es.js
CHANGED
|
@@ -51812,7 +51812,10 @@ async function readConfig(tableId, defaultColumns) {
|
|
|
51812
51812
|
}
|
|
51813
51813
|
return defaultColumns;
|
|
51814
51814
|
}
|
|
51815
|
-
const _hoisted_1$15 =
|
|
51815
|
+
const _hoisted_1$15 = {
|
|
51816
|
+
key: 0,
|
|
51817
|
+
class: "text-body-medium text-general-400 dark:text-general-400 leading-4"
|
|
51818
|
+
};
|
|
51816
51819
|
const _hoisted_2$N = {
|
|
51817
51820
|
class: "flex flex-col gap-3",
|
|
51818
51821
|
"data-ts-section": "customreporttable"
|
|
@@ -51841,7 +51844,6 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
51841
51844
|
const customColumnConfig = computed(
|
|
51842
51845
|
() => ({
|
|
51843
51846
|
...props.customColumnProps,
|
|
51844
|
-
maxColumn: 20,
|
|
51845
51847
|
type: "flat",
|
|
51846
51848
|
visibleColumns: void 0
|
|
51847
51849
|
})
|
|
@@ -51899,7 +51901,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
51899
51901
|
];
|
|
51900
51902
|
}),
|
|
51901
51903
|
default: withCtx(() => [
|
|
51902
|
-
_hoisted_1$15,
|
|
51904
|
+
_ctx.customColumnProps.maxColumn ? (openBlock(), createElementBlock("p", _hoisted_1$15, " Select up to " + toDisplayString$1(_ctx.customColumnProps.maxColumn) + " table columns to display in the list. Drag and drop to rearrange the order and click the pin to freeze up to 3 columns. ", 1)) : createCommentVNode("", true),
|
|
51903
51905
|
createElementVNode("div", _hoisted_2$N, [
|
|
51904
51906
|
createVNode(_sfc_main$13, mergeProps(customColumnConfig.value, {
|
|
51905
51907
|
ref_key: "customColumn",
|
|
@@ -52073,10 +52075,11 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
52073
52075
|
return document.getElementById(visibilityMenuId.value);
|
|
52074
52076
|
};
|
|
52075
52077
|
const isSelectAble = (item3) => {
|
|
52076
|
-
|
|
52078
|
+
const hasReachMinColumn = filteredVisibleColumn.value.length <= 1;
|
|
52079
|
+
if (!hasReachMaxColumn.value && !hasReachMinColumn)
|
|
52077
52080
|
return true;
|
|
52078
52081
|
const isChecked2 = columnVisibilityModel.value.findIndex((c) => c.field === item3.field) > 0;
|
|
52079
|
-
return hasReachMaxColumn.value && isChecked2;
|
|
52082
|
+
return hasReachMaxColumn.value && isChecked2 || hasReachMinColumn && !isChecked2;
|
|
52080
52083
|
};
|
|
52081
52084
|
const saveColumnSetup = (columns2) => {
|
|
52082
52085
|
columnReorderData.value = columns2;
|
|
@@ -52246,19 +52249,22 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
52246
52249
|
}, ["stop"])),
|
|
52247
52250
|
"onUpdate:modelValue": (event2) => {
|
|
52248
52251
|
item3.visible = !!event2;
|
|
52252
|
+
if (item3.visible === false && item3.pinned)
|
|
52253
|
+
togglePin(item3);
|
|
52249
52254
|
updateVisibleColumnsModel();
|
|
52250
52255
|
setColumnVisibilityConfig();
|
|
52251
52256
|
}
|
|
52252
52257
|
}, null, 8, ["aria-label", "disabled", "label", "model-value", "selectable", "onUpdate:modelValue"]),
|
|
52253
|
-
_ctx.type === "flat" ? (openBlock(), createBlock(_sfc_main$1y, {
|
|
52258
|
+
_ctx.type === "flat" && !(isMaxPinnedColumns.value && !item3.pinned) ? (openBlock(), createBlock(_sfc_main$1y, {
|
|
52254
52259
|
key: 0,
|
|
52255
52260
|
class: normalizeClass([
|
|
52256
52261
|
"w-[18px] h-[18px] shrink-0",
|
|
52257
52262
|
{
|
|
52258
52263
|
"invisible": item3.dragable === false,
|
|
52259
52264
|
"!text-general-200": !item3.pinned,
|
|
52265
|
+
"hover:!text-primary-500": !item3.pinned,
|
|
52260
52266
|
"!text-primary-500": item3.pinned,
|
|
52261
|
-
"!cursor-not-allowed":
|
|
52267
|
+
"!cursor-not-allowed": !isSelectAble(item3)
|
|
52262
52268
|
}
|
|
52263
52269
|
]),
|
|
52264
52270
|
icon: item3.pinned ? "pushpin-fill" : "pushpin-2-line",
|
|
@@ -53213,6 +53219,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
53213
53219
|
"visible-columns": visibleColumns.value,
|
|
53214
53220
|
"onUpdate:visibleColumns": _cache[6] || (_cache[6] = ($event) => visibleColumns.value = $event),
|
|
53215
53221
|
"default-columns": _ctx.columns.filter((col) => col.visible !== false),
|
|
53222
|
+
"max-column": 20,
|
|
53216
53223
|
"table-data": props.data ?? currentPageTableData.value,
|
|
53217
53224
|
"table-id": dataTableID.value,
|
|
53218
53225
|
"table-key": props.dataKey,
|