@finema/core 2.43.1 → 2.43.2
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/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -33,47 +33,58 @@
|
|
|
33
33
|
/>
|
|
34
34
|
</template>
|
|
35
35
|
</Input>
|
|
36
|
-
<
|
|
36
|
+
<Popover
|
|
37
37
|
v-else
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
:
|
|
41
|
-
:disabled="wrapperProps.disabled"
|
|
42
|
-
:leading-icon="leadingIcon"
|
|
43
|
-
:trailing-icon="trailingIcon"
|
|
44
|
-
:loading="loading"
|
|
45
|
-
:loading-icon="loadingIcon"
|
|
46
|
-
:name="name"
|
|
47
|
-
:placeholder="wrapperProps.placeholder"
|
|
48
|
-
:type="type"
|
|
49
|
-
:autofocus="!!autoFocus"
|
|
50
|
-
:icon="icon"
|
|
51
|
-
:readonly="readonly"
|
|
52
|
-
:ui="ui"
|
|
53
|
-
@update:model-value="onChange"
|
|
54
|
-
@focus="onFocus"
|
|
55
|
-
@blur="onBlur"
|
|
56
|
-
@keydown="onKeydown"
|
|
57
|
-
/>
|
|
58
|
-
<div
|
|
59
|
-
v-if="showSuggestions && filteredSuggestions.length > 0"
|
|
60
|
-
ref="suggestionsContainerRef"
|
|
61
|
-
:class="theme.suggestionsContainer()"
|
|
38
|
+
v-model:open="showSuggestions"
|
|
39
|
+
:dismissible="false"
|
|
40
|
+
:ui="{ content: 'w-(--reka-popper-anchor-width)' }"
|
|
62
41
|
>
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
<template #anchor>
|
|
43
|
+
<Input
|
|
44
|
+
ref="inputRef"
|
|
45
|
+
v-maska="activeMaskOptions"
|
|
46
|
+
:model-value="value"
|
|
47
|
+
:disabled="wrapperProps.disabled"
|
|
48
|
+
:leading-icon="leadingIcon"
|
|
49
|
+
:trailing-icon="trailingIcon"
|
|
50
|
+
:loading="loading"
|
|
51
|
+
:loading-icon="loadingIcon"
|
|
52
|
+
:name="name"
|
|
53
|
+
:placeholder="wrapperProps.placeholder"
|
|
54
|
+
:type="type"
|
|
55
|
+
:autofocus="!!autoFocus"
|
|
56
|
+
:icon="icon"
|
|
57
|
+
:readonly="readonly"
|
|
58
|
+
:ui="ui"
|
|
59
|
+
@update:model-value="onChange"
|
|
60
|
+
@focus="onFocus"
|
|
61
|
+
@blur="onBlur"
|
|
62
|
+
@keydown="onKeydown"
|
|
63
|
+
/>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<template #content>
|
|
67
|
+
<div
|
|
68
|
+
v-if="showSuggestions && filteredSuggestions.length > 0"
|
|
69
|
+
ref="suggestionsContainerRef"
|
|
70
|
+
:class="theme.suggestionsContainer()"
|
|
71
|
+
>
|
|
72
|
+
<div
|
|
73
|
+
v-for="(suggestion, index) in filteredSuggestions"
|
|
74
|
+
:key="suggestion"
|
|
75
|
+
:ref="(el) => setSuggestionItemRef(el, index)"
|
|
76
|
+
:class="[
|
|
68
77
|
theme.suggestionItem(),
|
|
69
78
|
{ [theme.suggestionItemActive()]: index === selectedSuggestionIndex }
|
|
70
79
|
]"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
@mousedown.prevent="selectSuggestion(suggestion, index)"
|
|
81
|
+
@mouseenter="selectedSuggestionIndex = index"
|
|
82
|
+
>
|
|
83
|
+
{{ suggestion }}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
</Popover>
|
|
77
88
|
</div>
|
|
78
89
|
</FieldWrapper>
|
|
79
90
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const inputTheme = {
|
|
2
2
|
slots: {
|
|
3
3
|
root: "w-full",
|
|
4
|
-
suggestionsContainer: "
|
|
4
|
+
suggestionsContainer: "w-full bg-white max-h-60 overflow-y-auto rounded-md",
|
|
5
5
|
suggestionItem: "px-3 py-3 text-sm cursor-pointer hover:bg-(--ui-color-primary-100) truncate",
|
|
6
6
|
suggestionItemActive: "bg-(--ui-color-primary-100)"
|
|
7
7
|
},
|
|
@@ -104,7 +104,7 @@ export class TimeHelper {
|
|
|
104
104
|
if (!time) {
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
|
-
const parsedTime =
|
|
107
|
+
const parsedTime = getTime(time);
|
|
108
108
|
const newTime = format(parsedTime, customFormat);
|
|
109
109
|
return isValid(parsedTime) ? newTime : time;
|
|
110
110
|
};
|
|
@@ -125,7 +125,7 @@ export class TimeHelper {
|
|
|
125
125
|
return null;
|
|
126
126
|
}
|
|
127
127
|
try {
|
|
128
|
-
const parsedTime =
|
|
128
|
+
const parsedTime = getTime(time);
|
|
129
129
|
const testTime = format(parsedTime, dateTimeFormat);
|
|
130
130
|
if (!isValid(parsedTime) || testTime === "Invalid Date") {
|
|
131
131
|
return time;
|
|
@@ -139,7 +139,7 @@ export class TimeHelper {
|
|
|
139
139
|
if (!time) {
|
|
140
140
|
return null;
|
|
141
141
|
}
|
|
142
|
-
const parsedTime =
|
|
142
|
+
const parsedTime = getTime(time);
|
|
143
143
|
const newTime = format(parsedTime, dateTimeFormat);
|
|
144
144
|
return isValid(parsedTime) ? newTime : time;
|
|
145
145
|
};
|
|
@@ -147,7 +147,7 @@ export class TimeHelper {
|
|
|
147
147
|
if (!time) {
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
150
|
-
const parsedTime =
|
|
150
|
+
const parsedTime = getTime(time);
|
|
151
151
|
const newTime = format(parsedTime, timeFormat);
|
|
152
152
|
return isValid(parsedTime) ? newTime : time;
|
|
153
153
|
};
|
|
@@ -158,10 +158,7 @@ export class TimeHelper {
|
|
|
158
158
|
if (!str) {
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
return str;
|
|
163
|
-
}
|
|
164
|
-
const parsedTime = new Date(str);
|
|
161
|
+
const parsedTime = getTime(str);
|
|
165
162
|
return isValid(parsedTime) ? parsedTime : null;
|
|
166
163
|
};
|
|
167
164
|
}
|