@alexochihua/exos-library-components 2.25.29 → 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.
@@ -53942,7 +53942,8 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
53942
53942
  const hiddenInputId = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => `e-input-mask-hidden-${instance.uid}`);
53943
53943
  const inputRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(null);
53944
53944
  const displayValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)('');
53945
- 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)('');
53946
53947
  const isCleaning = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
53947
53948
  const lastValidationResult = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(true);
53948
53949
 
@@ -54079,6 +54080,7 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54079
54080
  // Excluimos todas las props de EInputMask para evitar pasarlas a EInput
54080
54081
  const excludedProps = ['maskPattern', 'hiddenChar', 'preset', 'saveFormatted', 'visiblePrefix', 'visibleSuffix', 'decimals', 'currencySymbol', 'cardLengths', 'invalidCardMessage', 'invalidCardLengthMessage', 'required', 'rules', 'label', 'requiredMessage', 'invalidPhoneMessage', 'invalidNssMessage', 'invalidCurrencyMessage', 'invalidPercentageMessage'];
54081
54082
  const inputProps = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
54083
+ console.log(props.label, 'attrs', attrs);
54082
54084
  const result = {};
54083
54085
  for (const key in attrs) {
54084
54086
  if (!excludedProps.includes(key)) {
@@ -54936,12 +54938,21 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54936
54938
  return;
54937
54939
  }
54938
54940
 
54939
- // Comparar con el valor correcto según saveFormatted
54940
- const currentEmitValue = getEmitValue(realValue.value, displayValue.value);
54941
- if (newValue !== currentEmitValue) {
54942
- const formatted = formatInitialValue(newValue);
54943
- displayValue.value = formatted.displayValue;
54944
- 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);
54945
54956
  }
54946
54957
  }, {
54947
54958
  immediate: true
@@ -54958,11 +54969,6 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54958
54969
 
54959
54970
  // Lifecycle
54960
54971
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.onMounted)(() => {
54961
- if (props.modelValue || props.modelValue === '0') {
54962
- const formatted = formatInitialValue(props.modelValue);
54963
- displayValue.value = formatted.displayValue;
54964
- realValue.value = formatted.realValue;
54965
- }
54966
54972
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.nextTick)(() => {
54967
54973
  const input = getNativeInput();
54968
54974
  if (input) {
@@ -55029,13 +55035,14 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
55029
55035
  rules: inputRules.value || inputProps.value.rules,
55030
55036
  label: __props.label || inputProps.value.label,
55031
55037
  length: inputLength.value || inputProps.value.length,
55038
+ requiredMessage: __props.requiredMessage || inputProps.value.requiredMessage,
55032
55039
  "onUpdate:modelValue": handleDisplayUpdate,
55033
55040
  onBlur: handleBlur,
55034
55041
  onFocus: handleFocus,
55035
55042
  onClean: handleClean,
55036
55043
  onOnEnter: handleEnter,
55037
55044
  onOnEnterValid: handleEnterValid
55038
- }), null, 16, ["id", "modelValue", "required", "rules", "label", "length"])]);
55045
+ }), null, 16, ["id", "modelValue", "required", "rules", "label", "length", "requiredMessage"])]);
55039
55046
  };
55040
55047
  }
55041
55048
  });
@@ -56109,10 +56116,11 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56109
56116
  label = optionsForLabelLookup.value.find(val => val.value === currentValue && typeof val.value === typeof currentValue);
56110
56117
  return label?.label !== undefined ? label.label : currentValue;
56111
56118
  });
56119
+ const formatRequiredMessage = () => props.requiredMessage.replace('%label%', props.label ?? '');
56112
56120
  const finalRules = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.computed)(() => {
56113
56121
  let rules = [...props.rules];
56114
56122
  if (props.required && typeof props.modelValue !== 'boolean') {
56115
- rules.unshift(val => val !== null && val !== undefined && val !== '' || props.requiredMessage.replace('%label%', props.label));
56123
+ rules.unshift(val => val !== null && val !== undefined && val !== '' || formatRequiredMessage());
56116
56124
  }
56117
56125
  return rules;
56118
56126
  });
@@ -56703,7 +56711,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56703
56711
  }
56704
56712
  } else if (props.required) {
56705
56713
  // Manejar el caso en que this.modelValue no es un array y es requerido
56706
- setMessageRule(`El campo ${props.label} es requerido`);
56714
+ setMessageRule(formatRequiredMessage());
56707
56715
  valid = false;
56708
56716
  }
56709
56717
  i++;
@@ -57889,6 +57897,9 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
57889
57897
  const handleReload = () => {
57890
57898
  if (paginationRef.value) {
57891
57899
  paginationRef.value.handleFirstPage();
57900
+ } else if (props.serverSide) {
57901
+ currentPage.value = 1;
57902
+ handleRequest(true);
57892
57903
  }
57893
57904
  };
57894
57905
  const dataSort = (rows, sortBy, descending) => {
@@ -58083,11 +58094,16 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
58083
58094
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => props.filter, () => {
58084
58095
  sortBy.value = null;
58085
58096
  descending.value = null;
58086
- if (paginationRef.value) {
58097
+ if (props.serverSide) {
58098
+ currentPage.value = 1;
58099
+ handleRequest(true);
58100
+ } else if (paginationRef.value) {
58087
58101
  handleReload();
58088
58102
  } else {
58089
58103
  handleRequest();
58090
58104
  }
58105
+ }, {
58106
+ deep: true
58091
58107
  });
58092
58108
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.watch)(() => numRowsByPage.value, newVal => {
58093
58109
  sortBy.value = null;
@@ -53960,7 +53960,8 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
53960
53960
  const hiddenInputId = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => `e-input-mask-hidden-${instance.uid}`);
53961
53961
  const inputRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
53962
53962
  const displayValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)('');
53963
- 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)('');
53964
53965
  const isCleaning = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
53965
53966
  const lastValidationResult = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(true);
53966
53967
 
@@ -54097,6 +54098,7 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54097
54098
  // Excluimos todas las props de EInputMask para evitar pasarlas a EInput
54098
54099
  const excludedProps = ['maskPattern', 'hiddenChar', 'preset', 'saveFormatted', 'visiblePrefix', 'visibleSuffix', 'decimals', 'currencySymbol', 'cardLengths', 'invalidCardMessage', 'invalidCardLengthMessage', 'required', 'rules', 'label', 'requiredMessage', 'invalidPhoneMessage', 'invalidNssMessage', 'invalidCurrencyMessage', 'invalidPercentageMessage'];
54099
54100
  const inputProps = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
54101
+ console.log(props.label, 'attrs', attrs);
54100
54102
  const result = {};
54101
54103
  for (const key in attrs) {
54102
54104
  if (!excludedProps.includes(key)) {
@@ -54954,12 +54956,21 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54954
54956
  return;
54955
54957
  }
54956
54958
 
54957
- // Comparar con el valor correcto según saveFormatted
54958
- const currentEmitValue = getEmitValue(realValue.value, displayValue.value);
54959
- if (newValue !== currentEmitValue) {
54960
- const formatted = formatInitialValue(newValue);
54961
- displayValue.value = formatted.displayValue;
54962
- 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);
54963
54974
  }
54964
54975
  }, {
54965
54976
  immediate: true
@@ -54976,11 +54987,6 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
54976
54987
 
54977
54988
  // Lifecycle
54978
54989
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
54979
- if (props.modelValue || props.modelValue === '0') {
54980
- const formatted = formatInitialValue(props.modelValue);
54981
- displayValue.value = formatted.displayValue;
54982
- realValue.value = formatted.realValue;
54983
- }
54984
54990
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
54985
54991
  const input = getNativeInput();
54986
54992
  if (input) {
@@ -55047,13 +55053,14 @@ const EInputMaskvue_type_script_setup_true_lang_js_hoisted_2 = ["id", "value"];
55047
55053
  rules: inputRules.value || inputProps.value.rules,
55048
55054
  label: __props.label || inputProps.value.label,
55049
55055
  length: inputLength.value || inputProps.value.length,
55056
+ requiredMessage: __props.requiredMessage || inputProps.value.requiredMessage,
55050
55057
  "onUpdate:modelValue": handleDisplayUpdate,
55051
55058
  onBlur: handleBlur,
55052
55059
  onFocus: handleFocus,
55053
55060
  onClean: handleClean,
55054
55061
  onOnEnter: handleEnter,
55055
55062
  onOnEnterValid: handleEnterValid
55056
- }), null, 16, ["id", "modelValue", "required", "rules", "label", "length"])]);
55063
+ }), null, 16, ["id", "modelValue", "required", "rules", "label", "length", "requiredMessage"])]);
55057
55064
  };
55058
55065
  }
55059
55066
  });
@@ -56127,10 +56134,11 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56127
56134
  label = optionsForLabelLookup.value.find(val => val.value === currentValue && typeof val.value === typeof currentValue);
56128
56135
  return label?.label !== undefined ? label.label : currentValue;
56129
56136
  });
56137
+ const formatRequiredMessage = () => props.requiredMessage.replace('%label%', props.label ?? '');
56130
56138
  const finalRules = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
56131
56139
  let rules = [...props.rules];
56132
56140
  if (props.required && typeof props.modelValue !== 'boolean') {
56133
- rules.unshift(val => val !== null && val !== undefined && val !== '' || props.requiredMessage.replace('%label%', props.label));
56141
+ rules.unshift(val => val !== null && val !== undefined && val !== '' || formatRequiredMessage());
56134
56142
  }
56135
56143
  return rules;
56136
56144
  });
@@ -56721,7 +56729,7 @@ const DROPDOWN_MAX_HEIGHT_VH = 0.4;
56721
56729
  }
56722
56730
  } else if (props.required) {
56723
56731
  // Manejar el caso en que this.modelValue no es un array y es requerido
56724
- setMessageRule(`El campo ${props.label} es requerido`);
56732
+ setMessageRule(formatRequiredMessage());
56725
56733
  valid = false;
56726
56734
  }
56727
56735
  i++;
@@ -57907,6 +57915,9 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
57907
57915
  const handleReload = () => {
57908
57916
  if (paginationRef.value) {
57909
57917
  paginationRef.value.handleFirstPage();
57918
+ } else if (props.serverSide) {
57919
+ currentPage.value = 1;
57920
+ handleRequest(true);
57910
57921
  }
57911
57922
  };
57912
57923
  const dataSort = (rows, sortBy, descending) => {
@@ -58101,11 +58112,16 @@ const ETablevue_type_script_setup_true_lang_js_hoisted_20 = {
58101
58112
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.filter, () => {
58102
58113
  sortBy.value = null;
58103
58114
  descending.value = null;
58104
- if (paginationRef.value) {
58115
+ if (props.serverSide) {
58116
+ currentPage.value = 1;
58117
+ handleRequest(true);
58118
+ } else if (paginationRef.value) {
58105
58119
  handleReload();
58106
58120
  } else {
58107
58121
  handleRequest();
58108
58122
  }
58123
+ }, {
58124
+ deep: true
58109
58125
  });
58110
58126
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => numRowsByPage.value, newVal => {
58111
58127
  sortBy.value = null;