@citruslime/ui 4.1.0-beta.23 → 4.1.0-beta.25

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.
@@ -4215,12 +4215,21 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4215
4215
  return result;
4216
4216
  },
4217
4217
  set(value) {
4218
- if (props.type === "time") {
4219
- model.value = value;
4220
- } else if (value !== null) {
4221
- model.value = convertDateToIsoString(value, null, false, props.timeZone);
4218
+ if (!props.required && calendar.value?.inputValue && !value && model.value) {
4219
+ calendar.value.updateValue(model.value, {
4220
+ clearIfEqual: false,
4221
+ formatInput: true,
4222
+ hidePopover: true,
4223
+ moveToValue: true
4224
+ });
4222
4225
  } else {
4223
- model.value = null;
4226
+ if (props.type === "time") {
4227
+ model.value = value;
4228
+ } else if (value !== null) {
4229
+ model.value = convertDateToIsoString(value, null, false, props.timeZone);
4230
+ } else {
4231
+ model.value = null;
4232
+ }
4224
4233
  }
4225
4234
  }
4226
4235
  });
@@ -5409,6 +5418,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5409
5418
  setup(__props, { emit: __emit }) {
5410
5419
  const props = __props;
5411
5420
  const emit = __emit;
5421
+ const dateFormatLocale = inject(gridDateFormatLocaleOverride);
5412
5422
  const { t: t2, locale: locale2 } = useI18n();
5413
5423
  function getDefaultFilterOperation() {
5414
5424
  return isListColumn.value && props.column.listMode === "multi" ? FilterOperation.OR_EQUAL : props.column.type === "string" || props.column.slotType === "string" ? FilterOperation.CONTAINS : props.column.type === "datetime" || props.column.slotType === "datetime" || props.column.type === "date" || props.column.slotType === "date" ? FilterOperation.LESS_THAN : FilterOperation.EQUAL;
@@ -5801,13 +5811,14 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5801
5811
  id: `${unref(gridId)}-${_ctx.column.name}`,
5802
5812
  "model-value": currentDateFilterValue.value,
5803
5813
  "time-zone": _ctx.timeZone,
5814
+ "date-format-locale": unref(dateFormatLocale),
5804
5815
  type: _ctx.column.type === "slot" ? _ctx.column.slotType : _ctx.column.type,
5805
5816
  class: "cl:border-none cl:h-[2rem]! cl:lg:text-base! cl:mb-0 cl:pb-1 cl:text-xs cl:w-full readonly-filter",
5806
5817
  readonly: _ctx.loading,
5807
5818
  "popover-placement": "bottom-start",
5808
5819
  placeholder: "",
5809
5820
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => setFilter(null, $event ?? ""))
5810
- }, null, 8, ["id", "model-value", "time-zone", "type", "readonly"])
5821
+ }, null, 8, ["id", "model-value", "time-zone", "date-format-locale", "type", "readonly"])
5811
5822
  ])) : isDateRangeColumn.value ? (openBlock(), createElementBlock("div", {
5812
5823
  key: 2,
5813
5824
  class: "cl:w-full",
@@ -5820,9 +5831,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5820
5831
  "time-zone": _ctx.headerDisplayTimezone,
5821
5832
  "quick-date-scope": _ctx.quickDateScope,
5822
5833
  "manual-date-selection": true,
5834
+ "date-format-locale": unref(dateFormatLocale),
5823
5835
  "popover-placement": "bottom-start",
5824
5836
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => setDateRangeFilter($event))
5825
- }, null, 8, ["id", "model-value", "time-zone", "quick-date-scope"])
5837
+ }, null, 8, ["id", "model-value", "time-zone", "quick-date-scope", "date-format-locale"])
5826
5838
  ], 8, _hoisted_2$o)) : _ctx.column.type === "number" || _ctx.column.type === "slot" && _ctx.column.slotType === "number" ? (openBlock(), createElementBlock("div", _hoisted_3$g, [
5827
5839
  createVNode(_sfc_main$U, {
5828
5840
  id: `${unref(gridId)}-${_ctx.column.name}`,
@@ -5904,7 +5916,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5904
5916
  };
5905
5917
  }
5906
5918
  });
5907
- const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-c5ef8bbf"]]);
5919
+ const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-90f47059"]]);
5908
5920
  const _hoisted_1$y = { key: 1 };
5909
5921
  const _sfc_main$F = /* @__PURE__ */ defineComponent({
5910
5922
  __name: "cl-ui-grid-filter",