@alexochihua/exos-library-components 2.25.25 → 2.25.27
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.
|
@@ -34931,7 +34931,7 @@ function shared_watchWithFilter(source, cb, options = {}) {
|
|
|
34931
34931
|
eventFilter = shared_bypassFilter,
|
|
34932
34932
|
...watchOptions
|
|
34933
34933
|
} = options;
|
|
34934
|
-
return watch(source, shared_createFilterWrapper(eventFilter, cb), watchOptions);
|
|
34934
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(source, shared_createFilterWrapper(eventFilter, cb), watchOptions);
|
|
34935
34935
|
}
|
|
34936
34936
|
function watchPausable(source, cb, options = {}) {
|
|
34937
34937
|
const {
|
|
@@ -36233,18 +36233,18 @@ function useActiveElement(options = {}) {
|
|
|
36233
36233
|
return activeElement;
|
|
36234
36234
|
}
|
|
36235
36235
|
function useMounted() {
|
|
36236
|
-
const isMounted = ref(false);
|
|
36237
|
-
const instance = getCurrentInstance();
|
|
36236
|
+
const isMounted = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
36237
|
+
const instance = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.getCurrentInstance)();
|
|
36238
36238
|
if (instance) {
|
|
36239
|
-
onMounted(() => {
|
|
36239
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.onMounted)(() => {
|
|
36240
36240
|
isMounted.value = true;
|
|
36241
|
-
},
|
|
36241
|
+
}, vue_demi_lib_isVue2 ? null : instance);
|
|
36242
36242
|
}
|
|
36243
36243
|
return isMounted;
|
|
36244
36244
|
}
|
|
36245
36245
|
function useSupported(callback) {
|
|
36246
36246
|
const isMounted = useMounted();
|
|
36247
|
-
return computed(() => {
|
|
36247
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
36248
36248
|
isMounted.value;
|
|
36249
36249
|
return Boolean(callback());
|
|
36250
36250
|
});
|
|
@@ -38413,13 +38413,13 @@ function useIntersectionObserver(target, callback, options = {}) {
|
|
|
38413
38413
|
immediate = true
|
|
38414
38414
|
} = options;
|
|
38415
38415
|
const isSupported = useSupported(() => window && "IntersectionObserver" in window);
|
|
38416
|
-
const targets = computed(() => {
|
|
38417
|
-
const _target =
|
|
38418
|
-
return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(
|
|
38416
|
+
const targets = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
38417
|
+
const _target = shared_toValue(target);
|
|
38418
|
+
return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(shared_notNullish);
|
|
38419
38419
|
});
|
|
38420
|
-
let cleanup =
|
|
38421
|
-
const isActive = ref(immediate);
|
|
38422
|
-
const stopWatch = isSupported.value ? watch(() => [targets.value, unrefElement(root), isActive.value], ([targets2, root2]) => {
|
|
38420
|
+
let cleanup = shared_noop;
|
|
38421
|
+
const isActive = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(immediate);
|
|
38422
|
+
const stopWatch = isSupported.value ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => [targets.value, unrefElement(root), isActive.value], ([targets2, root2]) => {
|
|
38423
38423
|
cleanup();
|
|
38424
38424
|
if (!isActive.value) return;
|
|
38425
38425
|
if (!targets2.length) return;
|
|
@@ -38431,18 +38431,18 @@ function useIntersectionObserver(target, callback, options = {}) {
|
|
|
38431
38431
|
targets2.forEach(el => el && observer.observe(el));
|
|
38432
38432
|
cleanup = () => {
|
|
38433
38433
|
observer.disconnect();
|
|
38434
|
-
cleanup =
|
|
38434
|
+
cleanup = shared_noop;
|
|
38435
38435
|
};
|
|
38436
38436
|
}, {
|
|
38437
38437
|
immediate,
|
|
38438
38438
|
flush: "post"
|
|
38439
|
-
}) :
|
|
38439
|
+
}) : shared_noop;
|
|
38440
38440
|
const stop = () => {
|
|
38441
38441
|
cleanup();
|
|
38442
38442
|
stopWatch();
|
|
38443
38443
|
isActive.value = false;
|
|
38444
38444
|
};
|
|
38445
|
-
|
|
38445
|
+
shared_tryOnScopeDispose(stop);
|
|
38446
38446
|
return {
|
|
38447
38447
|
isSupported,
|
|
38448
38448
|
isActive,
|
|
@@ -54105,8 +54105,22 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
|
|
|
54105
54105
|
let digitIndex = 0;
|
|
54106
54106
|
const hiddenChar = props.hiddenChar || '*';
|
|
54107
54107
|
|
|
54108
|
-
//
|
|
54109
|
-
|
|
54108
|
+
// Índice del primer placeholder (# o hiddenChar) en el patrón
|
|
54109
|
+
let firstPlaceholderIndex = -1;
|
|
54110
|
+
for (let k = 0; k < pattern.length; k++) {
|
|
54111
|
+
if (pattern[k] === '#' || pattern[k] === hiddenChar) {
|
|
54112
|
+
firstPlaceholderIndex = k;
|
|
54113
|
+
break;
|
|
54114
|
+
}
|
|
54115
|
+
}
|
|
54116
|
+
|
|
54117
|
+
// Prefijo literal completo antes del primer placeholder (ej. "PROD-" en "PROD-##-#####")
|
|
54118
|
+
if (cleanValue.length > 0 && firstPlaceholderIndex > 0) {
|
|
54119
|
+
displayValue += pattern.substring(0, firstPlaceholderIndex);
|
|
54120
|
+
}
|
|
54121
|
+
|
|
54122
|
+
// Seguir el patrón exactamente desde el primer placeholder, insertando separadores según corresponda
|
|
54123
|
+
for (let i = firstPlaceholderIndex >= 0 ? firstPlaceholderIndex : 0; i < pattern.length; i++) {
|
|
54110
54124
|
const patternChar = pattern[i];
|
|
54111
54125
|
if (patternChar === '#') {
|
|
54112
54126
|
if (digitIndex < cleanValue.length) {
|
|
@@ -54121,8 +54135,7 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
|
|
|
54121
54135
|
digitIndex++;
|
|
54122
54136
|
} else {
|
|
54123
54137
|
// Es un separador - agregarlo solo si hay dígitos para mostrar
|
|
54124
|
-
|
|
54125
|
-
if (digitIndex > 0 || i === 0 && cleanValue.length > 0) {
|
|
54138
|
+
if (digitIndex > 0) {
|
|
54126
54139
|
displayValue += patternChar;
|
|
54127
54140
|
}
|
|
54128
54141
|
}
|
|
@@ -55279,16 +55292,49 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_9 = ["data-testid", "onC
|
|
|
55279
55292
|
const ESelectvue_type_script_setup_true_lang_js_hoisted_10 = ["onClick"];
|
|
55280
55293
|
const ESelectvue_type_script_setup_true_lang_js_hoisted_11 = {
|
|
55281
55294
|
key: 0,
|
|
55282
|
-
class: "e-
|
|
55295
|
+
class: "e-select__optionItem exos-px-3 exos-py-2 text-body-4"
|
|
55296
|
+
};
|
|
55297
|
+
const ESelectvue_type_script_setup_true_lang_js_hoisted_12 = {
|
|
55298
|
+
class: "e-select__optionItem exos-px-3 exos-py-2 text-body-4 exos-flex exos-items-center exos-gap-2"
|
|
55299
|
+
};
|
|
55300
|
+
const ESelectvue_type_script_setup_true_lang_js_hoisted_13 = {
|
|
55301
|
+
key: 3,
|
|
55302
|
+
class: "e-select__optionItem exos-px-3 exos-py-2 text-body-4"
|
|
55283
55303
|
};
|
|
55284
|
-
const ESelectvue_type_script_setup_true_lang_js_hoisted_12 = ["data-testid", "onClick"];
|
|
55285
|
-
const ESelectvue_type_script_setup_true_lang_js_hoisted_13 = ["onClick"];
|
|
55286
55304
|
const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
55305
|
+
key: 0,
|
|
55306
|
+
class: "e-select__groupContainer__primary__group"
|
|
55307
|
+
};
|
|
55308
|
+
const ESelectvue_type_script_setup_true_lang_js_hoisted_15 = ["data-testid", "onClick"];
|
|
55309
|
+
const ESelectvue_type_script_setup_true_lang_js_hoisted_16 = ["onClick"];
|
|
55310
|
+
const ESelectvue_type_script_setup_true_lang_js_hoisted_17 = {
|
|
55311
|
+
key: 0,
|
|
55312
|
+
class: "e-select__optionItem exos-px-3 exos-py-2 text-body-4"
|
|
55313
|
+
};
|
|
55314
|
+
const _hoisted_18 = {
|
|
55315
|
+
class: "e-select__optionItem exos-px-3 exos-py-2 text-body-4 exos-flex exos-items-center exos-gap-2"
|
|
55316
|
+
};
|
|
55317
|
+
const _hoisted_19 = {
|
|
55318
|
+
key: 3,
|
|
55319
|
+
class: "e-select__optionItem exos-px-3 exos-py-2 text-body-4"
|
|
55320
|
+
};
|
|
55321
|
+
const _hoisted_20 = {
|
|
55287
55322
|
key: 0,
|
|
55288
55323
|
class: "e-select--error-message exos-animate-slide-down"
|
|
55289
55324
|
};
|
|
55290
55325
|
|
|
55291
55326
|
|
|
55327
|
+
const DROPDOWN_GAP_PX = 8;
|
|
55328
|
+
/** Gap entre el dropdown y el trigger cuando abre hacia arriba, para que el label quede siempre visible. */
|
|
55329
|
+
const DROPDOWN_LABEL_GAP_PX = 8;
|
|
55330
|
+
const DROPDOWN_MAX_HEIGHT_VH = 0.4;
|
|
55331
|
+
|
|
55332
|
+
/**
|
|
55333
|
+
* Encuentra el primer ancestro con overflow-y auto/scroll (scroll-parent).
|
|
55334
|
+
* En modo Teleport el dropdown se posiciona respecto al viewport; sin Teleport,
|
|
55335
|
+
* usar el scroll-parent evita que el menú empuje el scroll del contenedor.
|
|
55336
|
+
*/
|
|
55337
|
+
|
|
55292
55338
|
/* harmony default export */ var ESelectvue_type_script_setup_true_lang_js = ({
|
|
55293
55339
|
__name: 'ESelect',
|
|
55294
55340
|
props: {
|
|
@@ -55576,7 +55622,9 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55576
55622
|
*/
|
|
55577
55623
|
dropdownAppendTo: {
|
|
55578
55624
|
type: String,
|
|
55579
|
-
default:
|
|
55625
|
+
default: () => {
|
|
55626
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.inject)('$exosSelectConfig')?.dropdownAppendTo ?? null;
|
|
55627
|
+
}
|
|
55580
55628
|
},
|
|
55581
55629
|
/**
|
|
55582
55630
|
* Dirección de apertura del dropdown de opciones.
|
|
@@ -55586,6 +55634,63 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55586
55634
|
type: String,
|
|
55587
55635
|
default: 'auto',
|
|
55588
55636
|
validator: value => ['up', 'down', 'auto'].includes(value)
|
|
55637
|
+
},
|
|
55638
|
+
/**
|
|
55639
|
+
* Callback para modo lazy load. Si está definido, el componente actúa como combobox asíncrono con paginación e infinite scroll.
|
|
55640
|
+
* Firma: (params: { query: string, page: number, limit: number }) => Promise<{ options: Array<{value, label}>, total: number }>
|
|
55641
|
+
* @values (params) => fetch('/api/options', { ... }).then(r => r.json())
|
|
55642
|
+
*/
|
|
55643
|
+
lazyOptions: {
|
|
55644
|
+
type: Function,
|
|
55645
|
+
default: null
|
|
55646
|
+
},
|
|
55647
|
+
/**
|
|
55648
|
+
* Índice/página en que empieza la paginación (modo lazy).
|
|
55649
|
+
* @values 1 - backend 1-based, 0 - backend 0-based
|
|
55650
|
+
*/
|
|
55651
|
+
lazyInitialPage: {
|
|
55652
|
+
type: Number,
|
|
55653
|
+
default: 1
|
|
55654
|
+
},
|
|
55655
|
+
/**
|
|
55656
|
+
* Límite de registros por página en modo lazy.
|
|
55657
|
+
* @values 20 - 20 por página, 50 - 50 por página
|
|
55658
|
+
*/
|
|
55659
|
+
pageSize: {
|
|
55660
|
+
type: Number,
|
|
55661
|
+
default: 50
|
|
55662
|
+
},
|
|
55663
|
+
/**
|
|
55664
|
+
* Texto mostrado durante la carga de opciones (modo lazy). Se usa en el contenido por defecto del slot lazyLoading (spinner + texto).
|
|
55665
|
+
* @values 'Cargando...' - por defecto
|
|
55666
|
+
*/
|
|
55667
|
+
loadingText: {
|
|
55668
|
+
type: String,
|
|
55669
|
+
default: 'Cargando...'
|
|
55670
|
+
},
|
|
55671
|
+
/**
|
|
55672
|
+
* Mensaje cuando no hay resultados (modo lazy). Customizable por prop.
|
|
55673
|
+
* @values 'No se encontraron resultados' - por defecto
|
|
55674
|
+
*/
|
|
55675
|
+
lazyEmptyText: {
|
|
55676
|
+
type: String,
|
|
55677
|
+
default: 'No se encontraron resultados'
|
|
55678
|
+
},
|
|
55679
|
+
/**
|
|
55680
|
+
* Mensaje al final de la lista cuando ya no hay más datos (modo lazy).
|
|
55681
|
+
* @values 'Ya se cargaron todos' - por defecto
|
|
55682
|
+
*/
|
|
55683
|
+
lazyAllLoadedText: {
|
|
55684
|
+
type: String,
|
|
55685
|
+
default: 'Ya se cargaron todos'
|
|
55686
|
+
},
|
|
55687
|
+
/**
|
|
55688
|
+
* Si true (default), el componente concatena las páginas; si false, el callback devuelve la lista completa y el componente reemplaza.
|
|
55689
|
+
* @values true - API devuelve solo página N, false - API devuelve lista acumulada
|
|
55690
|
+
*/
|
|
55691
|
+
lazyAccumulateInComponent: {
|
|
55692
|
+
type: Boolean,
|
|
55693
|
+
default: true
|
|
55589
55694
|
}
|
|
55590
55695
|
},
|
|
55591
55696
|
emits: [
|
|
@@ -55702,11 +55807,26 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55702
55807
|
*/
|
|
55703
55808
|
const clickOutsideIgnore = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)([]);
|
|
55704
55809
|
let scrollResizeCleanup = null;
|
|
55810
|
+
|
|
55811
|
+
// Lazy load state (solo cuando lazyOptions está definido)
|
|
55812
|
+
const lazyOptionsList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)([]);
|
|
55813
|
+
const isLoadingLazy = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
55814
|
+
const page = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(1);
|
|
55815
|
+
const total = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(0);
|
|
55816
|
+
const scrollSentinel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(null);
|
|
55705
55817
|
const MAX_LEN = {
|
|
55706
55818
|
time: 8,
|
|
55707
55819
|
timens: 5
|
|
55708
55820
|
};
|
|
55709
55821
|
const useTeleport = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => !!props.dropdownAppendTo);
|
|
55822
|
+
const isLazyMode = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => typeof props.lazyOptions === 'function');
|
|
55823
|
+
const hasMoreData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => isLazyMode.value ? lazyOptionsList.value.length < total.value : false);
|
|
55824
|
+
|
|
55825
|
+
/** Opciones a mostrar en el dropdown: en lazy mode la lista interna; si no, props.options o auxSuggestions */
|
|
55826
|
+
const displayOptionsForDropdown = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
55827
|
+
if (isLazyMode.value) return lazyOptionsList.value;
|
|
55828
|
+
return props.suggestion ? auxSuggestions.value : props.options;
|
|
55829
|
+
});
|
|
55710
55830
|
const teleportTarget = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
55711
55831
|
if (!props.dropdownAppendTo) return null;
|
|
55712
55832
|
const el = document.querySelector(props.dropdownAppendTo);
|
|
@@ -55902,10 +56022,11 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55902
56022
|
}
|
|
55903
56023
|
return auxLen;
|
|
55904
56024
|
});
|
|
56025
|
+
const optionsForLabelLookup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => isLazyMode.value ? lazyOptionsList.value : props.options);
|
|
55905
56026
|
const multipleLabelSelected = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
55906
56027
|
if (props.modelValue && Array.isArray(props.modelValue)) {
|
|
55907
56028
|
let label = props.modelValue.map(item => {
|
|
55908
|
-
let selectedOption =
|
|
56029
|
+
let selectedOption = optionsForLabelLookup.value.find(val => props.emitObject ? val.value === item.value : val.value === item);
|
|
55909
56030
|
return selectedOption ? selectedOption.label : '';
|
|
55910
56031
|
}).filter(Boolean).join(', ');
|
|
55911
56032
|
return label || props.modelValue;
|
|
@@ -55916,19 +56037,18 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55916
56037
|
const hasInfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
55917
56038
|
const currentValue = props.modelValue;
|
|
55918
56039
|
const validVal = currentValue !== null && currentValue !== undefined && currentValue !== '';
|
|
56040
|
+
const opts = optionsForLabelLookup.value;
|
|
55919
56041
|
switch (true) {
|
|
55920
56042
|
case props.multiple:
|
|
55921
|
-
// Si emitObject es verdadero, verificamos si alguno de los objetos en modelValue existe en options
|
|
55922
56043
|
if (props.emitObject && Array.isArray(currentValue)) {
|
|
55923
|
-
return currentValue?.some(item =>
|
|
56044
|
+
return currentValue?.some(item => opts.some(opt => opt.value === item.value));
|
|
55924
56045
|
}
|
|
55925
|
-
// Si emitObject es falso, simplemente verificamos si hay elementos en modelValue
|
|
55926
56046
|
return currentValue?.length >= 1;
|
|
55927
56047
|
case props.suggestion:
|
|
55928
56048
|
return !!tempValueInput.value || validVal;
|
|
55929
56049
|
default:
|
|
55930
56050
|
if (props.emitObject) {
|
|
55931
|
-
return currentValue !== null &&
|
|
56051
|
+
return currentValue !== null && opts.some(opt => opt.value === currentValue.value);
|
|
55932
56052
|
}
|
|
55933
56053
|
return validVal;
|
|
55934
56054
|
}
|
|
@@ -55936,9 +56056,7 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55936
56056
|
const labelSelected = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
55937
56057
|
let label = null;
|
|
55938
56058
|
let currentValue = props.emitObject ? props.modelValue?.value : props.modelValue;
|
|
55939
|
-
label =
|
|
55940
|
-
|
|
55941
|
-
// Devuelve explícitamente el label o el valor currentValue si el label no es null/undefined
|
|
56059
|
+
label = optionsForLabelLookup.value.find(val => val.value === currentValue && typeof val.value === typeof currentValue);
|
|
55942
56060
|
return label?.label !== undefined ? label.label : currentValue;
|
|
55943
56061
|
});
|
|
55944
56062
|
const finalRules = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
@@ -55951,6 +56069,7 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55951
56069
|
const showCleanBtn = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
|
|
55952
56070
|
return hasInfo.value && props.showClean && !props.disabled || messageRule.value && props.showClean && !props.disabled || tempValueInput.value;
|
|
55953
56071
|
});
|
|
56072
|
+
const showLoadingIndicator = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => props.loading || isLazyMode.value && isLoadingLazy.value);
|
|
55954
56073
|
|
|
55955
56074
|
// Lifecycle hooks
|
|
55956
56075
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.onMounted)(() => {
|
|
@@ -55961,6 +56080,10 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
55961
56080
|
register(instance);
|
|
55962
56081
|
}
|
|
55963
56082
|
setOptions();
|
|
56083
|
+
if (isLazyMode.value) {
|
|
56084
|
+
page.value = props.lazyInitialPage;
|
|
56085
|
+
fetchOptions(false);
|
|
56086
|
+
}
|
|
55964
56087
|
if (props.suggestion && props.modelValue && tempValueInput.value == null) {
|
|
55965
56088
|
let opt = props.options.find(opt => {
|
|
55966
56089
|
return props.emitObject ? opt?.value === props.modelValue?.value : opt?.value === props.modelValue;
|
|
@@ -56019,42 +56142,89 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56019
56142
|
}
|
|
56020
56143
|
});
|
|
56021
56144
|
};
|
|
56145
|
+
const getScrollParent = element => {
|
|
56146
|
+
if (!element) return null;
|
|
56147
|
+
let parent = element.parentElement;
|
|
56148
|
+
while (parent) {
|
|
56149
|
+
const style = window.getComputedStyle(parent);
|
|
56150
|
+
const overflowY = style.overflowY;
|
|
56151
|
+
if (overflowY === 'auto' || overflowY === 'scroll' || overflowY === 'overlay') {
|
|
56152
|
+
return parent;
|
|
56153
|
+
}
|
|
56154
|
+
parent = parent.parentElement;
|
|
56155
|
+
}
|
|
56156
|
+
return null;
|
|
56157
|
+
};
|
|
56158
|
+
|
|
56159
|
+
/**
|
|
56160
|
+
* Rect del viewport (para medir espacio arriba/abajo cuando se usa Teleport).
|
|
56161
|
+
*/
|
|
56162
|
+
const getViewportRect = () => ({
|
|
56163
|
+
top: 0,
|
|
56164
|
+
bottom: window.innerHeight
|
|
56165
|
+
});
|
|
56166
|
+
|
|
56167
|
+
/**
|
|
56168
|
+
* Decide si el dropdown debe abrir hacia arriba según openDirection y espacio disponible.
|
|
56169
|
+
* En auto: compara topSpace y bottomSpace con la altura del dropdown (no umbral fijo).
|
|
56170
|
+
* @param {{ referenceEl: HTMLElement, dropdownHeight: number, useViewport: boolean }} opts
|
|
56171
|
+
* @returns {boolean} true = abrir arriba, false = abrir abajo
|
|
56172
|
+
*/
|
|
56173
|
+
const shouldOpenAbove = ({
|
|
56174
|
+
referenceEl,
|
|
56175
|
+
dropdownHeight,
|
|
56176
|
+
useViewport
|
|
56177
|
+
}) => {
|
|
56178
|
+
if (props.openDirection === 'up') return true;
|
|
56179
|
+
if (props.openDirection === 'down') return false;
|
|
56180
|
+
const rect = referenceEl.getBoundingClientRect();
|
|
56181
|
+
const containerRect = useViewport ? getViewportRect() : (() => {
|
|
56182
|
+
const scrollParent = getScrollParent(mainSelectComponent.value);
|
|
56183
|
+
return scrollParent ? scrollParent.getBoundingClientRect() : getViewportRect();
|
|
56184
|
+
})();
|
|
56185
|
+
const topSpace = rect.top - containerRect.top;
|
|
56186
|
+
const bottomSpace = containerRect.bottom - rect.bottom;
|
|
56187
|
+
const needHeight = dropdownHeight + DROPDOWN_GAP_PX;
|
|
56188
|
+
if (bottomSpace >= needHeight) return false;
|
|
56189
|
+
if (topSpace >= needHeight) return true;
|
|
56190
|
+
return topSpace >= bottomSpace;
|
|
56191
|
+
};
|
|
56022
56192
|
const calculateDropPositionY = () => {
|
|
56023
56193
|
if (isSelectOpened.value) {
|
|
56024
56194
|
const refComp = instance.refs[`mainSelectComp-${instance.uid}`];
|
|
56025
|
-
const
|
|
56195
|
+
const dropdownHeight = contentSelect.value?.offsetHeight ?? window.innerHeight * DROPDOWN_MAX_HEIGHT_VH;
|
|
56196
|
+
const openAbove = refComp ? shouldOpenAbove({
|
|
56197
|
+
referenceEl: refComp,
|
|
56198
|
+
dropdownHeight,
|
|
56199
|
+
useViewport: useTeleport.value
|
|
56200
|
+
}) : false;
|
|
56026
56201
|
if (openAbove) {
|
|
56027
56202
|
showPosition.value = false;
|
|
56028
|
-
// Gap solo cuando hay valor seleccionado para que el label flotante no quede tapado
|
|
56029
56203
|
return {
|
|
56030
56204
|
top: 'auto',
|
|
56031
56205
|
left: '0',
|
|
56032
|
-
bottom:
|
|
56033
|
-
};
|
|
56034
|
-
} else {
|
|
56035
|
-
showPosition.value = true;
|
|
56036
|
-
return {
|
|
56037
|
-
left: '0',
|
|
56038
|
-
top: selectHeight.value + 'px' // Despliega hacia abajo
|
|
56206
|
+
bottom: `calc(100% + ${DROPDOWN_LABEL_GAP_PX}px)`
|
|
56039
56207
|
};
|
|
56040
56208
|
}
|
|
56209
|
+
showPosition.value = true;
|
|
56210
|
+
return {
|
|
56211
|
+
left: '0',
|
|
56212
|
+
top: selectHeight.value + 'px'
|
|
56213
|
+
};
|
|
56041
56214
|
}
|
|
56042
|
-
|
|
56043
|
-
// Otro manejo si es necesario cuando el dropdown no está abierto
|
|
56044
56215
|
return {};
|
|
56045
56216
|
};
|
|
56046
|
-
const calculateAvailableSpaceY = referenceComp => {
|
|
56047
|
-
const rect = referenceComp.getBoundingClientRect();
|
|
56048
|
-
const bottomSpace = window.innerHeight - rect.bottom;
|
|
56049
|
-
return bottomSpace < 200 ? true : false; // arriba : abajo
|
|
56050
|
-
};
|
|
56051
56217
|
const getTriggerEl = () => mainSelectComponent.value?.querySelector('[data-testid="select-default"], [data-testid="select-suggest"]');
|
|
56052
56218
|
const updateDropdownPositionFixed = () => {
|
|
56053
56219
|
const triggerEl = getTriggerEl();
|
|
56054
56220
|
if (!triggerEl) return;
|
|
56055
56221
|
const rect = triggerEl.getBoundingClientRect();
|
|
56056
|
-
const dropdownHeight = contentSelect.value?.offsetHeight ?? window.innerHeight *
|
|
56057
|
-
const openAbove =
|
|
56222
|
+
const dropdownHeight = contentSelect.value?.offsetHeight ?? window.innerHeight * DROPDOWN_MAX_HEIGHT_VH;
|
|
56223
|
+
const openAbove = shouldOpenAbove({
|
|
56224
|
+
referenceEl: triggerEl,
|
|
56225
|
+
dropdownHeight,
|
|
56226
|
+
useViewport: true
|
|
56227
|
+
});
|
|
56058
56228
|
const style = {
|
|
56059
56229
|
position: 'fixed',
|
|
56060
56230
|
left: rect.left + 'px',
|
|
@@ -56064,8 +56234,7 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56064
56234
|
zIndex: 9999
|
|
56065
56235
|
};
|
|
56066
56236
|
if (openAbove) {
|
|
56067
|
-
|
|
56068
|
-
style.top = Math.max(0, rect.top - dropdownHeight - gapLabel) + 'px';
|
|
56237
|
+
style.top = Math.max(0, rect.top - dropdownHeight - DROPDOWN_LABEL_GAP_PX) + 'px';
|
|
56069
56238
|
} else {
|
|
56070
56239
|
style.top = rect.bottom + 'px';
|
|
56071
56240
|
}
|
|
@@ -56197,11 +56366,75 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56197
56366
|
const fetchSuggestions = () => {
|
|
56198
56367
|
selectedoption.value = false;
|
|
56199
56368
|
calculateIconSectionWidth();
|
|
56369
|
+
if (isLazyMode.value) {
|
|
56370
|
+
emit('searchValue', tempValueInput.value);
|
|
56371
|
+
isSelectOpened.value = true;
|
|
56372
|
+
return;
|
|
56373
|
+
}
|
|
56200
56374
|
inputRegexValidation(tempValueInput.value);
|
|
56201
56375
|
filterOptionsSuggest(tempValueInput.value);
|
|
56202
56376
|
emit('searchValue', tempValueInput.value);
|
|
56203
56377
|
isSelectOpened.value = auxSuggestions.value.length > 0;
|
|
56204
56378
|
};
|
|
56379
|
+
|
|
56380
|
+
/**
|
|
56381
|
+
* Carga opciones en modo lazy (lazyOptions). isLoadMore false = reemplazar lista y resetear página; true = concatenar o reemplazar según lazyAccumulateInComponent.
|
|
56382
|
+
* queryOverride: cuando se pasa (p. ej. desde el watch de tempValueInput), se usa como query en lugar de tempValueInput.value.
|
|
56383
|
+
*/
|
|
56384
|
+
const fetchOptions = async (isLoadMore = false, queryOverride = undefined) => {
|
|
56385
|
+
if (!isLazyMode.value || isLoadingLazy.value) return;
|
|
56386
|
+
const fromOverride = queryOverride !== undefined ? String(queryOverride ?? '').trim() : '';
|
|
56387
|
+
const fromDom = (getTriggerEl()?.value ?? '').trim();
|
|
56388
|
+
const query = queryOverride !== undefined ? fromOverride || fromDom : (tempValueInput.value ?? '').trim();
|
|
56389
|
+
if (!isLoadMore) {
|
|
56390
|
+
page.value = props.lazyInitialPage;
|
|
56391
|
+
} else {
|
|
56392
|
+
page.value = page.value + 1;
|
|
56393
|
+
}
|
|
56394
|
+
isLoadingLazy.value = true;
|
|
56395
|
+
try {
|
|
56396
|
+
const response = await props.lazyOptions({
|
|
56397
|
+
query,
|
|
56398
|
+
page: page.value,
|
|
56399
|
+
limit: props.pageSize
|
|
56400
|
+
});
|
|
56401
|
+
const opts = Array.isArray(response?.options) ? response.options : [];
|
|
56402
|
+
const newTotal = typeof response?.total === 'number' ? response.total : 0;
|
|
56403
|
+
total.value = newTotal;
|
|
56404
|
+
if (isLoadMore && props.lazyAccumulateInComponent) {
|
|
56405
|
+
lazyOptionsList.value = [...lazyOptionsList.value, ...opts];
|
|
56406
|
+
} else {
|
|
56407
|
+
lazyOptionsList.value = opts;
|
|
56408
|
+
}
|
|
56409
|
+
} catch (err) {
|
|
56410
|
+
if (false) {}
|
|
56411
|
+
lazyOptionsList.value = [];
|
|
56412
|
+
total.value = 0;
|
|
56413
|
+
} finally {
|
|
56414
|
+
isLoadingLazy.value = false;
|
|
56415
|
+
}
|
|
56416
|
+
};
|
|
56417
|
+
|
|
56418
|
+
// Debounce del query en modo lazy (400 ms). En tests usar cy.clock() + cy.tick(450) para que el callback se ejecute.
|
|
56419
|
+
watchDebounced(tempValueInput, newVal => {
|
|
56420
|
+
if (isLazyMode.value) {
|
|
56421
|
+
const q = (newVal ?? '').trim() || (getTriggerEl()?.value ?? '').trim();
|
|
56422
|
+
fetchOptions(false, q);
|
|
56423
|
+
emit('searchValue', q);
|
|
56424
|
+
}
|
|
56425
|
+
}, {
|
|
56426
|
+
debounce: 400
|
|
56427
|
+
});
|
|
56428
|
+
|
|
56429
|
+
// Infinite scroll: cuando el sentinela entra en vista, cargar más (solo en modo lazy)
|
|
56430
|
+
useIntersectionObserver(scrollSentinel, entries => {
|
|
56431
|
+
if (!entries[0]?.isIntersecting) return;
|
|
56432
|
+
if (isLazyMode.value && hasMoreData.value && !isLoadingLazy.value && props.lazyOptions) {
|
|
56433
|
+
fetchOptions(true);
|
|
56434
|
+
}
|
|
56435
|
+
}, {
|
|
56436
|
+
root: contentSelect
|
|
56437
|
+
});
|
|
56205
56438
|
const labelSelectedColor = value => {
|
|
56206
56439
|
if (hasInfo.value) {
|
|
56207
56440
|
const isSelected = props.multiple ? props.emitObject ? props.modelValue.some(item => item.value === value) // Verifica si algún elemento del modelo tiene el valor proporcionado
|
|
@@ -56251,6 +56484,13 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56251
56484
|
if (props.suggestion && props.disabled) {
|
|
56252
56485
|
return;
|
|
56253
56486
|
}
|
|
56487
|
+
if (isLazyMode.value) {
|
|
56488
|
+
lazyOptionsList.value = [];
|
|
56489
|
+
page.value = props.lazyInitialPage;
|
|
56490
|
+
total.value = 0;
|
|
56491
|
+
tempValueInput.value = null;
|
|
56492
|
+
fetchOptions(false);
|
|
56493
|
+
}
|
|
56254
56494
|
reset();
|
|
56255
56495
|
calculateWidthLabelSelected();
|
|
56256
56496
|
multipleValue.value = [];
|
|
@@ -56275,7 +56515,8 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56275
56515
|
// Muestra u oculta la ventana con el listado de opciones al seleccionar
|
|
56276
56516
|
const toggleDropdown = () => {
|
|
56277
56517
|
if (!props.disabled) {
|
|
56278
|
-
|
|
56518
|
+
const listEmpty = props.suggestion && (isLazyMode.value ? lazyOptionsList.value.length === 0 && !isLoadingLazy.value : auxSuggestions.value.length === 0);
|
|
56519
|
+
if (listEmpty) {
|
|
56279
56520
|
isSelectOpened.value = false;
|
|
56280
56521
|
} else {
|
|
56281
56522
|
isSelectOpened.value = !isSelectOpened.value;
|
|
@@ -56352,6 +56593,7 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56352
56593
|
setOptions();
|
|
56353
56594
|
};
|
|
56354
56595
|
const setOptions = () => {
|
|
56596
|
+
if (isLazyMode.value) return;
|
|
56355
56597
|
if (props.suggestion && tempValueInput.value && props.keepFilterText) {
|
|
56356
56598
|
// Si hay texto de filtro y keepFilterText está activo, mantener el filtrado
|
|
56357
56599
|
filterOptionsSuggest(tempValueInput.value);
|
|
@@ -56421,7 +56663,7 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56421
56663
|
|
|
56422
56664
|
// Watch effects
|
|
56423
56665
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => props.modelValue, newVal => {
|
|
56424
|
-
if (newVal !== null && newVal !== undefined) {
|
|
56666
|
+
if (newVal !== null && newVal !== undefined && newVal !== '') {
|
|
56425
56667
|
validate();
|
|
56426
56668
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(() => {
|
|
56427
56669
|
calculateWidthLabelSelected();
|
|
@@ -56672,7 +56914,7 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56672
56914
|
onClick: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.withModifiers)(clean, ["stop", "prevent"])
|
|
56673
56915
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "iconClose", {}, () => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_e_icon, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.guardReactiveProps)(closeIconClass.value)), null, 16)])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), __props.iconRight && (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.unref)(slots).icon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "icon", {
|
|
56674
56916
|
key: 1
|
|
56675
|
-
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true),
|
|
56917
|
+
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), showLoadingIndicator.value ? ((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.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.mergeProps)({
|
|
56676
56918
|
key: 2
|
|
56677
56919
|
}, loadingIconClass.value)), null, 16)) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
56678
56920
|
key: 3,
|
|
@@ -56688,7 +56930,7 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56688
56930
|
ref: contentSelect,
|
|
56689
56931
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(optionsContainer.value),
|
|
56690
56932
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeStyle)(dropdownPositionFixed.value)
|
|
56691
|
-
}, [hasGroups.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
56933
|
+
}, [hasGroups.value && !isLazyMode.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
56692
56934
|
key: 0
|
|
56693
56935
|
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)(__props.suggestion ? auxSuggestions.value : groupedOptions.value, (group, index) => {
|
|
56694
56936
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
@@ -56709,20 +56951,30 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56709
56951
|
}), 128))], 2)]);
|
|
56710
56952
|
}), 128)) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
56711
56953
|
key: 1
|
|
56712
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)(
|
|
56954
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)(displayOptionsForDropdown.value, option => {
|
|
56713
56955
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("a", {
|
|
56714
56956
|
key: option.value,
|
|
56715
56957
|
"data-testid": "select-option",
|
|
56716
56958
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)([optionsItem.value, labelSelectedColor(option.value)]),
|
|
56717
56959
|
onClick: $event => selectOption(option)
|
|
56718
56960
|
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(getFormattedOption(option)), 11, ESelectvue_type_script_setup_true_lang_js_hoisted_10);
|
|
56719
|
-
}), 128))
|
|
56961
|
+
}), 128)), isLazyMode.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
56962
|
+
key: 2
|
|
56963
|
+
}, [displayOptionsForDropdown.value.length === 0 && !isLoadingLazy.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("p", ESelectvue_type_script_setup_true_lang_js_hoisted_11, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.lazyEmptyText), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), isLoadingLazy.value ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "lazyLoading", {
|
|
56964
|
+
key: 1
|
|
56965
|
+
}, () => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ESelectvue_type_script_setup_true_lang_js_hoisted_12, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_e_icon, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.guardReactiveProps)(loadingIconClass.value)), null, 16), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("span", null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.loadingText), 1)])]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), hasMoreData.value && !isLoadingLazy.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
56966
|
+
key: 2,
|
|
56967
|
+
ref_key: "scrollSentinel",
|
|
56968
|
+
ref: scrollSentinel,
|
|
56969
|
+
class: "exos-h-2 exos-w-full",
|
|
56970
|
+
"data-testid": "select-lazy-sentinel"
|
|
56971
|
+
}, null, 512)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), !hasMoreData.value && displayOptionsForDropdown.value.length > 0 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("p", ESelectvue_type_script_setup_true_lang_js_hoisted_13, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.lazyAllLoadedText), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 64)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 6)], 8, ["to"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), isSelectOpened.value && !useTeleport.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
56720
56972
|
key: 3,
|
|
56721
56973
|
ref_key: "contentSelect",
|
|
56722
56974
|
ref: contentSelect,
|
|
56723
56975
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(optionsContainer.value),
|
|
56724
56976
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeStyle)(calculateDropPositionY())
|
|
56725
|
-
}, [hasGroups.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
56977
|
+
}, [hasGroups.value && !isLazyMode.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
56726
56978
|
key: 0
|
|
56727
56979
|
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)(__props.suggestion ? auxSuggestions.value : groupedOptions.value, (group, index) => {
|
|
56728
56980
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
@@ -56733,24 +56985,34 @@ const ESelectvue_type_script_setup_true_lang_js_hoisted_14 = {
|
|
|
56733
56985
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(["e-select__groupContainer__secondary", {
|
|
56734
56986
|
'exos-flex-col': group?.group
|
|
56735
56987
|
}])
|
|
56736
|
-
}, [group?.group ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("p",
|
|
56988
|
+
}, [group?.group ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("p", ESelectvue_type_script_setup_true_lang_js_hoisted_14, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(group.group), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)(group?.options || [group], option => {
|
|
56737
56989
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("a", {
|
|
56738
56990
|
key: option.value,
|
|
56739
56991
|
"data-testid": group?.group ? 'select-option--grouped' : 'select-option--ungrouped',
|
|
56740
56992
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)([group?.group ? optionsItem.value : optionsItemUngrouped.value, labelSelectedColor(option.value)]),
|
|
56741
56993
|
onClick: $event => selectOption(option)
|
|
56742
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(getFormattedOption(option)), 11,
|
|
56994
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(getFormattedOption(option)), 11, ESelectvue_type_script_setup_true_lang_js_hoisted_15);
|
|
56743
56995
|
}), 128))], 2)]);
|
|
56744
56996
|
}), 128)) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
56745
56997
|
key: 1
|
|
56746
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)(
|
|
56998
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderList)(displayOptionsForDropdown.value, option => {
|
|
56747
56999
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("a", {
|
|
56748
57000
|
key: option.value,
|
|
56749
57001
|
"data-testid": "select-option",
|
|
56750
57002
|
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)([optionsItem.value, labelSelectedColor(option.value)]),
|
|
56751
57003
|
onClick: $event => selectOption(option)
|
|
56752
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(getFormattedOption(option)), 11,
|
|
56753
|
-
}), 128))
|
|
57004
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(getFormattedOption(option)), 11, ESelectvue_type_script_setup_true_lang_js_hoisted_16);
|
|
57005
|
+
}), 128)), isLazyMode.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.Fragment, {
|
|
57006
|
+
key: 2
|
|
57007
|
+
}, [displayOptionsForDropdown.value.length === 0 && !isLoadingLazy.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("p", ESelectvue_type_script_setup_true_lang_js_hoisted_17, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.lazyEmptyText), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), isLoadingLazy.value ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "lazyLoading", {
|
|
57008
|
+
key: 1
|
|
57009
|
+
}, () => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", _hoisted_18, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_e_icon, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeProps)((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.guardReactiveProps)(loadingIconClass.value)), null, 16), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("span", null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.loadingText), 1)])]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), hasMoreData.value && !isLoadingLazy.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
57010
|
+
key: 2,
|
|
57011
|
+
ref_key: "scrollSentinel",
|
|
57012
|
+
ref: scrollSentinel,
|
|
57013
|
+
class: "exos-h-2 exos-w-full",
|
|
57014
|
+
"data-testid": "select-lazy-sentinel"
|
|
57015
|
+
}, null, 512)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), !hasMoreData.value && displayOptionsForDropdown.value.length > 0 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("p", _hoisted_19, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(__props.lazyAllLoadedText), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 64)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 6)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]), !!messageRule.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", _hoisted_20, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(messageRule.value), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 2);
|
|
56754
57016
|
};
|
|
56755
57017
|
}
|
|
56756
57018
|
});
|
|
@@ -56830,14 +57092,14 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_16 = {
|
|
|
56830
57092
|
const ETablevue_type_script_setup_true_lang_js_hoisted_17 = {
|
|
56831
57093
|
class: "e-table__pagination__paginationTable__container"
|
|
56832
57094
|
};
|
|
56833
|
-
const
|
|
57095
|
+
const ETablevue_type_script_setup_true_lang_js_hoisted_18 = {
|
|
56834
57096
|
class: "e-table__pagination__select__container"
|
|
56835
57097
|
};
|
|
56836
|
-
const
|
|
57098
|
+
const ETablevue_type_script_setup_true_lang_js_hoisted_19 = {
|
|
56837
57099
|
key: 2,
|
|
56838
57100
|
class: "e-table__totalRecords__container"
|
|
56839
57101
|
};
|
|
56840
|
-
const
|
|
57102
|
+
const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
|
|
56841
57103
|
class: "e-table__pagination__btn__right"
|
|
56842
57104
|
};
|
|
56843
57105
|
|
|
@@ -57901,7 +58163,7 @@ const _hoisted_20 = {
|
|
|
57901
58163
|
"onUpdate:modelValue": [_cache[1] || (_cache[1] = $event => currentPage.value = $event), _cache[2] || (_cache[2] = $event => handleRequest(true))],
|
|
57902
58164
|
ref_key: "paginationRef",
|
|
57903
58165
|
ref: paginationRef
|
|
57904
|
-
}, null, 8, ["numPagesTotal", "hideBoundaryPages", "modelValue"])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div",
|
|
58166
|
+
}, null, 8, ["numPagesTotal", "hideBoundaryPages", "modelValue"])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ETablevue_type_script_setup_true_lang_js_hoisted_18, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_e_select, {
|
|
57905
58167
|
outline: false,
|
|
57906
58168
|
showClean: false,
|
|
57907
58169
|
shadowSize: "none",
|
|
@@ -57909,7 +58171,7 @@ const _hoisted_20 = {
|
|
|
57909
58171
|
modelValue: numRowsByPage.value,
|
|
57910
58172
|
"onUpdate:modelValue": [_cache[3] || (_cache[3] = $event => numRowsByPage.value = $event), handleReload],
|
|
57911
58173
|
options: __props.rowsByPage
|
|
57912
|
-
}, null, 8, ["bgColor", "modelValue", "options"])])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), __props.totalRecords && __props.totalRowsRightAligned ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
58174
|
+
}, null, 8, ["bgColor", "modelValue", "options"])])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), __props.totalRecords && __props.totalRowsRightAligned ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", ETablevue_type_script_setup_true_lang_js_hoisted_19, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(totalRowsRangeLabel.value), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", ETablevue_type_script_setup_true_lang_js_hoisted_20, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "btn-br")])], 2)])], 64);
|
|
57913
58175
|
};
|
|
57914
58176
|
}
|
|
57915
58177
|
});
|
|
@@ -62553,7 +62815,15 @@ const ExosLibraryComponents = {
|
|
|
62553
62815
|
}
|
|
62554
62816
|
}
|
|
62555
62817
|
}
|
|
62818
|
+
let defaultSelectConfig = {
|
|
62819
|
+
dropdownAppendTo: null
|
|
62820
|
+
};
|
|
62821
|
+
let selectConfig = defaultSelectConfig;
|
|
62822
|
+
if (options.select?.dropdownAppendTo) {
|
|
62823
|
+
selectConfig.dropdownAppendTo = options.select.dropdownAppendTo;
|
|
62824
|
+
}
|
|
62556
62825
|
app.provide('$exosDialogConfig', dialogConfig);
|
|
62826
|
+
app.provide('$exosSelectConfig', selectConfig);
|
|
62557
62827
|
app.provide('$loading', loading);
|
|
62558
62828
|
app.provide('$notify', notify);
|
|
62559
62829
|
app.provide('$showMessage', message);
|