@weni/unnnic-system 3.25.4 → 3.25.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "3.25.4",
3
+ "version": "3.25.5",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -9,7 +9,7 @@
9
9
  :iconLeft="iconPosition === 'left' ? 'calendar_month' : undefined"
10
10
  :iconRight="iconPosition === 'right' ? 'calendar_month' : undefined"
11
11
  readonly
12
- :modelValue="overwrittenValue || filterText || ''"
12
+ :modelValue="inputText"
13
13
  :disabled="disabled"
14
14
  @click="openPopover"
15
15
  @focus="openPopover"
@@ -100,6 +100,8 @@ interface InputDatePickerProps {
100
100
  periodBaseDate?: string;
101
101
 
102
102
  disabled?: boolean;
103
+
104
+ disableShowOverwrittenValue?: boolean;
103
105
  }
104
106
 
105
107
  const props = withDefaults(defineProps<InputDatePickerProps>(), {
@@ -122,6 +124,7 @@ const props = withDefaults(defineProps<InputDatePickerProps>(), {
122
124
  hideOptions: false,
123
125
  periodBaseDate: '',
124
126
  disabled: false,
127
+ disableShowOverwrittenValue: false,
125
128
  });
126
129
 
127
130
  const emit = defineEmits<{
@@ -135,6 +138,14 @@ const popoverAlign = computed<'start' | 'end'>(() =>
135
138
  props.position === 'right' ? 'end' : 'start',
136
139
  );
137
140
 
141
+ const inputText = computed(() => {
142
+ if (props.disableShowOverwrittenValue) {
143
+ return filterText.value || '';
144
+ }
145
+
146
+ return overwrittenValue.value || filterText.value || '';
147
+ });
148
+
138
149
  const filterText = computed(() => {
139
150
  const dates: string[] = [];
140
151
 
@@ -96,3 +96,10 @@ export const WithHiddenOptions = {
96
96
  hideOptions: true,
97
97
  },
98
98
  };
99
+
100
+ export const WithDisableShowOverwrittenValue = {
101
+ args: {
102
+ size: 'sm',
103
+ disableShowOverwrittenValue: true,
104
+ },
105
+ };