@citruslime/ui 4.0.2-beta.16 → 4.0.2-beta.18
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon } from "@iconify/vue";
|
|
2
2
|
import { defineComponent, ref, createElementBlock, openBlock, renderSlot, normalizeProps, guardReactiveProps, Fragment, createElementVNode, normalizeClass, createVNode, unref, Transition, withCtx, withDirectives, mergeProps, vShow, createBlock, Teleport, renderList, toDisplayString, createCommentVNode, computed, createTextVNode, mergeModels, useModel, watch, createSlots, vModelDynamic, shallowRef, toValue, toRefs, withKeys, onMounted, onUnmounted, withModifiers, nextTick, useAttrs, resolveComponent, inject, vModelCheckbox, watchEffect, vModelText, useCssVars, toHandlers, normalizeStyle, isRef, useSlots, provide } from "vue";
|
|
3
3
|
import { generateStringId, highlightText, isTouchDevice, validateEmail as validateEmail$1, escapeStringForRegExp } from "@citruslime/utils";
|
|
4
|
-
import { useFocusWithin, onKeyDown, toArray, unrefElement, tryOnScopeDispose, onClickOutside, useBreakpoints, breakpointsTailwind, useTimeoutFn, useMouseInElement,
|
|
4
|
+
import { useFocusWithin, onKeyDown, toArray, unrefElement, tryOnScopeDispose, onClickOutside, useBreakpoints, breakpointsTailwind, useTimeoutFn, useMouseInElement, useMediaQuery, useThrottle, useDebounceFn, useMouse, useDraggable, defaultDocument, tryOnMounted, useThrottleFn, useWindowSize, useElementSize, useElementBounding } from "@vueuse/core";
|
|
5
5
|
import { useI18n, createI18n } from "vue-i18n";
|
|
6
6
|
import { createFocusTrap } from "focus-trap";
|
|
7
7
|
import { copy } from "@citruslime/vue-utils";
|
|
@@ -2377,7 +2377,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2377
2377
|
}
|
|
2378
2378
|
function formatString() {
|
|
2379
2379
|
let value = props.data[props.column.field];
|
|
2380
|
-
if (!value) {
|
|
2380
|
+
if (!value || typeof value !== "string") {
|
|
2381
2381
|
return "";
|
|
2382
2382
|
}
|
|
2383
2383
|
if (props.column.maxLength) {
|
|
@@ -2412,7 +2412,10 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2412
2412
|
}
|
|
2413
2413
|
return (_ctx, _cache) => {
|
|
2414
2414
|
var _a;
|
|
2415
|
-
return _ctx.column.type === "slot" ? renderSlot(_ctx.$slots, _ctx.column.name, {
|
|
2415
|
+
return _ctx.column.type === "slot" ? renderSlot(_ctx.$slots, _ctx.column.name, {
|
|
2416
|
+
key: 0,
|
|
2417
|
+
formattedStringContent: formatString()
|
|
2418
|
+
}) : _ctx.column.type === "boolean" && _ctx.column.field !== void 0 ? (openBlock(), createBlock(clUiInputCheckbox, {
|
|
2416
2419
|
key: 1,
|
|
2417
2420
|
id: `checkbox-${_ctx.column.field}-${_ctx.rowIndex}`,
|
|
2418
2421
|
readonly: true,
|
|
@@ -2515,11 +2518,12 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
2515
2518
|
"search-value": _ctx.searchValue,
|
|
2516
2519
|
"row-index": _ctx.rowIndex
|
|
2517
2520
|
}, {
|
|
2518
|
-
[_ctx.column.name]: withCtx(() => [
|
|
2521
|
+
[_ctx.column.name]: withCtx(({ formattedStringContent }) => [
|
|
2519
2522
|
renderSlot(_ctx.$slots, _ctx.column.name, normalizeProps(guardReactiveProps({
|
|
2520
2523
|
column: _ctx.column,
|
|
2521
2524
|
record: _ctx.data,
|
|
2522
|
-
searchValue: _ctx.searchValue
|
|
2525
|
+
searchValue: _ctx.searchValue,
|
|
2526
|
+
formattedStringContent
|
|
2523
2527
|
})))
|
|
2524
2528
|
]),
|
|
2525
2529
|
_: 2
|
|
@@ -2532,8 +2536,13 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
2532
2536
|
"search-value": _ctx.searchValue,
|
|
2533
2537
|
"row-index": _ctx.rowIndex
|
|
2534
2538
|
}, {
|
|
2535
|
-
[_ctx.column.name]: withCtx(() => [
|
|
2536
|
-
renderSlot(_ctx.$slots, _ctx.column.name, normalizeProps(guardReactiveProps({
|
|
2539
|
+
[_ctx.column.name]: withCtx(({ formattedStringContent }) => [
|
|
2540
|
+
renderSlot(_ctx.$slots, _ctx.column.name, normalizeProps(guardReactiveProps({
|
|
2541
|
+
column: _ctx.column,
|
|
2542
|
+
record: _ctx.data,
|
|
2543
|
+
searchValue: _ctx.searchValue,
|
|
2544
|
+
formattedStringContent
|
|
2545
|
+
})))
|
|
2537
2546
|
]),
|
|
2538
2547
|
_: 2
|
|
2539
2548
|
}, 1032, ["column", "data", "time-zone", "search-value", "row-index"]))
|
|
@@ -3602,6 +3611,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3602
3611
|
setup(__props, { emit: __emit }) {
|
|
3603
3612
|
const props = __props;
|
|
3604
3613
|
const emit = __emit;
|
|
3614
|
+
const isMediumScreen = useMediaQuery("(max-height: 911px)");
|
|
3605
3615
|
const { t: t2 } = useI18n();
|
|
3606
3616
|
const quickDateGroups = computed(() => {
|
|
3607
3617
|
const groups = [];
|
|
@@ -3636,19 +3646,25 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3636
3646
|
return (_ctx, _cache) => {
|
|
3637
3647
|
return openBlock(), createElementBlock("div", _hoisted_1$G, [
|
|
3638
3648
|
createElementVNode("div", null, toDisplayString(unref(t2)("quickDates.quickDatesHeader")), 1),
|
|
3639
|
-
(
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
},
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3649
|
+
createElementVNode("div", {
|
|
3650
|
+
class: normalizeClass({
|
|
3651
|
+
"cl:max-h-[100px] cl:overflow-y-auto": unref(isMediumScreen)
|
|
3652
|
+
})
|
|
3653
|
+
}, [
|
|
3654
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(quickDateGroups.value, (group, index2) => {
|
|
3655
|
+
return openBlock(), createElementBlock("div", {
|
|
3656
|
+
key: index2,
|
|
3657
|
+
class: "cl:pt-2"
|
|
3658
|
+
}, [
|
|
3659
|
+
createVNode(_sfc_main$S, {
|
|
3660
|
+
dates: group,
|
|
3661
|
+
"selected-quick-date": _ctx.selectedQuickDate,
|
|
3662
|
+
onQuickDateSelected: _cache[0] || (_cache[0] = ($event) => emit("quick-date-selected", $event))
|
|
3663
|
+
}, null, 8, ["dates", "selected-quick-date"]),
|
|
3664
|
+
index2 < quickDateGroups.value.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_2$v)) : createCommentVNode("", true)
|
|
3665
|
+
]);
|
|
3666
|
+
}), 128))
|
|
3667
|
+
], 2)
|
|
3652
3668
|
]);
|
|
3653
3669
|
};
|
|
3654
3670
|
}
|