@dolusoft/vue3-datatable 1.8.5 → 1.8.7

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.
@@ -2970,14 +2970,16 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
2970
2970
  "isOpenFilter",
2971
2971
  "isFooter",
2972
2972
  "checkAll",
2973
- "columnFilterLang"
2973
+ "columnFilterLang",
2974
+ "hasFilterDatetimeSlot"
2974
2975
  ],
2975
2976
  emits: [
2976
2977
  "selectAll",
2977
2978
  "sortChange",
2978
2979
  "filterChange",
2979
2980
  "toggleFilterMenu",
2980
- "clearColumnFilter"
2981
+ "clearColumnFilter",
2982
+ "filterDatetimeUpdate"
2981
2983
  ],
2982
2984
  setup(__props, { emit: __emit }) {
2983
2985
  const selectedAll = vue.ref(null);
@@ -3001,13 +3003,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3001
3003
  const setupColumnWatches = () => {
3002
3004
  var _a;
3003
3005
  if (!((_a = props.all) == null ? void 0 : _a.columns)) return;
3004
- console.log("🔵 [SETUP-WATCHES] Starting setup for", props.all.columns.length, "columns");
3005
3006
  props.all.columns.forEach((col) => {
3006
3007
  if (col.filter && col.field && !watchedFields.value.has(col.field)) {
3007
- console.log("🔵 [WATCH-INIT]", col.field, {
3008
- initialValue: col.value,
3009
- initialCondition: col.condition
3010
- });
3011
3008
  if (filterInputs.value[col.field] === void 0) {
3012
3009
  filterInputs.value[col.field] = col.value || "";
3013
3010
  }
@@ -3017,13 +3014,6 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3017
3014
  (newValue) => {
3018
3015
  const column = columnsMap.value.get(col.field);
3019
3016
  const currentCondition = columnConditions.value[col.field] || (column == null ? void 0 : column.condition);
3020
- console.log("🔴 [DEBOUNCE-FIRED]", {
3021
- field: col.field,
3022
- newValue,
3023
- columnConditionFromState: columnConditions.value[col.field],
3024
- columnConditionFromMap: column == null ? void 0 : column.condition,
3025
- resolvedCondition: currentCondition
3026
- });
3027
3017
  if (column) {
3028
3018
  if (column.type === "string" || column.type === "String") {
3029
3019
  column.value = typeof newValue === "string" ? newValue.trim() : newValue;
@@ -3035,13 +3025,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3035
3025
  } else if (column.value) {
3036
3026
  column.condition = "Equal";
3037
3027
  columnConditions.value[col.field] = column.condition;
3038
- console.log("🟡 [DEFAULT-CONDITION-SET]", col.field, column.condition);
3039
3028
  }
3040
- console.log("🟢 [AFTER-MUTATION]", {
3041
- field: col.field,
3042
- valueAfter: column.value,
3043
- conditionAfter: column.condition
3044
- });
3045
3029
  emit("filterChange");
3046
3030
  }
3047
3031
  },
@@ -3100,16 +3084,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3100
3084
  return condition;
3101
3085
  };
3102
3086
  const handleConditionChange = (field, condition) => {
3103
- console.log("🟠 [CONDITION-CHANGE]", { field, condition });
3104
3087
  const column = columnsMap.value.get(field);
3105
3088
  if (column) {
3106
3089
  column.condition = condition;
3107
3090
  columnConditions.value[field] = condition;
3108
- console.log("🟠 [CONDITION-UPDATED]", {
3109
- field,
3110
- newCondition: column.condition,
3111
- columnValue: column.value
3112
- });
3113
3091
  emit("filterChange");
3114
3092
  }
3115
3093
  };
@@ -3244,14 +3222,24 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3244
3222
  void 0,
3245
3223
  { number: true }
3246
3224
  ]
3247
- ]) : col.type === "date" || col.type === "DateTime" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
3248
- key: 2,
3249
- "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3250
- type: "date",
3251
- class: "bh-form-control"
3252
- }, null, 8, _hoisted_8$1)), [
3253
- [vue.vModelText, filterInputs.value[col.field]]
3254
- ]) : col.type === "bool" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
3225
+ ]) : col.type === "date" || col.type === "DateTime" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
3226
+ props.hasFilterDatetimeSlot ? vue.renderSlot(_ctx.$slots, "filter-datetime", {
3227
+ key: 0,
3228
+ column: col,
3229
+ value: filterInputs.value[col.field],
3230
+ updateValue: (val) => {
3231
+ filterInputs.value[col.field] = val;
3232
+ emit("filterDatetimeUpdate", col.field, val);
3233
+ }
3234
+ }) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
3235
+ key: 1,
3236
+ "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3237
+ type: "date",
3238
+ class: "bh-form-control"
3239
+ }, null, 8, _hoisted_8$1)), [
3240
+ [vue.vModelText, filterInputs.value[col.field]]
3241
+ ])
3242
+ ], 64)) : col.type === "bool" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
3255
3243
  key: 3,
3256
3244
  "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3257
3245
  class: "bh-form-control",
@@ -3292,16 +3280,27 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3292
3280
  void 0,
3293
3281
  { number: true }
3294
3282
  ]
3295
- ]) : col.type === "date" || col.type === "DateTime" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
3296
- key: 3,
3297
- "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3298
- type: "date",
3299
- class: vue.normalizeClass(["bh-form-control", {
3300
- "bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
3301
- }])
3302
- }, null, 10, _hoisted_17$1)), [
3303
- [vue.vModelText, filterInputs.value[col.field]]
3304
- ]) : col.type === "bool" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
3283
+ ]) : col.type === "date" || col.type === "DateTime" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
3284
+ props.hasFilterDatetimeSlot ? vue.renderSlot(_ctx.$slots, "filter-datetime", {
3285
+ key: 0,
3286
+ column: col,
3287
+ value: filterInputs.value[col.field],
3288
+ updateValue: (val) => {
3289
+ filterInputs.value[col.field] = val;
3290
+ emit("filterDatetimeUpdate", col.field, val);
3291
+ },
3292
+ hasLabel: hasConditionSet(col) && props.all.useNewColumnFilter
3293
+ }) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
3294
+ key: 1,
3295
+ "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3296
+ type: "date",
3297
+ class: vue.normalizeClass(["bh-form-control", {
3298
+ "bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
3299
+ }])
3300
+ }, null, 10, _hoisted_17$1)), [
3301
+ [vue.vModelText, filterInputs.value[col.field]]
3302
+ ])
3303
+ ], 64)) : col.type === "bool" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
3305
3304
  key: 4,
3306
3305
  "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3307
3306
  class: "bh-form-control",
@@ -3603,6 +3602,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
3603
3602
  setup(__props, { expose: __expose, emit: __emit }) {
3604
3603
  var _a, _b;
3605
3604
  const slots = vue.useSlots();
3605
+ const hasFilterDatetimeSlot = vue.computed(() => !!slots["filter-datetime"]);
3606
3606
  const props = __props;
3607
3607
  for (const item of props.columns || []) {
3608
3608
  const type = ((_a = item.type) == null ? void 0 : _a.toLowerCase()) || "string";
@@ -4161,10 +4161,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4161
4161
  }
4162
4162
  };
4163
4163
  const changeForServer = (changeType, isResetPage = false) => {
4164
- console.log(
4165
- "🔵 [CHANGE-FOR-SERVER] Props columns detail:",
4166
- props.columns.map((c) => ({ field: c.field, value: c.value, condition: c.condition }))
4167
- );
4168
4164
  if (props.isServerMode) {
4169
4165
  setDefaultCondition();
4170
4166
  const res = {
@@ -4177,10 +4173,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4177
4173
  column_filters: props.columns,
4178
4174
  change_type: changeType
4179
4175
  };
4180
- console.log(
4181
- "🔵 [EMITTING-CHANGE] Final column_filters:",
4182
- res.column_filters.map((c) => ({ field: c.field, value: c.value, condition: c.condition }))
4183
- );
4184
4176
  emit("change", res);
4185
4177
  }
4186
4178
  };
@@ -4419,12 +4411,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4419
4411
  isOpenFilter: isOpenFilter.value,
4420
4412
  checkAll: selectedAll.value,
4421
4413
  columnFilterLang: props.columnFilterLang,
4414
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4422
4415
  onSelectAll: selectAll,
4423
4416
  onSortChange: sortChange,
4424
4417
  onFilterChange: filterChange,
4425
4418
  onToggleFilterMenu: toggleFilterMenu,
4426
4419
  onClearColumnFilter: clearColumnFilter
4427
- }, null, 8, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang"])
4420
+ }, vue.createSlots({ _: 2 }, [
4421
+ hasFilterDatetimeSlot.value ? {
4422
+ name: "filter-datetime",
4423
+ fn: vue.withCtx((slotProps) => [
4424
+ vue.renderSlot(_ctx.$slots, "filter-datetime", vue.normalizeProps(vue.guardReactiveProps(slotProps)))
4425
+ ]),
4426
+ key: "0"
4427
+ } : void 0
4428
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot"])
4428
4429
  ], 2),
4429
4430
  vue.createElementVNode("tbody", null, [
4430
4431
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filterItems.value, (item, i) => {
@@ -4592,11 +4593,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4592
4593
  isOpenFilter: isOpenFilter.value,
4593
4594
  isFooter: true,
4594
4595
  checkAll: selectedAll.value,
4596
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4595
4597
  onSelectAll: selectAll,
4596
4598
  onSortChange: sortChange,
4597
4599
  onFilterChange: filterChange,
4598
4600
  onToggleFilterMenu: toggleFilterMenu
4599
- }, null, 8, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll"])
4601
+ }, vue.createSlots({ _: 2 }, [
4602
+ hasFilterDatetimeSlot.value ? {
4603
+ name: "filter-datetime",
4604
+ fn: vue.withCtx((slotProps) => [
4605
+ vue.renderSlot(_ctx.$slots, "filter-datetime", vue.normalizeProps(vue.guardReactiveProps(slotProps)))
4606
+ ]),
4607
+ key: "0"
4608
+ } : void 0
4609
+ ]), 1032, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "hasFilterDatetimeSlot"])
4600
4610
  ], 2)) : vue.createCommentVNode("", true)
4601
4611
  ], 2),
4602
4612
  currentLoader.value && _ctx.enableloadinganimation ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -4667,12 +4677,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4667
4677
  isOpenFilter: isOpenFilter.value,
4668
4678
  checkAll: selectedAll.value,
4669
4679
  columnFilterLang: props.columnFilterLang,
4680
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4670
4681
  onSelectAll: selectAll,
4671
4682
  onSortChange: sortChange,
4672
4683
  onFilterChange: filterChange,
4673
4684
  onToggleFilterMenu: toggleFilterMenu,
4674
4685
  onClearColumnFilter: clearColumnFilter
4675
- }, null, 8, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang"])
4686
+ }, vue.createSlots({ _: 2 }, [
4687
+ hasFilterDatetimeSlot.value ? {
4688
+ name: "filter-datetime",
4689
+ fn: vue.withCtx((slotProps) => [
4690
+ vue.renderSlot(_ctx.$slots, "filter-datetime", vue.normalizeProps(vue.guardReactiveProps(slotProps)))
4691
+ ]),
4692
+ key: "0"
4693
+ } : void 0
4694
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot"])
4676
4695
  ], 2),
4677
4696
  vue.createElementVNode("tbody", null, [
4678
4697
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filterItems.value, (item, i) => {
@@ -4849,11 +4868,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4849
4868
  isOpenFilter: isOpenFilter.value,
4850
4869
  isFooter: true,
4851
4870
  checkAll: selectedAll.value,
4871
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4852
4872
  onSelectAll: selectAll,
4853
4873
  onSortChange: sortChange,
4854
4874
  onFilterChange: filterChange,
4855
4875
  onToggleFilterMenu: toggleFilterMenu
4856
- }, null, 8, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll"])
4876
+ }, vue.createSlots({ _: 2 }, [
4877
+ hasFilterDatetimeSlot.value ? {
4878
+ name: "filter-datetime",
4879
+ fn: vue.withCtx((slotProps) => [
4880
+ vue.renderSlot(_ctx.$slots, "filter-datetime", vue.normalizeProps(vue.guardReactiveProps(slotProps)))
4881
+ ]),
4882
+ key: "0"
4883
+ } : void 0
4884
+ ]), 1032, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "hasFilterDatetimeSlot"])
4857
4885
  ], 2)) : vue.createCommentVNode("", true)
4858
4886
  ], 2),
4859
4887
  currentLoader.value && _ctx.enableloadinganimation ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -1,4 +1,4 @@
1
- import { isRef, onMounted, nextTick, getCurrentScope, onScopeDispose, unref, getCurrentInstance, watch, computed, ref, useSlots, onBeforeUnmount, provide, openBlock, createBlock, resolveDynamicComponent, inject, createElementBlock, normalizeStyle, renderSlot, h, defineComponent, toRef, Fragment, withModifiers, createVNode, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, withDirectives, renderList, vModelSelect, resolveComponent, createTextVNode, vModelText, vShow, withCtx, onUnmounted, vModelCheckbox } from "vue";
1
+ import { isRef, onMounted, nextTick, getCurrentScope, onScopeDispose, unref, getCurrentInstance, watch, computed, ref, useSlots, onBeforeUnmount, provide, openBlock, createBlock, resolveDynamicComponent, inject, createElementBlock, normalizeStyle, renderSlot, h, defineComponent, toRef, Fragment, withModifiers, createVNode, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, withDirectives, renderList, vModelSelect, resolveComponent, createTextVNode, vModelText, vShow, withCtx, onUnmounted, createSlots, normalizeProps, guardReactiveProps, vModelCheckbox } from "vue";
2
2
  function tryOnScopeDispose(fn) {
3
3
  if (getCurrentScope()) {
4
4
  onScopeDispose(fn);
@@ -2969,14 +2969,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2969
2969
  "isOpenFilter",
2970
2970
  "isFooter",
2971
2971
  "checkAll",
2972
- "columnFilterLang"
2972
+ "columnFilterLang",
2973
+ "hasFilterDatetimeSlot"
2973
2974
  ],
2974
2975
  emits: [
2975
2976
  "selectAll",
2976
2977
  "sortChange",
2977
2978
  "filterChange",
2978
2979
  "toggleFilterMenu",
2979
- "clearColumnFilter"
2980
+ "clearColumnFilter",
2981
+ "filterDatetimeUpdate"
2980
2982
  ],
2981
2983
  setup(__props, { emit: __emit }) {
2982
2984
  const selectedAll = ref(null);
@@ -3000,13 +3002,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3000
3002
  const setupColumnWatches = () => {
3001
3003
  var _a;
3002
3004
  if (!((_a = props.all) == null ? void 0 : _a.columns)) return;
3003
- console.log("🔵 [SETUP-WATCHES] Starting setup for", props.all.columns.length, "columns");
3004
3005
  props.all.columns.forEach((col) => {
3005
3006
  if (col.filter && col.field && !watchedFields.value.has(col.field)) {
3006
- console.log("🔵 [WATCH-INIT]", col.field, {
3007
- initialValue: col.value,
3008
- initialCondition: col.condition
3009
- });
3010
3007
  if (filterInputs.value[col.field] === void 0) {
3011
3008
  filterInputs.value[col.field] = col.value || "";
3012
3009
  }
@@ -3016,13 +3013,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3016
3013
  (newValue) => {
3017
3014
  const column = columnsMap.value.get(col.field);
3018
3015
  const currentCondition = columnConditions.value[col.field] || (column == null ? void 0 : column.condition);
3019
- console.log("🔴 [DEBOUNCE-FIRED]", {
3020
- field: col.field,
3021
- newValue,
3022
- columnConditionFromState: columnConditions.value[col.field],
3023
- columnConditionFromMap: column == null ? void 0 : column.condition,
3024
- resolvedCondition: currentCondition
3025
- });
3026
3016
  if (column) {
3027
3017
  if (column.type === "string" || column.type === "String") {
3028
3018
  column.value = typeof newValue === "string" ? newValue.trim() : newValue;
@@ -3034,13 +3024,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3034
3024
  } else if (column.value) {
3035
3025
  column.condition = "Equal";
3036
3026
  columnConditions.value[col.field] = column.condition;
3037
- console.log("🟡 [DEFAULT-CONDITION-SET]", col.field, column.condition);
3038
3027
  }
3039
- console.log("🟢 [AFTER-MUTATION]", {
3040
- field: col.field,
3041
- valueAfter: column.value,
3042
- conditionAfter: column.condition
3043
- });
3044
3028
  emit("filterChange");
3045
3029
  }
3046
3030
  },
@@ -3099,16 +3083,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3099
3083
  return condition;
3100
3084
  };
3101
3085
  const handleConditionChange = (field, condition) => {
3102
- console.log("🟠 [CONDITION-CHANGE]", { field, condition });
3103
3086
  const column = columnsMap.value.get(field);
3104
3087
  if (column) {
3105
3088
  column.condition = condition;
3106
3089
  columnConditions.value[field] = condition;
3107
- console.log("🟠 [CONDITION-UPDATED]", {
3108
- field,
3109
- newCondition: column.condition,
3110
- columnValue: column.value
3111
- });
3112
3090
  emit("filterChange");
3113
3091
  }
3114
3092
  };
@@ -3243,14 +3221,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3243
3221
  void 0,
3244
3222
  { number: true }
3245
3223
  ]
3246
- ]) : col.type === "date" || col.type === "DateTime" ? withDirectives((openBlock(), createElementBlock("input", {
3247
- key: 2,
3248
- "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3249
- type: "date",
3250
- class: "bh-form-control"
3251
- }, null, 8, _hoisted_8$1)), [
3252
- [vModelText, filterInputs.value[col.field]]
3253
- ]) : col.type === "bool" ? withDirectives((openBlock(), createElementBlock("select", {
3224
+ ]) : col.type === "date" || col.type === "DateTime" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
3225
+ props.hasFilterDatetimeSlot ? renderSlot(_ctx.$slots, "filter-datetime", {
3226
+ key: 0,
3227
+ column: col,
3228
+ value: filterInputs.value[col.field],
3229
+ updateValue: (val) => {
3230
+ filterInputs.value[col.field] = val;
3231
+ emit("filterDatetimeUpdate", col.field, val);
3232
+ }
3233
+ }) : withDirectives((openBlock(), createElementBlock("input", {
3234
+ key: 1,
3235
+ "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3236
+ type: "date",
3237
+ class: "bh-form-control"
3238
+ }, null, 8, _hoisted_8$1)), [
3239
+ [vModelText, filterInputs.value[col.field]]
3240
+ ])
3241
+ ], 64)) : col.type === "bool" ? withDirectives((openBlock(), createElementBlock("select", {
3254
3242
  key: 3,
3255
3243
  "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3256
3244
  class: "bh-form-control",
@@ -3291,16 +3279,27 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3291
3279
  void 0,
3292
3280
  { number: true }
3293
3281
  ]
3294
- ]) : col.type === "date" || col.type === "DateTime" ? withDirectives((openBlock(), createElementBlock("input", {
3295
- key: 3,
3296
- "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3297
- type: "date",
3298
- class: normalizeClass(["bh-form-control", {
3299
- "bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
3300
- }])
3301
- }, null, 10, _hoisted_17$1)), [
3302
- [vModelText, filterInputs.value[col.field]]
3303
- ]) : col.type === "bool" ? withDirectives((openBlock(), createElementBlock("select", {
3282
+ ]) : col.type === "date" || col.type === "DateTime" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
3283
+ props.hasFilterDatetimeSlot ? renderSlot(_ctx.$slots, "filter-datetime", {
3284
+ key: 0,
3285
+ column: col,
3286
+ value: filterInputs.value[col.field],
3287
+ updateValue: (val) => {
3288
+ filterInputs.value[col.field] = val;
3289
+ emit("filterDatetimeUpdate", col.field, val);
3290
+ },
3291
+ hasLabel: hasConditionSet(col) && props.all.useNewColumnFilter
3292
+ }) : withDirectives((openBlock(), createElementBlock("input", {
3293
+ key: 1,
3294
+ "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3295
+ type: "date",
3296
+ class: normalizeClass(["bh-form-control", {
3297
+ "bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
3298
+ }])
3299
+ }, null, 10, _hoisted_17$1)), [
3300
+ [vModelText, filterInputs.value[col.field]]
3301
+ ])
3302
+ ], 64)) : col.type === "bool" ? withDirectives((openBlock(), createElementBlock("select", {
3304
3303
  key: 4,
3305
3304
  "onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
3306
3305
  class: "bh-form-control",
@@ -3602,6 +3601,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3602
3601
  setup(__props, { expose: __expose, emit: __emit }) {
3603
3602
  var _a, _b;
3604
3603
  const slots = useSlots();
3604
+ const hasFilterDatetimeSlot = computed(() => !!slots["filter-datetime"]);
3605
3605
  const props = __props;
3606
3606
  for (const item of props.columns || []) {
3607
3607
  const type = ((_a = item.type) == null ? void 0 : _a.toLowerCase()) || "string";
@@ -4160,10 +4160,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4160
4160
  }
4161
4161
  };
4162
4162
  const changeForServer = (changeType, isResetPage = false) => {
4163
- console.log(
4164
- "🔵 [CHANGE-FOR-SERVER] Props columns detail:",
4165
- props.columns.map((c) => ({ field: c.field, value: c.value, condition: c.condition }))
4166
- );
4167
4163
  if (props.isServerMode) {
4168
4164
  setDefaultCondition();
4169
4165
  const res = {
@@ -4176,10 +4172,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4176
4172
  column_filters: props.columns,
4177
4173
  change_type: changeType
4178
4174
  };
4179
- console.log(
4180
- "🔵 [EMITTING-CHANGE] Final column_filters:",
4181
- res.column_filters.map((c) => ({ field: c.field, value: c.value, condition: c.condition }))
4182
- );
4183
4175
  emit("change", res);
4184
4176
  }
4185
4177
  };
@@ -4418,12 +4410,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4418
4410
  isOpenFilter: isOpenFilter.value,
4419
4411
  checkAll: selectedAll.value,
4420
4412
  columnFilterLang: props.columnFilterLang,
4413
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4421
4414
  onSelectAll: selectAll,
4422
4415
  onSortChange: sortChange,
4423
4416
  onFilterChange: filterChange,
4424
4417
  onToggleFilterMenu: toggleFilterMenu,
4425
4418
  onClearColumnFilter: clearColumnFilter
4426
- }, null, 8, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang"])
4419
+ }, createSlots({ _: 2 }, [
4420
+ hasFilterDatetimeSlot.value ? {
4421
+ name: "filter-datetime",
4422
+ fn: withCtx((slotProps) => [
4423
+ renderSlot(_ctx.$slots, "filter-datetime", normalizeProps(guardReactiveProps(slotProps)))
4424
+ ]),
4425
+ key: "0"
4426
+ } : void 0
4427
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot"])
4427
4428
  ], 2),
4428
4429
  createElementVNode("tbody", null, [
4429
4430
  (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i) => {
@@ -4591,11 +4592,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4591
4592
  isOpenFilter: isOpenFilter.value,
4592
4593
  isFooter: true,
4593
4594
  checkAll: selectedAll.value,
4595
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4594
4596
  onSelectAll: selectAll,
4595
4597
  onSortChange: sortChange,
4596
4598
  onFilterChange: filterChange,
4597
4599
  onToggleFilterMenu: toggleFilterMenu
4598
- }, null, 8, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll"])
4600
+ }, createSlots({ _: 2 }, [
4601
+ hasFilterDatetimeSlot.value ? {
4602
+ name: "filter-datetime",
4603
+ fn: withCtx((slotProps) => [
4604
+ renderSlot(_ctx.$slots, "filter-datetime", normalizeProps(guardReactiveProps(slotProps)))
4605
+ ]),
4606
+ key: "0"
4607
+ } : void 0
4608
+ ]), 1032, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "hasFilterDatetimeSlot"])
4599
4609
  ], 2)) : createCommentVNode("", true)
4600
4610
  ], 2),
4601
4611
  currentLoader.value && _ctx.enableloadinganimation ? (openBlock(), createElementBlock("div", {
@@ -4666,12 +4676,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4666
4676
  isOpenFilter: isOpenFilter.value,
4667
4677
  checkAll: selectedAll.value,
4668
4678
  columnFilterLang: props.columnFilterLang,
4679
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4669
4680
  onSelectAll: selectAll,
4670
4681
  onSortChange: sortChange,
4671
4682
  onFilterChange: filterChange,
4672
4683
  onToggleFilterMenu: toggleFilterMenu,
4673
4684
  onClearColumnFilter: clearColumnFilter
4674
- }, null, 8, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang"])
4685
+ }, createSlots({ _: 2 }, [
4686
+ hasFilterDatetimeSlot.value ? {
4687
+ name: "filter-datetime",
4688
+ fn: withCtx((slotProps) => [
4689
+ renderSlot(_ctx.$slots, "filter-datetime", normalizeProps(guardReactiveProps(slotProps)))
4690
+ ]),
4691
+ key: "0"
4692
+ } : void 0
4693
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot"])
4675
4694
  ], 2),
4676
4695
  createElementVNode("tbody", null, [
4677
4696
  (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i) => {
@@ -4848,11 +4867,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4848
4867
  isOpenFilter: isOpenFilter.value,
4849
4868
  isFooter: true,
4850
4869
  checkAll: selectedAll.value,
4870
+ hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4851
4871
  onSelectAll: selectAll,
4852
4872
  onSortChange: sortChange,
4853
4873
  onFilterChange: filterChange,
4854
4874
  onToggleFilterMenu: toggleFilterMenu
4855
- }, null, 8, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll"])
4875
+ }, createSlots({ _: 2 }, [
4876
+ hasFilterDatetimeSlot.value ? {
4877
+ name: "filter-datetime",
4878
+ fn: withCtx((slotProps) => [
4879
+ renderSlot(_ctx.$slots, "filter-datetime", normalizeProps(guardReactiveProps(slotProps)))
4880
+ ]),
4881
+ key: "0"
4882
+ } : void 0
4883
+ ]), 1032, ["currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "hasFilterDatetimeSlot"])
4856
4884
  ], 2)) : createCommentVNode("", true)
4857
4885
  ], 2),
4858
4886
  currentLoader.value && _ctx.enableloadinganimation ? (openBlock(), createElementBlock("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolusoft/vue3-datatable",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
4
4
  "description": "Vue3 Datatable - fully customizable & easy to use datatable library",
5
5
  "private": false,
6
6
  "type": "module",