@alexochihua/exos-library-components 2.25.28 → 2.25.30

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.
@@ -52744,6 +52744,7 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52744
52744
  let cursorPosition = event.target.selectionStart;
52745
52745
  let previousLength = valueInput.length;
52746
52746
  const charLengt = props.charAmount ? props.charAmount.length : 0;
52747
+ let timeCursorPosition = null;
52747
52748
  let emails = valueInput.replace(/ /g, '').split(props.charSplitEmail);
52748
52749
  let allEmailCorrect = true;
52749
52750
  let incorrectEmail = null;
@@ -52841,18 +52842,30 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52841
52842
  }
52842
52843
  case props.modelModifiers?.time:
52843
52844
  {
52845
+ const rawValue = valueInput;
52846
+ const cursorPos = cursorPosition;
52847
+ const digitsBeforeCursor = countDigitsBefore(rawValue, cursorPos);
52848
+
52844
52849
  // 1. Obtener solo los dígitos
52845
- const digitsOnly = valueInput.replace(/\D/g, '');
52850
+ let digitsOnly = valueInput.replace(/\D/g, '');
52851
+ const prevDigitsTime = (props.modelValue || '').replace(/\D/g, '');
52852
+ let digitsBeforeCursorForPosition = digitsBeforeCursor;
52853
+ if (props.modelValue && valueInput === prevDigitsTime && props.modelValue.length > valueInput.length && digitsBeforeCursor >= 1) {
52854
+ digitsOnly = digitsOnly.slice(0, digitsBeforeCursor - 1) + digitsOnly.slice(digitsBeforeCursor);
52855
+ digitsBeforeCursorForPosition = digitsBeforeCursor - 1;
52856
+ }
52846
52857
 
52847
52858
  // 2. Formatear como HH:mm:ss
52848
52859
  valueInput = formatToHHMMSS(digitsOnly);
52860
+ timeCursorPosition = getPositionAfterNDigits(valueInput, digitsBeforeCursorForPosition);
52849
52861
 
52850
52862
  // 3. Validar que sea una hora válida (máximo 23:59:59)
52851
52863
  const [hourStr, minStr, secStr] = valueInput.split(':');
52852
52864
  const hour = parseInt(hourStr, 10);
52853
52865
  const minute = parseInt(minStr ?? '0', 10);
52854
52866
  const second = parseInt(secStr ?? '0', 10);
52855
- const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60;
52867
+ const invalidHour11SingleMinuteDigit = hour === 11 && minStr != null && minStr !== '' && minStr.length === 1;
52868
+ const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60 && !invalidHour11SingleMinuteDigit;
52856
52869
  if (isValid) {
52857
52870
  resetRestrictions();
52858
52871
  enteredTime = valueInput;
@@ -52867,12 +52880,23 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52867
52880
  }
52868
52881
  case props.modelModifiers?.timens:
52869
52882
  {
52883
+ const rawValueTimens = valueInput;
52884
+ const cursorPosTimens = cursorPosition;
52885
+ const digitsBeforeCursorTimens = countDigitsBefore(rawValueTimens, cursorPosTimens);
52870
52886
  let digitsOnly = valueInput.replace(/\D/g, '');
52887
+ const prevDigitsTimens = (props.modelValue || '').replace(/\D/g, '');
52888
+ let digitsBeforeCursorTimensForPosition = digitsBeforeCursorTimens;
52889
+ if (props.modelValue && valueInput === prevDigitsTimens && props.modelValue.length > valueInput.length && digitsBeforeCursorTimens >= 1) {
52890
+ digitsOnly = digitsOnly.slice(0, digitsBeforeCursorTimens - 1) + digitsOnly.slice(digitsBeforeCursorTimens);
52891
+ digitsBeforeCursorTimensForPosition = digitsBeforeCursorTimens - 1;
52892
+ }
52871
52893
  valueInput = formatToHHMM(digitsOnly);
52894
+ timeCursorPosition = getPositionAfterNDigits(valueInput, digitsBeforeCursorTimensForPosition);
52872
52895
  const [hourStr, minStr] = valueInput.split(':');
52873
52896
  const hour = parseInt(hourStr, 10);
52874
52897
  const minute = parseInt(minStr, 10);
52875
- const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60;
52898
+ const invalidHour11SingleMinuteDigit = hour === 11 && minStr != null && minStr !== '' && minStr.length === 1;
52899
+ const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && !invalidHour11SingleMinuteDigit;
52876
52900
  if (isValid) {
52877
52901
  resetRestrictions();
52878
52902
  } else {
@@ -52932,9 +52956,10 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52932
52956
  }
52933
52957
  event.target.setSelectionRange(position, position);
52934
52958
  } else if (needsCursorAtEnd) {
52935
- // Solo para modificadores que reformatean (time, timens)
52959
+ // Solo para modificadores que reformatean (time, timens): preservar posición según dígitos
52936
52960
  const len = event.target.value.length;
52937
- event.target.setSelectionRange(len, len);
52961
+ const pos = timeCursorPosition != null ? timeCursorPosition : len;
52962
+ event.target.setSelectionRange(pos, pos);
52938
52963
  } else {
52939
52964
  // Para modificadores que solo filtran caracteres, preservar posición del cursor
52940
52965
  const lengthDiff = valueInput.length - previousLength;
@@ -52966,10 +52991,28 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52966
52991
  }
52967
52992
  return '';
52968
52993
  };
52994
+ const countDigitsBefore = (str, position) => {
52995
+ let count = 0;
52996
+ for (let i = 0; i < position && i < str.length; i++) {
52997
+ if (/\d/.test(str[i])) count++;
52998
+ }
52999
+ return count;
53000
+ };
53001
+ const getPositionAfterNDigits = (str, n) => {
53002
+ if (n <= 0) return 0;
53003
+ let digitCount = 0;
53004
+ let i = 0;
53005
+ for (; i < str.length && digitCount < n; i++) {
53006
+ if (/\d/.test(str[i])) digitCount++;
53007
+ }
53008
+ if (digitCount < n) return str.length;
53009
+ while (i < str.length && str[i] === ':') i++;
53010
+ return i;
53011
+ };
52969
53012
  const formatToHHMM = raw => {
52970
53013
  let digits = raw.replace(/\D/g, '');
52971
53014
  if (digits.length === 0) return '';
52972
- if (digits.length === 1) return `${digits}:`;
53015
+ if (digits.length === 1) return digits;
52973
53016
  if (digits.length === 2) return `${digits}:`;
52974
53017
  if (digits.length === 3) return `${digits.slice(0, 2)}:${digits[2]}`;
52975
53018
  if (digits.length >= 4) return `${digits.slice(0, 2)}:${digits.slice(2, 4)}`;
@@ -52977,7 +53020,7 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52977
53020
  const formatToHHMMSS = raw => {
52978
53021
  let digits = raw.replace(/\D/g, '');
52979
53022
  if (digits.length === 0) return '';
52980
- if (digits.length === 1) return `${digits}:`;
53023
+ if (digits.length === 1) return digits;
52981
53024
  if (digits.length === 2) return `${digits}:`;
52982
53025
  if (digits.length === 3) return `${digits.slice(0, 2)}:${digits[2]}`;
52983
53026
  if (digits.length === 4) return `${digits.slice(0, 2)}:${digits.slice(2, 4)}:`;
@@ -53899,7 +53942,8 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
53899
53942
  const hiddenInputId = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => `e-input-mask-hidden-${instance.uid}`);
53900
53943
  const inputRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(null);
53901
53944
  const displayValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)('');
53902
- const realValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(props.modelValue || '');
53945
+ /** Sin valor crudo del padre: el watcher (immediate) aplica formatInitialValue y evita que p.ej. "$10" quede como realValue con saveFormatted=false */
53946
+ const realValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)('');
53903
53947
  const isCleaning = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
53904
53948
  const lastValidationResult = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(true);
53905
53949
 
@@ -54036,6 +54080,7 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54036
54080
  // Excluimos todas las props de EInputMask para evitar pasarlas a EInput
54037
54081
  const excludedProps = ['maskPattern', 'hiddenChar', 'preset', 'saveFormatted', 'visiblePrefix', 'visibleSuffix', 'decimals', 'currencySymbol', 'cardLengths', 'invalidCardMessage', 'invalidCardLengthMessage', 'required', 'rules', 'label', 'requiredMessage', 'invalidPhoneMessage', 'invalidNssMessage', 'invalidCurrencyMessage', 'invalidPercentageMessage'];
54038
54082
  const inputProps = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
54083
+ console.log(props.label, 'attrs', attrs);
54039
54084
  const result = {};
54040
54085
  for (const key in attrs) {
54041
54086
  if (!excludedProps.includes(key)) {
@@ -54893,12 +54938,21 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54893
54938
  return;
54894
54939
  }
54895
54940
 
54896
- // Comparar con el valor correcto según saveFormatted
54897
- const currentEmitValue = getEmitValue(realValue.value, displayValue.value);
54898
- if (newValue !== currentEmitValue) {
54899
- const formatted = formatInitialValue(newValue);
54900
- displayValue.value = formatted.displayValue;
54901
- realValue.value = formatted.realValue;
54941
+ // Eco del v-model: no re-aplicar applyMask (p. ej. tarjeta con saveFormatted=true
54942
+ // rompe si se parsea de nuevo el string ya enmascarado).
54943
+ const currentEmit = getEmitValue(realValue.value, displayValue.value);
54944
+ if (newValue === currentEmit) {
54945
+ return;
54946
+ }
54947
+ const formatted = formatInitialValue(newValue);
54948
+ displayValue.value = formatted.displayValue;
54949
+ realValue.value = formatted.realValue;
54950
+ const canonicalEmit = getEmitValue(formatted.realValue, formatted.displayValue);
54951
+ const emptyModel = v => v == null || v === '';
54952
+ const a = emptyModel(newValue) ? '' : newValue;
54953
+ const b = emptyModel(canonicalEmit) ? '' : canonicalEmit;
54954
+ if (a !== b) {
54955
+ emit('update:modelValue', canonicalEmit);
54902
54956
  }
54903
54957
  }, {
54904
54958
  immediate: true
@@ -54915,11 +54969,6 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54915
54969
 
54916
54970
  // Lifecycle
54917
54971
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.onMounted)(() => {
54918
- if (props.modelValue || props.modelValue === '0') {
54919
- const formatted = formatInitialValue(props.modelValue);
54920
- displayValue.value = formatted.displayValue;
54921
- realValue.value = formatted.realValue;
54922
- }
54923
54972
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(() => {
54924
54973
  const input = getNativeInput();
54925
54974
  if (input) {
@@ -54986,13 +55035,14 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54986
55035
  rules: inputRules.value || inputProps.value.rules,
54987
55036
  label: __props.label || inputProps.value.label,
54988
55037
  length: inputLength.value || inputProps.value.length,
55038
+ requiredMessage: __props.requiredMessage || inputProps.value.requiredMessage,
54989
55039
  "onUpdate:modelValue": handleDisplayUpdate,
54990
55040
  onBlur: handleBlur,
54991
55041
  onFocus: handleFocus,
54992
55042
  onClean: handleClean,
54993
55043
  onOnEnter: handleEnter,
54994
55044
  onOnEnterValid: handleEnterValid
54995
- }), null, 16, ["id", "modelValue", "required", "rules", "label", "length"])]);
55045
+ }), null, 16, ["id", "modelValue", "required", "rules", "label", "length", "requiredMessage"])]);
54996
55046
  };
54997
55047
  }
54998
55048
  });
@@ -56066,10 +56116,11 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56066
56116
  label = optionsForLabelLookup.value.find(val => val.value === currentValue && typeof val.value === typeof currentValue);
56067
56117
  return label?.label !== undefined ? label.label : currentValue;
56068
56118
  });
56119
+ const formatRequiredMessage = () => props.requiredMessage.replace('%label%', props.label ?? '');
56069
56120
  const finalRules = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
56070
56121
  let rules = [...props.rules];
56071
56122
  if (props.required && typeof props.modelValue !== 'boolean') {
56072
- rules.unshift(val => val !== null && val !== undefined && val !== '' || props.requiredMessage.replace('%label%', props.label));
56123
+ rules.unshift(val => val !== null && val !== undefined && val !== '' || formatRequiredMessage());
56073
56124
  }
56074
56125
  return rules;
56075
56126
  });
@@ -56660,7 +56711,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56660
56711
  }
56661
56712
  } else if (props.required) {
56662
56713
  // Manejar el caso en que this.modelValue no es un array y es requerido
56663
- setMessageRule(`El campo ${props.label} es requerido`);
56714
+ setMessageRule(formatRequiredMessage());
56664
56715
  valid = false;
56665
56716
  }
56666
56717
  i++;
@@ -57846,6 +57897,9 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
57846
57897
  const handleReload = () => {
57847
57898
  if (paginationRef.value) {
57848
57899
  paginationRef.value.handleFirstPage();
57900
+ } else if (props.serverSide) {
57901
+ currentPage.value = 1;
57902
+ handleRequest(true);
57849
57903
  }
57850
57904
  };
57851
57905
  const dataSort = (rows, sortBy, descending) => {
@@ -58040,11 +58094,16 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
58040
58094
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => props.filter, () => {
58041
58095
  sortBy.value = null;
58042
58096
  descending.value = null;
58043
- if (paginationRef.value) {
58097
+ if (props.serverSide) {
58098
+ currentPage.value = 1;
58099
+ handleRequest(true);
58100
+ } else if (paginationRef.value) {
58044
58101
  handleReload();
58045
58102
  } else {
58046
58103
  handleRequest();
58047
58104
  }
58105
+ }, {
58106
+ deep: true
58048
58107
  });
58049
58108
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => numRowsByPage.value, newVal => {
58050
58109
  sortBy.value = null;
@@ -52762,6 +52762,7 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52762
52762
  let cursorPosition = event.target.selectionStart;
52763
52763
  let previousLength = valueInput.length;
52764
52764
  const charLengt = props.charAmount ? props.charAmount.length : 0;
52765
+ let timeCursorPosition = null;
52765
52766
  let emails = valueInput.replace(/ /g, '').split(props.charSplitEmail);
52766
52767
  let allEmailCorrect = true;
52767
52768
  let incorrectEmail = null;
@@ -52859,18 +52860,30 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52859
52860
  }
52860
52861
  case props.modelModifiers?.time:
52861
52862
  {
52863
+ const rawValue = valueInput;
52864
+ const cursorPos = cursorPosition;
52865
+ const digitsBeforeCursor = countDigitsBefore(rawValue, cursorPos);
52866
+
52862
52867
  // 1. Obtener solo los dígitos
52863
- const digitsOnly = valueInput.replace(/\D/g, '');
52868
+ let digitsOnly = valueInput.replace(/\D/g, '');
52869
+ const prevDigitsTime = (props.modelValue || '').replace(/\D/g, '');
52870
+ let digitsBeforeCursorForPosition = digitsBeforeCursor;
52871
+ if (props.modelValue && valueInput === prevDigitsTime && props.modelValue.length > valueInput.length && digitsBeforeCursor >= 1) {
52872
+ digitsOnly = digitsOnly.slice(0, digitsBeforeCursor - 1) + digitsOnly.slice(digitsBeforeCursor);
52873
+ digitsBeforeCursorForPosition = digitsBeforeCursor - 1;
52874
+ }
52864
52875
 
52865
52876
  // 2. Formatear como HH:mm:ss
52866
52877
  valueInput = formatToHHMMSS(digitsOnly);
52878
+ timeCursorPosition = getPositionAfterNDigits(valueInput, digitsBeforeCursorForPosition);
52867
52879
 
52868
52880
  // 3. Validar que sea una hora válida (máximo 23:59:59)
52869
52881
  const [hourStr, minStr, secStr] = valueInput.split(':');
52870
52882
  const hour = parseInt(hourStr, 10);
52871
52883
  const minute = parseInt(minStr ?? '0', 10);
52872
52884
  const second = parseInt(secStr ?? '0', 10);
52873
- const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60;
52885
+ const invalidHour11SingleMinuteDigit = hour === 11 && minStr != null && minStr !== '' && minStr.length === 1;
52886
+ const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60 && !invalidHour11SingleMinuteDigit;
52874
52887
  if (isValid) {
52875
52888
  resetRestrictions();
52876
52889
  enteredTime = valueInput;
@@ -52885,12 +52898,23 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52885
52898
  }
52886
52899
  case props.modelModifiers?.timens:
52887
52900
  {
52901
+ const rawValueTimens = valueInput;
52902
+ const cursorPosTimens = cursorPosition;
52903
+ const digitsBeforeCursorTimens = countDigitsBefore(rawValueTimens, cursorPosTimens);
52888
52904
  let digitsOnly = valueInput.replace(/\D/g, '');
52905
+ const prevDigitsTimens = (props.modelValue || '').replace(/\D/g, '');
52906
+ let digitsBeforeCursorTimensForPosition = digitsBeforeCursorTimens;
52907
+ if (props.modelValue && valueInput === prevDigitsTimens && props.modelValue.length > valueInput.length && digitsBeforeCursorTimens >= 1) {
52908
+ digitsOnly = digitsOnly.slice(0, digitsBeforeCursorTimens - 1) + digitsOnly.slice(digitsBeforeCursorTimens);
52909
+ digitsBeforeCursorTimensForPosition = digitsBeforeCursorTimens - 1;
52910
+ }
52889
52911
  valueInput = formatToHHMM(digitsOnly);
52912
+ timeCursorPosition = getPositionAfterNDigits(valueInput, digitsBeforeCursorTimensForPosition);
52890
52913
  const [hourStr, minStr] = valueInput.split(':');
52891
52914
  const hour = parseInt(hourStr, 10);
52892
52915
  const minute = parseInt(minStr, 10);
52893
- const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60;
52916
+ const invalidHour11SingleMinuteDigit = hour === 11 && minStr != null && minStr !== '' && minStr.length === 1;
52917
+ const isValid = hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && !invalidHour11SingleMinuteDigit;
52894
52918
  if (isValid) {
52895
52919
  resetRestrictions();
52896
52920
  } else {
@@ -52950,9 +52974,10 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52950
52974
  }
52951
52975
  event.target.setSelectionRange(position, position);
52952
52976
  } else if (needsCursorAtEnd) {
52953
- // Solo para modificadores que reformatean (time, timens)
52977
+ // Solo para modificadores que reformatean (time, timens): preservar posición según dígitos
52954
52978
  const len = event.target.value.length;
52955
- event.target.setSelectionRange(len, len);
52979
+ const pos = timeCursorPosition != null ? timeCursorPosition : len;
52980
+ event.target.setSelectionRange(pos, pos);
52956
52981
  } else {
52957
52982
  // Para modificadores que solo filtran caracteres, preservar posición del cursor
52958
52983
  const lengthDiff = valueInput.length - previousLength;
@@ -52984,10 +53009,28 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52984
53009
  }
52985
53010
  return '';
52986
53011
  };
53012
+ const countDigitsBefore = (str, position) => {
53013
+ let count = 0;
53014
+ for (let i = 0; i < position && i < str.length; i++) {
53015
+ if (/\d/.test(str[i])) count++;
53016
+ }
53017
+ return count;
53018
+ };
53019
+ const getPositionAfterNDigits = (str, n) => {
53020
+ if (n <= 0) return 0;
53021
+ let digitCount = 0;
53022
+ let i = 0;
53023
+ for (; i < str.length && digitCount < n; i++) {
53024
+ if (/\d/.test(str[i])) digitCount++;
53025
+ }
53026
+ if (digitCount < n) return str.length;
53027
+ while (i < str.length && str[i] === ':') i++;
53028
+ return i;
53029
+ };
52987
53030
  const formatToHHMM = raw => {
52988
53031
  let digits = raw.replace(/\D/g, '');
52989
53032
  if (digits.length === 0) return '';
52990
- if (digits.length === 1) return `${digits}:`;
53033
+ if (digits.length === 1) return digits;
52991
53034
  if (digits.length === 2) return `${digits}:`;
52992
53035
  if (digits.length === 3) return `${digits.slice(0, 2)}:${digits[2]}`;
52993
53036
  if (digits.length >= 4) return `${digits.slice(0, 2)}:${digits.slice(2, 4)}`;
@@ -52995,7 +53038,7 @@ const EInputvue_type_script_setup_true_lang_js_hoisted_4 = {
52995
53038
  const formatToHHMMSS = raw => {
52996
53039
  let digits = raw.replace(/\D/g, '');
52997
53040
  if (digits.length === 0) return '';
52998
- if (digits.length === 1) return `${digits}:`;
53041
+ if (digits.length === 1) return digits;
52999
53042
  if (digits.length === 2) return `${digits}:`;
53000
53043
  if (digits.length === 3) return `${digits.slice(0, 2)}:${digits[2]}`;
53001
53044
  if (digits.length === 4) return `${digits.slice(0, 2)}:${digits.slice(2, 4)}:`;
@@ -53917,7 +53960,8 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
53917
53960
  const hiddenInputId = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => `e-input-mask-hidden-${instance.uid}`);
53918
53961
  const inputRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
53919
53962
  const displayValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)('');
53920
- const realValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(props.modelValue || '');
53963
+ /** Sin valor crudo del padre: el watcher (immediate) aplica formatInitialValue y evita que p.ej. "$10" quede como realValue con saveFormatted=false */
53964
+ const realValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)('');
53921
53965
  const isCleaning = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
53922
53966
  const lastValidationResult = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(true);
53923
53967
 
@@ -54054,6 +54098,7 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54054
54098
  // Excluimos todas las props de EInputMask para evitar pasarlas a EInput
54055
54099
  const excludedProps = ['maskPattern', 'hiddenChar', 'preset', 'saveFormatted', 'visiblePrefix', 'visibleSuffix', 'decimals', 'currencySymbol', 'cardLengths', 'invalidCardMessage', 'invalidCardLengthMessage', 'required', 'rules', 'label', 'requiredMessage', 'invalidPhoneMessage', 'invalidNssMessage', 'invalidCurrencyMessage', 'invalidPercentageMessage'];
54056
54100
  const inputProps = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
54101
+ console.log(props.label, 'attrs', attrs);
54057
54102
  const result = {};
54058
54103
  for (const key in attrs) {
54059
54104
  if (!excludedProps.includes(key)) {
@@ -54911,12 +54956,21 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54911
54956
  return;
54912
54957
  }
54913
54958
 
54914
- // Comparar con el valor correcto según saveFormatted
54915
- const currentEmitValue = getEmitValue(realValue.value, displayValue.value);
54916
- if (newValue !== currentEmitValue) {
54917
- const formatted = formatInitialValue(newValue);
54918
- displayValue.value = formatted.displayValue;
54919
- realValue.value = formatted.realValue;
54959
+ // Eco del v-model: no re-aplicar applyMask (p. ej. tarjeta con saveFormatted=true
54960
+ // rompe si se parsea de nuevo el string ya enmascarado).
54961
+ const currentEmit = getEmitValue(realValue.value, displayValue.value);
54962
+ if (newValue === currentEmit) {
54963
+ return;
54964
+ }
54965
+ const formatted = formatInitialValue(newValue);
54966
+ displayValue.value = formatted.displayValue;
54967
+ realValue.value = formatted.realValue;
54968
+ const canonicalEmit = getEmitValue(formatted.realValue, formatted.displayValue);
54969
+ const emptyModel = v => v == null || v === '';
54970
+ const a = emptyModel(newValue) ? '' : newValue;
54971
+ const b = emptyModel(canonicalEmit) ? '' : canonicalEmit;
54972
+ if (a !== b) {
54973
+ emit('update:modelValue', canonicalEmit);
54920
54974
  }
54921
54975
  }, {
54922
54976
  immediate: true
@@ -54933,11 +54987,6 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54933
54987
 
54934
54988
  // Lifecycle
54935
54989
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
54936
- if (props.modelValue || props.modelValue === '0') {
54937
- const formatted = formatInitialValue(props.modelValue);
54938
- displayValue.value = formatted.displayValue;
54939
- realValue.value = formatted.realValue;
54940
- }
54941
54990
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
54942
54991
  const input = getNativeInput();
54943
54992
  if (input) {
@@ -55004,13 +55053,14 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
55004
55053
  rules: inputRules.value || inputProps.value.rules,
55005
55054
  label: __props.label || inputProps.value.label,
55006
55055
  length: inputLength.value || inputProps.value.length,
55056
+ requiredMessage: __props.requiredMessage || inputProps.value.requiredMessage,
55007
55057
  "onUpdate:modelValue": handleDisplayUpdate,
55008
55058
  onBlur: handleBlur,
55009
55059
  onFocus: handleFocus,
55010
55060
  onClean: handleClean,
55011
55061
  onOnEnter: handleEnter,
55012
55062
  onOnEnterValid: handleEnterValid
55013
- }), null, 16, ["id", "modelValue", "required", "rules", "label", "length"])]);
55063
+ }), null, 16, ["id", "modelValue", "required", "rules", "label", "length", "requiredMessage"])]);
55014
55064
  };
55015
55065
  }
55016
55066
  });
@@ -56084,10 +56134,11 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56084
56134
  label = optionsForLabelLookup.value.find(val => val.value === currentValue && typeof val.value === typeof currentValue);
56085
56135
  return label?.label !== undefined ? label.label : currentValue;
56086
56136
  });
56137
+ const formatRequiredMessage = () => props.requiredMessage.replace('%label%', props.label ?? '');
56087
56138
  const finalRules = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
56088
56139
  let rules = [...props.rules];
56089
56140
  if (props.required && typeof props.modelValue !== 'boolean') {
56090
- rules.unshift(val => val !== null && val !== undefined && val !== '' || props.requiredMessage.replace('%label%', props.label));
56141
+ rules.unshift(val => val !== null && val !== undefined && val !== '' || formatRequiredMessage());
56091
56142
  }
56092
56143
  return rules;
56093
56144
  });
@@ -56678,7 +56729,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56678
56729
  }
56679
56730
  } else if (props.required) {
56680
56731
  // Manejar el caso en que this.modelValue no es un array y es requerido
56681
- setMessageRule(`El campo ${props.label} es requerido`);
56732
+ setMessageRule(formatRequiredMessage());
56682
56733
  valid = false;
56683
56734
  }
56684
56735
  i++;
@@ -57864,6 +57915,9 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
57864
57915
  const handleReload = () => {
57865
57916
  if (paginationRef.value) {
57866
57917
  paginationRef.value.handleFirstPage();
57918
+ } else if (props.serverSide) {
57919
+ currentPage.value = 1;
57920
+ handleRequest(true);
57867
57921
  }
57868
57922
  };
57869
57923
  const dataSort = (rows, sortBy, descending) => {
@@ -58058,11 +58112,16 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
58058
58112
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.filter, () => {
58059
58113
  sortBy.value = null;
58060
58114
  descending.value = null;
58061
- if (paginationRef.value) {
58115
+ if (props.serverSide) {
58116
+ currentPage.value = 1;
58117
+ handleRequest(true);
58118
+ } else if (paginationRef.value) {
58062
58119
  handleReload();
58063
58120
  } else {
58064
58121
  handleRequest();
58065
58122
  }
58123
+ }, {
58124
+ deep: true
58066
58125
  });
58067
58126
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => numRowsByPage.value, newVal => {
58068
58127
  sortBy.value = null;