@alexochihua/exos-library-components 2.25.32 → 2.25.34
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.
|
@@ -33805,9 +33805,9 @@ const ECollapsevue_type_script_setup_true_lang_js_hoisted_9 = {
|
|
|
33805
33805
|
"data-testid": "collapse-cy",
|
|
33806
33806
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(mainClass.value),
|
|
33807
33807
|
onClick: toggleCollapse
|
|
33808
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "iconLeft")]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_4, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", {
|
|
33808
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "iconLeft")]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_4, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "header-section", {}, () => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", {
|
|
33809
33809
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(titleText.value)
|
|
33810
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.text), 3), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.unref)(slots).description ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "description", {
|
|
33810
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.text), 3)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.unref)(slots).description ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "description", {
|
|
33811
33811
|
key: 0
|
|
33812
33812
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_5, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.unref)(slots).rightSection ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_6, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "rightSection")])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), expandIcon.value.show ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_e_icon, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.mergeProps)({
|
|
33813
33813
|
key: 1
|
|
@@ -51316,6 +51316,14 @@ const dayStyleBlock = 'exos-opacity-10 dark:exos-opacity-20 exos-cursor-not-allo
|
|
|
51316
51316
|
requiredMessage: {
|
|
51317
51317
|
type: String,
|
|
51318
51318
|
default: 'El campo %label% es requerido'
|
|
51319
|
+
},
|
|
51320
|
+
/**
|
|
51321
|
+
* Mensaje que se muestra cuando la fecha escrita o seleccionada no es válida (formato o fecha inexistente)
|
|
51322
|
+
* @values 'Error, no es una fecha valida' - mensaje por defecto, 'Introduce una fecha correcta' - ejemplo personalizado
|
|
51323
|
+
*/
|
|
51324
|
+
invalidDateMessage: {
|
|
51325
|
+
type: String,
|
|
51326
|
+
default: 'Error, no es una fecha valida'
|
|
51319
51327
|
}
|
|
51320
51328
|
},
|
|
51321
51329
|
emits: [
|
|
@@ -51353,7 +51361,7 @@ const dayStyleBlock = 'exos-opacity-10 dark:exos-opacity-20 exos-cursor-not-allo
|
|
|
51353
51361
|
const yearSelector = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
51354
51362
|
const currentDate = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(DateTime.local());
|
|
51355
51363
|
const isInValid = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
51356
|
-
const messageRule = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)('
|
|
51364
|
+
const messageRule = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)('');
|
|
51357
51365
|
const isInputFocused = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
51358
51366
|
const isLabelFloatedVisual = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => !!props.modelValue || isInputFocused.value || hasMeaningfulPlaceholder.value);
|
|
51359
51367
|
const isTodayBlocked = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
@@ -51815,7 +51823,7 @@ const dayStyleBlock = 'exos-opacity-10 dark:exos-opacity-20 exos-cursor-not-allo
|
|
|
51815
51823
|
zone: 'local'
|
|
51816
51824
|
});
|
|
51817
51825
|
isInValid.value = !formattedDate.isValid;
|
|
51818
|
-
messageRule.value = isInValid.value ?
|
|
51826
|
+
messageRule.value = isInValid.value ? props.invalidDateMessage : '';
|
|
51819
51827
|
if (formattedDate.isValid) {
|
|
51820
51828
|
let fechaActual = formattedDate.startOf('day');
|
|
51821
51829
|
if (props.dateToStart) {
|
|
@@ -55394,6 +55402,9 @@ const _hoisted_20 = {
|
|
|
55394
55402
|
};
|
|
55395
55403
|
|
|
55396
55404
|
|
|
55405
|
+
const ESTIMATED_OPTION_ROW_PX = 44;
|
|
55406
|
+
|
|
55407
|
+
// Lazy load state (solo cuando lazyOptions está definido)
|
|
55397
55408
|
const DROPDOWN_GAP_PX = 8;
|
|
55398
55409
|
/** Gap entre el dropdown y el trigger cuando abre hacia arriba, para que el label quede siempre visible. */
|
|
55399
55410
|
const DROPDOWN_LABEL_GAP_PX = 8;
|
|
@@ -55887,8 +55898,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
55887
55898
|
*/
|
|
55888
55899
|
const clickOutsideIgnore = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)([]);
|
|
55889
55900
|
let scrollResizeCleanup = null;
|
|
55890
|
-
|
|
55891
|
-
// Lazy load state (solo cuando lazyOptions está definido)
|
|
55901
|
+
let dropdownResizeObserverCleanup = null;
|
|
55892
55902
|
const lazyOptionsList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)([]);
|
|
55893
55903
|
const isLoadingLazy = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
55894
55904
|
const page = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(1);
|
|
@@ -56208,6 +56218,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56208
56218
|
});
|
|
56209
56219
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.onBeforeUnmount)(() => {
|
|
56210
56220
|
window.removeEventListener('resize', handleResize);
|
|
56221
|
+
disconnectDropdownResizeObserver();
|
|
56211
56222
|
if (scrollResizeCleanup) {
|
|
56212
56223
|
scrollResizeCleanup();
|
|
56213
56224
|
scrollResizeCleanup = null;
|
|
@@ -56290,10 +56301,55 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56290
56301
|
if (topSpace >= needHeight) return true;
|
|
56291
56302
|
return topSpace >= bottomSpace;
|
|
56292
56303
|
};
|
|
56304
|
+
const getMeasuredDropdownHeight = () => {
|
|
56305
|
+
const dropdownElement = contentSelect.value;
|
|
56306
|
+
if (!dropdownElement) {
|
|
56307
|
+
return 0;
|
|
56308
|
+
}
|
|
56309
|
+
const measuredHeight = Math.max(dropdownElement.offsetHeight, dropdownElement.scrollHeight, dropdownElement.getBoundingClientRect().height);
|
|
56310
|
+
return measuredHeight > 0 ? measuredHeight : 0;
|
|
56311
|
+
};
|
|
56312
|
+
const getDropdownHeightForPositioning = () => {
|
|
56313
|
+
const measuredHeight = getMeasuredDropdownHeight();
|
|
56314
|
+
if (measuredHeight > 0) {
|
|
56315
|
+
return measuredHeight;
|
|
56316
|
+
}
|
|
56317
|
+
const optionCount = displayOptionsForDropdown.value.length;
|
|
56318
|
+
if (optionCount > 0) {
|
|
56319
|
+
return Math.min(optionCount * ESTIMATED_OPTION_ROW_PX + 8, window.innerHeight * DROPDOWN_MAX_HEIGHT_VH);
|
|
56320
|
+
}
|
|
56321
|
+
return window.innerHeight * DROPDOWN_MAX_HEIGHT_VH;
|
|
56322
|
+
};
|
|
56323
|
+
const scheduleTeleportDropdownPositionUpdate = () => {
|
|
56324
|
+
if (!isSelectOpened.value || !useTeleport.value) {
|
|
56325
|
+
return;
|
|
56326
|
+
}
|
|
56327
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(() => {
|
|
56328
|
+
updateDropdownPositionFixed();
|
|
56329
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(updateDropdownPositionFixed);
|
|
56330
|
+
});
|
|
56331
|
+
};
|
|
56332
|
+
const disconnectDropdownResizeObserver = () => {
|
|
56333
|
+
if (dropdownResizeObserverCleanup) {
|
|
56334
|
+
dropdownResizeObserverCleanup();
|
|
56335
|
+
dropdownResizeObserverCleanup = null;
|
|
56336
|
+
}
|
|
56337
|
+
};
|
|
56338
|
+
const connectDropdownResizeObserver = () => {
|
|
56339
|
+
disconnectDropdownResizeObserver();
|
|
56340
|
+
if (!isSelectOpened.value || !useTeleport.value || typeof ResizeObserver === 'undefined' || !contentSelect.value) {
|
|
56341
|
+
return;
|
|
56342
|
+
}
|
|
56343
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
56344
|
+
updateDropdownPositionFixed();
|
|
56345
|
+
});
|
|
56346
|
+
resizeObserver.observe(contentSelect.value);
|
|
56347
|
+
dropdownResizeObserverCleanup = () => resizeObserver.disconnect();
|
|
56348
|
+
};
|
|
56293
56349
|
const calculateDropPositionY = () => {
|
|
56294
56350
|
if (isSelectOpened.value) {
|
|
56295
56351
|
const refComp = instance.refs[`mainSelectComp-${instance.uid}`];
|
|
56296
|
-
const dropdownHeight =
|
|
56352
|
+
const dropdownHeight = getDropdownHeightForPositioning();
|
|
56297
56353
|
const openAbove = refComp ? shouldOpenAbove({
|
|
56298
56354
|
referenceEl: refComp,
|
|
56299
56355
|
dropdownHeight,
|
|
@@ -56320,12 +56376,14 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56320
56376
|
const triggerEl = getTriggerEl();
|
|
56321
56377
|
if (!triggerEl) return;
|
|
56322
56378
|
const rect = triggerEl.getBoundingClientRect();
|
|
56323
|
-
const
|
|
56379
|
+
const measuredHeight = getMeasuredDropdownHeight();
|
|
56380
|
+
const heightForDirection = measuredHeight > 0 ? measuredHeight : getDropdownHeightForPositioning();
|
|
56324
56381
|
const openAbove = shouldOpenAbove({
|
|
56325
56382
|
referenceEl: triggerEl,
|
|
56326
|
-
dropdownHeight,
|
|
56383
|
+
dropdownHeight: heightForDirection,
|
|
56327
56384
|
useViewport: true
|
|
56328
56385
|
});
|
|
56386
|
+
const maxDropdownHeightVh = window.innerHeight * DROPDOWN_MAX_HEIGHT_VH;
|
|
56329
56387
|
const style = {
|
|
56330
56388
|
position: 'fixed',
|
|
56331
56389
|
left: rect.left + 'px',
|
|
@@ -56334,10 +56392,17 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56334
56392
|
maxWidth: rect.width + 'px',
|
|
56335
56393
|
zIndex: 9999
|
|
56336
56394
|
};
|
|
56395
|
+
showPosition.value = !openAbove;
|
|
56337
56396
|
if (openAbove) {
|
|
56338
|
-
|
|
56397
|
+
const spaceAbove = rect.top - DROPDOWN_LABEL_GAP_PX - DROPDOWN_GAP_PX;
|
|
56398
|
+
style.maxHeight = Math.min(maxDropdownHeightVh, Math.max(spaceAbove, 0)) + 'px';
|
|
56399
|
+
style.top = 'auto';
|
|
56400
|
+
style.bottom = window.innerHeight - rect.top + DROPDOWN_LABEL_GAP_PX + 'px';
|
|
56339
56401
|
} else {
|
|
56402
|
+
const spaceBelow = window.innerHeight - rect.bottom - DROPDOWN_GAP_PX;
|
|
56403
|
+
style.maxHeight = Math.min(maxDropdownHeightVh, Math.max(spaceBelow, 0)) + 'px';
|
|
56340
56404
|
style.top = rect.bottom + 'px';
|
|
56405
|
+
style.bottom = 'auto';
|
|
56341
56406
|
}
|
|
56342
56407
|
dropdownPositionFixed.value = style;
|
|
56343
56408
|
};
|
|
@@ -56790,17 +56855,24 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56790
56855
|
});
|
|
56791
56856
|
});
|
|
56792
56857
|
|
|
56858
|
+
// Recalcular posición al filtrar o cambiar opciones (Teleport + suggestion / lazy)
|
|
56859
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => [displayOptionsForDropdown.value.length, tempValueInput.value, isLoadingLazy.value], () => {
|
|
56860
|
+
scheduleTeleportDropdownPositionUpdate();
|
|
56861
|
+
});
|
|
56862
|
+
|
|
56793
56863
|
// Watch para Teleport: actualizar posición fixed y listeners scroll/resize
|
|
56794
56864
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => isSelectOpened.value, isOpen => {
|
|
56795
56865
|
if (scrollResizeCleanup) {
|
|
56796
56866
|
scrollResizeCleanup();
|
|
56797
56867
|
scrollResizeCleanup = null;
|
|
56798
56868
|
}
|
|
56869
|
+
disconnectDropdownResizeObserver();
|
|
56799
56870
|
if (isOpen && useTeleport.value) {
|
|
56800
56871
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(() => {
|
|
56801
56872
|
updateDropdownPositionFixed();
|
|
56802
56873
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(() => {
|
|
56803
56874
|
updateDropdownPositionFixed();
|
|
56875
|
+
connectDropdownResizeObserver();
|
|
56804
56876
|
});
|
|
56805
56877
|
const onScrollResize = () => {
|
|
56806
56878
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(updateDropdownPositionFixed);
|
|
@@ -33823,9 +33823,9 @@ const ECollapsevue_type_script_setup_true_lang_js_hoisted_9 = {
|
|
|
33823
33823
|
"data-testid": "collapse-cy",
|
|
33824
33824
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)(mainClass.value),
|
|
33825
33825
|
onClick: toggleCollapse
|
|
33826
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "iconLeft")]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_4, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p", {
|
|
33826
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "iconLeft")]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_4, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "header-section", {}, () => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p", {
|
|
33827
33827
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)(titleText.value)
|
|
33828
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(__props.text), 3), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.unref)(slots).description ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "description", {
|
|
33828
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(__props.text), 3)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.unref)(slots).description ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "description", {
|
|
33829
33829
|
key: 0
|
|
33830
33830
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_5, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.unref)(slots).rightSection ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", ECollapsevue_type_script_setup_true_lang_js_hoisted_6, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "rightSection")])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), expandIcon.value.show ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_e_icon, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.mergeProps)({
|
|
33831
33831
|
key: 1
|
|
@@ -51334,6 +51334,14 @@ const dayStyleBlock = 'exos-opacity-10 dark:exos-opacity-20 exos-cursor-not-allo
|
|
|
51334
51334
|
requiredMessage: {
|
|
51335
51335
|
type: String,
|
|
51336
51336
|
default: 'El campo %label% es requerido'
|
|
51337
|
+
},
|
|
51338
|
+
/**
|
|
51339
|
+
* Mensaje que se muestra cuando la fecha escrita o seleccionada no es válida (formato o fecha inexistente)
|
|
51340
|
+
* @values 'Error, no es una fecha valida' - mensaje por defecto, 'Introduce una fecha correcta' - ejemplo personalizado
|
|
51341
|
+
*/
|
|
51342
|
+
invalidDateMessage: {
|
|
51343
|
+
type: String,
|
|
51344
|
+
default: 'Error, no es una fecha valida'
|
|
51337
51345
|
}
|
|
51338
51346
|
},
|
|
51339
51347
|
emits: [
|
|
@@ -51371,7 +51379,7 @@ const dayStyleBlock = 'exos-opacity-10 dark:exos-opacity-20 exos-cursor-not-allo
|
|
|
51371
51379
|
const yearSelector = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
|
|
51372
51380
|
const currentDate = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(DateTime.local());
|
|
51373
51381
|
const isInValid = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
|
|
51374
|
-
const messageRule = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)('
|
|
51382
|
+
const messageRule = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)('');
|
|
51375
51383
|
const isInputFocused = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
|
|
51376
51384
|
const isLabelFloatedVisual = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => !!props.modelValue || isInputFocused.value || hasMeaningfulPlaceholder.value);
|
|
51377
51385
|
const isTodayBlocked = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
|
|
@@ -51833,7 +51841,7 @@ const dayStyleBlock = 'exos-opacity-10 dark:exos-opacity-20 exos-cursor-not-allo
|
|
|
51833
51841
|
zone: 'local'
|
|
51834
51842
|
});
|
|
51835
51843
|
isInValid.value = !formattedDate.isValid;
|
|
51836
|
-
messageRule.value = isInValid.value ?
|
|
51844
|
+
messageRule.value = isInValid.value ? props.invalidDateMessage : '';
|
|
51837
51845
|
if (formattedDate.isValid) {
|
|
51838
51846
|
let fechaActual = formattedDate.startOf('day');
|
|
51839
51847
|
if (props.dateToStart) {
|
|
@@ -55412,6 +55420,9 @@ const _hoisted_20 = {
|
|
|
55412
55420
|
};
|
|
55413
55421
|
|
|
55414
55422
|
|
|
55423
|
+
const ESTIMATED_OPTION_ROW_PX = 44;
|
|
55424
|
+
|
|
55425
|
+
// Lazy load state (solo cuando lazyOptions está definido)
|
|
55415
55426
|
const DROPDOWN_GAP_PX = 8;
|
|
55416
55427
|
/** Gap entre el dropdown y el trigger cuando abre hacia arriba, para que el label quede siempre visible. */
|
|
55417
55428
|
const DROPDOWN_LABEL_GAP_PX = 8;
|
|
@@ -55905,8 +55916,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
55905
55916
|
*/
|
|
55906
55917
|
const clickOutsideIgnore = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)([]);
|
|
55907
55918
|
let scrollResizeCleanup = null;
|
|
55908
|
-
|
|
55909
|
-
// Lazy load state (solo cuando lazyOptions está definido)
|
|
55919
|
+
let dropdownResizeObserverCleanup = null;
|
|
55910
55920
|
const lazyOptionsList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)([]);
|
|
55911
55921
|
const isLoadingLazy = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
|
|
55912
55922
|
const page = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(1);
|
|
@@ -56226,6 +56236,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56226
56236
|
});
|
|
56227
56237
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
56228
56238
|
window.removeEventListener('resize', handleResize);
|
|
56239
|
+
disconnectDropdownResizeObserver();
|
|
56229
56240
|
if (scrollResizeCleanup) {
|
|
56230
56241
|
scrollResizeCleanup();
|
|
56231
56242
|
scrollResizeCleanup = null;
|
|
@@ -56308,10 +56319,55 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56308
56319
|
if (topSpace >= needHeight) return true;
|
|
56309
56320
|
return topSpace >= bottomSpace;
|
|
56310
56321
|
};
|
|
56322
|
+
const getMeasuredDropdownHeight = () => {
|
|
56323
|
+
const dropdownElement = contentSelect.value;
|
|
56324
|
+
if (!dropdownElement) {
|
|
56325
|
+
return 0;
|
|
56326
|
+
}
|
|
56327
|
+
const measuredHeight = Math.max(dropdownElement.offsetHeight, dropdownElement.scrollHeight, dropdownElement.getBoundingClientRect().height);
|
|
56328
|
+
return measuredHeight > 0 ? measuredHeight : 0;
|
|
56329
|
+
};
|
|
56330
|
+
const getDropdownHeightForPositioning = () => {
|
|
56331
|
+
const measuredHeight = getMeasuredDropdownHeight();
|
|
56332
|
+
if (measuredHeight > 0) {
|
|
56333
|
+
return measuredHeight;
|
|
56334
|
+
}
|
|
56335
|
+
const optionCount = displayOptionsForDropdown.value.length;
|
|
56336
|
+
if (optionCount > 0) {
|
|
56337
|
+
return Math.min(optionCount * ESTIMATED_OPTION_ROW_PX + 8, window.innerHeight * DROPDOWN_MAX_HEIGHT_VH);
|
|
56338
|
+
}
|
|
56339
|
+
return window.innerHeight * DROPDOWN_MAX_HEIGHT_VH;
|
|
56340
|
+
};
|
|
56341
|
+
const scheduleTeleportDropdownPositionUpdate = () => {
|
|
56342
|
+
if (!isSelectOpened.value || !useTeleport.value) {
|
|
56343
|
+
return;
|
|
56344
|
+
}
|
|
56345
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
56346
|
+
updateDropdownPositionFixed();
|
|
56347
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(updateDropdownPositionFixed);
|
|
56348
|
+
});
|
|
56349
|
+
};
|
|
56350
|
+
const disconnectDropdownResizeObserver = () => {
|
|
56351
|
+
if (dropdownResizeObserverCleanup) {
|
|
56352
|
+
dropdownResizeObserverCleanup();
|
|
56353
|
+
dropdownResizeObserverCleanup = null;
|
|
56354
|
+
}
|
|
56355
|
+
};
|
|
56356
|
+
const connectDropdownResizeObserver = () => {
|
|
56357
|
+
disconnectDropdownResizeObserver();
|
|
56358
|
+
if (!isSelectOpened.value || !useTeleport.value || typeof ResizeObserver === 'undefined' || !contentSelect.value) {
|
|
56359
|
+
return;
|
|
56360
|
+
}
|
|
56361
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
56362
|
+
updateDropdownPositionFixed();
|
|
56363
|
+
});
|
|
56364
|
+
resizeObserver.observe(contentSelect.value);
|
|
56365
|
+
dropdownResizeObserverCleanup = () => resizeObserver.disconnect();
|
|
56366
|
+
};
|
|
56311
56367
|
const calculateDropPositionY = () => {
|
|
56312
56368
|
if (isSelectOpened.value) {
|
|
56313
56369
|
const refComp = instance.refs[`mainSelectComp-${instance.uid}`];
|
|
56314
|
-
const dropdownHeight =
|
|
56370
|
+
const dropdownHeight = getDropdownHeightForPositioning();
|
|
56315
56371
|
const openAbove = refComp ? shouldOpenAbove({
|
|
56316
56372
|
referenceEl: refComp,
|
|
56317
56373
|
dropdownHeight,
|
|
@@ -56338,12 +56394,14 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56338
56394
|
const triggerEl = getTriggerEl();
|
|
56339
56395
|
if (!triggerEl) return;
|
|
56340
56396
|
const rect = triggerEl.getBoundingClientRect();
|
|
56341
|
-
const
|
|
56397
|
+
const measuredHeight = getMeasuredDropdownHeight();
|
|
56398
|
+
const heightForDirection = measuredHeight > 0 ? measuredHeight : getDropdownHeightForPositioning();
|
|
56342
56399
|
const openAbove = shouldOpenAbove({
|
|
56343
56400
|
referenceEl: triggerEl,
|
|
56344
|
-
dropdownHeight,
|
|
56401
|
+
dropdownHeight: heightForDirection,
|
|
56345
56402
|
useViewport: true
|
|
56346
56403
|
});
|
|
56404
|
+
const maxDropdownHeightVh = window.innerHeight * DROPDOWN_MAX_HEIGHT_VH;
|
|
56347
56405
|
const style = {
|
|
56348
56406
|
position: 'fixed',
|
|
56349
56407
|
left: rect.left + 'px',
|
|
@@ -56352,10 +56410,17 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56352
56410
|
maxWidth: rect.width + 'px',
|
|
56353
56411
|
zIndex: 9999
|
|
56354
56412
|
};
|
|
56413
|
+
showPosition.value = !openAbove;
|
|
56355
56414
|
if (openAbove) {
|
|
56356
|
-
|
|
56415
|
+
const spaceAbove = rect.top - DROPDOWN_LABEL_GAP_PX - DROPDOWN_GAP_PX;
|
|
56416
|
+
style.maxHeight = Math.min(maxDropdownHeightVh, Math.max(spaceAbove, 0)) + 'px';
|
|
56417
|
+
style.top = 'auto';
|
|
56418
|
+
style.bottom = window.innerHeight - rect.top + DROPDOWN_LABEL_GAP_PX + 'px';
|
|
56357
56419
|
} else {
|
|
56420
|
+
const spaceBelow = window.innerHeight - rect.bottom - DROPDOWN_GAP_PX;
|
|
56421
|
+
style.maxHeight = Math.min(maxDropdownHeightVh, Math.max(spaceBelow, 0)) + 'px';
|
|
56358
56422
|
style.top = rect.bottom + 'px';
|
|
56423
|
+
style.bottom = 'auto';
|
|
56359
56424
|
}
|
|
56360
56425
|
dropdownPositionFixed.value = style;
|
|
56361
56426
|
};
|
|
@@ -56808,17 +56873,24 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
|
56808
56873
|
});
|
|
56809
56874
|
});
|
|
56810
56875
|
|
|
56876
|
+
// Recalcular posición al filtrar o cambiar opciones (Teleport + suggestion / lazy)
|
|
56877
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => [displayOptionsForDropdown.value.length, tempValueInput.value, isLoadingLazy.value], () => {
|
|
56878
|
+
scheduleTeleportDropdownPositionUpdate();
|
|
56879
|
+
});
|
|
56880
|
+
|
|
56811
56881
|
// Watch para Teleport: actualizar posición fixed y listeners scroll/resize
|
|
56812
56882
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => isSelectOpened.value, isOpen => {
|
|
56813
56883
|
if (scrollResizeCleanup) {
|
|
56814
56884
|
scrollResizeCleanup();
|
|
56815
56885
|
scrollResizeCleanup = null;
|
|
56816
56886
|
}
|
|
56887
|
+
disconnectDropdownResizeObserver();
|
|
56817
56888
|
if (isOpen && useTeleport.value) {
|
|
56818
56889
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
56819
56890
|
updateDropdownPositionFixed();
|
|
56820
56891
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
56821
56892
|
updateDropdownPositionFixed();
|
|
56893
|
+
connectDropdownResizeObserver();
|
|
56822
56894
|
});
|
|
56823
56895
|
const onScrollResize = () => {
|
|
56824
56896
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(updateDropdownPositionFixed);
|