@amirjalili1374/ui-kit 1.5.13 → 1.5.16
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/ui-kit.es.js
CHANGED
|
@@ -13125,58 +13125,42 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
|
|
|
13125
13125
|
const emit = __emit;
|
|
13126
13126
|
const selectedDate = computed({
|
|
13127
13127
|
get: () => {
|
|
13128
|
-
if (props.mode === "range" && Array.isArray(props.modelValue))
|
|
13129
|
-
|
|
13130
|
-
} else if (typeof props.modelValue === "string" && props.modelValue) {
|
|
13131
|
-
console.log("Passing Gregorian date to picker:", props.modelValue);
|
|
13128
|
+
if (props.mode === "range" && Array.isArray(props.modelValue)) return props.modelValue;
|
|
13129
|
+
if (typeof props.modelValue === "string" && props.modelValue) {
|
|
13132
13130
|
if (props.modelValue.includes("T")) {
|
|
13133
|
-
const
|
|
13134
|
-
|
|
13135
|
-
console.log("Converted to local date:", localDate);
|
|
13136
|
-
return localDate;
|
|
13131
|
+
const d = new Date(props.modelValue);
|
|
13132
|
+
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
13137
13133
|
}
|
|
13138
13134
|
return props.modelValue + "T00:00:00.000Z";
|
|
13139
13135
|
}
|
|
13140
13136
|
return props.modelValue;
|
|
13141
13137
|
},
|
|
13142
13138
|
set: (value2) => {
|
|
13143
|
-
console.log("selectedDate setter called with:", value2);
|
|
13144
13139
|
emit("update:modelValue", value2);
|
|
13145
13140
|
}
|
|
13146
13141
|
});
|
|
13147
13142
|
const onDateChange = (date) => {
|
|
13148
|
-
console.log("Date changed:", date);
|
|
13149
13143
|
if (props.mode === "range") {
|
|
13150
13144
|
if (Array.isArray(date) && date.length === 2) {
|
|
13151
|
-
const [
|
|
13152
|
-
|
|
13153
|
-
const gregorianEnd = endDate && endDate._isAMomentObject ? endDate.toISOString() : endDate;
|
|
13154
|
-
console.log("Range - Start:", gregorianStart, "End:", gregorianEnd);
|
|
13155
|
-
emit("update:modelValue", [gregorianStart, gregorianEnd]);
|
|
13145
|
+
const [start, end] = date;
|
|
13146
|
+
emit("update:modelValue", [(start == null ? void 0 : start._isAMomentObject) ? start.toISOString() : start, (end == null ? void 0 : end._isAMomentObject) ? end.toISOString() : end]);
|
|
13156
13147
|
} else {
|
|
13157
13148
|
emit("update:modelValue", null);
|
|
13158
13149
|
}
|
|
13159
13150
|
} else {
|
|
13160
|
-
if (date
|
|
13161
|
-
|
|
13162
|
-
console.log("Single date - Gregorian for server:", gregorianISO);
|
|
13163
|
-
emit("update:modelValue", gregorianISO);
|
|
13151
|
+
if ((date == null ? void 0 : date._isAMomentObject) && date.isValid()) {
|
|
13152
|
+
emit("update:modelValue", date.toISOString());
|
|
13164
13153
|
} else if (typeof date === "string") {
|
|
13165
|
-
|
|
13166
|
-
const gregorianISO = dateObj.toISOString();
|
|
13167
|
-
console.log("String date converted to ISO:", gregorianISO);
|
|
13168
|
-
emit("update:modelValue", gregorianISO);
|
|
13154
|
+
emit("update:modelValue", new Date(date).toISOString());
|
|
13169
13155
|
} else {
|
|
13170
13156
|
emit("update:modelValue", "");
|
|
13171
13157
|
}
|
|
13172
13158
|
}
|
|
13173
13159
|
};
|
|
13174
13160
|
const inputClass = computed(() => {
|
|
13175
|
-
const
|
|
13176
|
-
if (props.variant === "outlined")
|
|
13177
|
-
|
|
13178
|
-
}
|
|
13179
|
-
return classes.join(" ");
|
|
13161
|
+
const cls = ["v-text-field", "v-input", "v-input--density-comfortable"];
|
|
13162
|
+
if (props.variant === "outlined") cls.push("v-text-field--variant-outlined");
|
|
13163
|
+
return cls.join(" ");
|
|
13180
13164
|
});
|
|
13181
13165
|
const wrapperClass = computed(() => {
|
|
13182
13166
|
return "v-field v-field--variant-outlined v-field--density-comfortable";
|
|
@@ -13207,7 +13191,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
|
|
|
13207
13191
|
};
|
|
13208
13192
|
}
|
|
13209
13193
|
});
|
|
13210
|
-
const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-
|
|
13194
|
+
const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-f7e776e7"]]);
|
|
13211
13195
|
const _hoisted_1$a = { class: "mb-6" };
|
|
13212
13196
|
const _hoisted_2$6 = { class: "text-subtitle-1 font-weight-medium mb-3" };
|
|
13213
13197
|
const _hoisted_3$4 = { class: "theme-toggle-container" };
|