@dolusoft/vue3-datatable 1.8.32 → 1.8.35

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.
@@ -2891,6 +2891,28 @@ function _sfc_render(_ctx, _cache) {
2891
2891
  return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
2892
2892
  }
2893
2893
  const iconFilter = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render]]);
2894
+ const tooltipDirective = {
2895
+ mounted(el, binding) {
2896
+ const text = binding.value || "";
2897
+ if (!text) return;
2898
+ el.setAttribute("data-tooltip", text);
2899
+ el.classList.add("has-tooltip");
2900
+ },
2901
+ updated(el, binding) {
2902
+ const text = binding.value || "";
2903
+ if (text) {
2904
+ el.setAttribute("data-tooltip", text);
2905
+ el.classList.add("has-tooltip");
2906
+ } else {
2907
+ el.removeAttribute("data-tooltip");
2908
+ el.classList.remove("has-tooltip");
2909
+ }
2910
+ },
2911
+ unmounted(el) {
2912
+ el.removeAttribute("data-tooltip");
2913
+ el.classList.remove("has-tooltip");
2914
+ }
2915
+ };
2894
2916
  const _hoisted_1$1 = { key: "hdrrow" };
2895
2917
  const _hoisted_2$1 = { class: "bh-checkbox" };
2896
2918
  const _hoisted_3$1 = {
@@ -3297,16 +3319,17 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3297
3319
  ])
3298
3320
  ]),
3299
3321
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "checkbox" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
3300
- props.showClearAllButton ? (vue.openBlock(), vue.createElementBlock("button", {
3322
+ props.showClearAllButton ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
3301
3323
  key: 0,
3302
3324
  type: "button",
3303
3325
  class: vue.normalizeClass(["bh-clear-all-button", {
3304
3326
  "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3305
3327
  }]),
3306
3328
  disabled: !hasAnyActiveFilterLocal.value,
3307
- onClick: vue.withModifiers(handleClearAllFilters, ["stop"]),
3308
- title: "Clear all filters"
3309
- }, _hoisted_6$1, 10, _hoisted_4$1)) : vue.createCommentVNode("", true)
3329
+ onClick: vue.withModifiers(handleClearAllFilters, ["stop"])
3330
+ }, _hoisted_6$1, 10, _hoisted_4$1)), [
3331
+ [vue.unref(tooltipDirective), "Clear all filters"]
3332
+ ]) : vue.createCommentVNode("", true)
3310
3333
  ])) : vue.createCommentVNode("", true)
3311
3334
  ], 6)) : vue.createCommentVNode("", true),
3312
3335
  props.all.hasRightPanel ? (vue.openBlock(), vue.createElementBlock("th", {
@@ -3322,16 +3345,17 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3322
3345
  })
3323
3346
  }, [
3324
3347
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "rightpanel" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$1, [
3325
- props.showClearAllButton ? (vue.openBlock(), vue.createElementBlock("button", {
3348
+ props.showClearAllButton ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
3326
3349
  key: 0,
3327
3350
  type: "button",
3328
3351
  class: vue.normalizeClass(["bh-clear-all-button", {
3329
3352
  "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3330
3353
  }]),
3331
3354
  disabled: !hasAnyActiveFilterLocal.value,
3332
- onClick: vue.withModifiers(handleClearAllFilters, ["stop"]),
3333
- title: "Clear all filters"
3334
- }, _hoisted_10$1, 10, _hoisted_8$1)) : vue.createCommentVNode("", true)
3355
+ onClick: vue.withModifiers(handleClearAllFilters, ["stop"])
3356
+ }, _hoisted_10$1, 10, _hoisted_8$1)), [
3357
+ [vue.unref(tooltipDirective), "Clear all filters"]
3358
+ ]) : vue.createCommentVNode("", true)
3335
3359
  ])) : vue.createCommentVNode("", true)
3336
3360
  ], 6)) : vue.createCommentVNode("", true),
3337
3361
  props.all.hasSubtable ? (vue.openBlock(), vue.createElementBlock("th", {
@@ -3347,16 +3371,17 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3347
3371
  expandall: props.all.expandall
3348
3372
  }, null, 8, ["expandedrows", "expandall"])) : vue.createCommentVNode("", true),
3349
3373
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "subtable" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, [
3350
- props.showClearAllButton ? (vue.openBlock(), vue.createElementBlock("button", {
3374
+ props.showClearAllButton ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
3351
3375
  key: 0,
3352
3376
  type: "button",
3353
3377
  class: vue.normalizeClass(["bh-clear-all-button", {
3354
3378
  "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3355
3379
  }]),
3356
3380
  disabled: !hasAnyActiveFilterLocal.value,
3357
- onClick: vue.withModifiers(handleClearAllFilters, ["stop"]),
3358
- title: "Clear all filters"
3359
- }, _hoisted_14$1, 10, _hoisted_12$1)) : vue.createCommentVNode("", true)
3381
+ onClick: vue.withModifiers(handleClearAllFilters, ["stop"])
3382
+ }, _hoisted_14$1, 10, _hoisted_12$1)), [
3383
+ [vue.unref(tooltipDirective), "Clear all filters"]
3384
+ ]) : vue.createCommentVNode("", true)
3360
3385
  ])) : vue.createCommentVNode("", true)
3361
3386
  ], 4)) : vue.createCommentVNode("", true),
3362
3387
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.all.columns, (col, j) => {
@@ -89,3 +89,45 @@
89
89
  border-color: var(--primary, #3b82f6);
90
90
  color: var(--primary, #3b82f6);
91
91
  }
92
+
93
+ /* Tooltip styles */
94
+ .has-tooltip {
95
+ position: relative;
96
+ }
97
+ .has-tooltip::before,
98
+ .has-tooltip::after {
99
+ visibility: hidden;
100
+ opacity: 0;
101
+ pointer-events: none;
102
+ transition: opacity 0.2s ease, visibility 0.2s ease;
103
+ z-index: 9999;
104
+ }
105
+ .has-tooltip::before {
106
+ content: attr(data-tooltip);
107
+ position: absolute;
108
+ bottom: calc(100% + 6px);
109
+ left: 50%;
110
+ transform: translateX(-50%);
111
+ padding: 4px 8px;
112
+ background: #1f2937;
113
+ color: #fff;
114
+ font-size: 12px;
115
+ font-weight: 500;
116
+ white-space: nowrap;
117
+ border-radius: 4px;
118
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
119
+ }
120
+ .has-tooltip::after {
121
+ content: '';
122
+ position: absolute;
123
+ bottom: calc(100% + 2px);
124
+ left: 50%;
125
+ transform: translateX(-50%);
126
+ border: 4px solid transparent;
127
+ border-top-color: #1f2937;
128
+ }
129
+ .has-tooltip:hover::before,
130
+ .has-tooltip:hover::after {
131
+ visibility: visible;
132
+ opacity: 1;
133
+ }
@@ -2890,6 +2890,28 @@ function _sfc_render(_ctx, _cache) {
2890
2890
  return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
2891
2891
  }
2892
2892
  const iconFilter = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render]]);
2893
+ const tooltipDirective = {
2894
+ mounted(el, binding) {
2895
+ const text = binding.value || "";
2896
+ if (!text) return;
2897
+ el.setAttribute("data-tooltip", text);
2898
+ el.classList.add("has-tooltip");
2899
+ },
2900
+ updated(el, binding) {
2901
+ const text = binding.value || "";
2902
+ if (text) {
2903
+ el.setAttribute("data-tooltip", text);
2904
+ el.classList.add("has-tooltip");
2905
+ } else {
2906
+ el.removeAttribute("data-tooltip");
2907
+ el.classList.remove("has-tooltip");
2908
+ }
2909
+ },
2910
+ unmounted(el) {
2911
+ el.removeAttribute("data-tooltip");
2912
+ el.classList.remove("has-tooltip");
2913
+ }
2914
+ };
2893
2915
  const _hoisted_1$1 = { key: "hdrrow" };
2894
2916
  const _hoisted_2$1 = { class: "bh-checkbox" };
2895
2917
  const _hoisted_3$1 = {
@@ -3296,16 +3318,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3296
3318
  ])
3297
3319
  ]),
3298
3320
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "checkbox" ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
3299
- props.showClearAllButton ? (openBlock(), createElementBlock("button", {
3321
+ props.showClearAllButton ? withDirectives((openBlock(), createElementBlock("button", {
3300
3322
  key: 0,
3301
3323
  type: "button",
3302
3324
  class: normalizeClass(["bh-clear-all-button", {
3303
3325
  "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3304
3326
  }]),
3305
3327
  disabled: !hasAnyActiveFilterLocal.value,
3306
- onClick: withModifiers(handleClearAllFilters, ["stop"]),
3307
- title: "Clear all filters"
3308
- }, _hoisted_6$1, 10, _hoisted_4$1)) : createCommentVNode("", true)
3328
+ onClick: withModifiers(handleClearAllFilters, ["stop"])
3329
+ }, _hoisted_6$1, 10, _hoisted_4$1)), [
3330
+ [unref(tooltipDirective), "Clear all filters"]
3331
+ ]) : createCommentVNode("", true)
3309
3332
  ])) : createCommentVNode("", true)
3310
3333
  ], 6)) : createCommentVNode("", true),
3311
3334
  props.all.hasRightPanel ? (openBlock(), createElementBlock("th", {
@@ -3321,16 +3344,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3321
3344
  })
3322
3345
  }, [
3323
3346
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "rightpanel" ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
3324
- props.showClearAllButton ? (openBlock(), createElementBlock("button", {
3347
+ props.showClearAllButton ? withDirectives((openBlock(), createElementBlock("button", {
3325
3348
  key: 0,
3326
3349
  type: "button",
3327
3350
  class: normalizeClass(["bh-clear-all-button", {
3328
3351
  "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3329
3352
  }]),
3330
3353
  disabled: !hasAnyActiveFilterLocal.value,
3331
- onClick: withModifiers(handleClearAllFilters, ["stop"]),
3332
- title: "Clear all filters"
3333
- }, _hoisted_10$1, 10, _hoisted_8$1)) : createCommentVNode("", true)
3354
+ onClick: withModifiers(handleClearAllFilters, ["stop"])
3355
+ }, _hoisted_10$1, 10, _hoisted_8$1)), [
3356
+ [unref(tooltipDirective), "Clear all filters"]
3357
+ ]) : createCommentVNode("", true)
3334
3358
  ])) : createCommentVNode("", true)
3335
3359
  ], 6)) : createCommentVNode("", true),
3336
3360
  props.all.hasSubtable ? (openBlock(), createElementBlock("th", {
@@ -3346,16 +3370,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3346
3370
  expandall: props.all.expandall
3347
3371
  }, null, 8, ["expandedrows", "expandall"])) : createCommentVNode("", true),
3348
3372
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "subtable" ? (openBlock(), createElementBlock("div", _hoisted_11$1, [
3349
- props.showClearAllButton ? (openBlock(), createElementBlock("button", {
3373
+ props.showClearAllButton ? withDirectives((openBlock(), createElementBlock("button", {
3350
3374
  key: 0,
3351
3375
  type: "button",
3352
3376
  class: normalizeClass(["bh-clear-all-button", {
3353
3377
  "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3354
3378
  }]),
3355
3379
  disabled: !hasAnyActiveFilterLocal.value,
3356
- onClick: withModifiers(handleClearAllFilters, ["stop"]),
3357
- title: "Clear all filters"
3358
- }, _hoisted_14$1, 10, _hoisted_12$1)) : createCommentVNode("", true)
3380
+ onClick: withModifiers(handleClearAllFilters, ["stop"])
3381
+ }, _hoisted_14$1, 10, _hoisted_12$1)), [
3382
+ [unref(tooltipDirective), "Clear all filters"]
3383
+ ]) : createCommentVNode("", true)
3359
3384
  ])) : createCommentVNode("", true)
3360
3385
  ], 4)) : createCommentVNode("", true),
3361
3386
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.all.columns, (col, j) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolusoft/vue3-datatable",
3
- "version": "1.8.32",
3
+ "version": "1.8.35",
4
4
  "description": "Vue3 Datatable - fully customizable & easy to use datatable library",
5
5
  "private": false,
6
6
  "type": "module",