@finema/core 2.43.0 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.43.0",
3
+ "version": "2.43.2",
4
4
  "configKey": "core",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import * as lodash from 'lodash-es';
4
4
  import * as theme from '../dist/runtime/theme/index.js';
5
5
 
6
6
  const name = "@finema/core";
7
- const version = "2.43.0";
7
+ const version = "2.43.2";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -33,47 +33,58 @@
33
33
  />
34
34
  </template>
35
35
  </Input>
36
- <Input
36
+ <Popover
37
37
  v-else
38
- ref="inputRef"
39
- v-maska="activeMaskOptions"
40
- :model-value="value"
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
- <div
64
- v-for="(suggestion, index) in filteredSuggestions"
65
- :key="suggestion"
66
- :ref="(el) => setSuggestionItemRef(el, index)"
67
- :class="[
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
- @mousedown.prevent="selectSuggestion(suggestion, index)"
72
- @mouseenter="selectedSuggestionIndex = index"
73
- >
74
- {{ suggestion }}
75
- </div>
76
- </div>
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: "absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-md shadow max-h-60 overflow-y-auto",
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
  },
@@ -1,4 +1,4 @@
1
- import { addYears, format, formatISO, isDate, isValid, parse } from "date-fns";
1
+ import { addYears, format, formatISO, isDate, isValid } from "date-fns";
2
2
  import * as locales from "date-fns/locale";
3
3
  import { formatInTimeZone } from "date-fns-tz";
4
4
  import { useCoreConfig } from "#core/composables/useConfig";
@@ -79,7 +79,7 @@ export class TimeHelper {
79
79
  }
80
80
  try {
81
81
  const parsedTime = getTime(time);
82
- const newTime = formatInTimeZone(parsedTime, "Zulu", dateTimeFormat);
82
+ const newTime = formatInTimeZone(parsedTime, "UTC", dateTimeFormat);
83
83
  return isValid(parsedTime) ? newTime : time;
84
84
  } catch (e) {
85
85
  return time.toString();
@@ -104,7 +104,7 @@ export class TimeHelper {
104
104
  if (!time) {
105
105
  return null;
106
106
  }
107
- const parsedTime = isDate(time) ? time : parse(time, dateTimeFormat, /* @__PURE__ */ new Date());
107
+ const parsedTime = getTime(time);
108
108
  const newTime = format(parsedTime, customFormat);
109
109
  return isValid(parsedTime) ? newTime : time;
110
110
  };
@@ -116,7 +116,7 @@ export class TimeHelper {
116
116
  if (!localTime) {
117
117
  return null;
118
118
  }
119
- const parsedTime = isDate(localTime) ? localTime : parse(localTime, dateTimeFormat, /* @__PURE__ */ new Date());
119
+ const parsedTime = isDate(localTime) ? localTime : getTime(time);
120
120
  const newTime = format(parsedTime, customFormat);
121
121
  return isValid(parsedTime) ? newTime : time;
122
122
  };
@@ -125,7 +125,7 @@ export class TimeHelper {
125
125
  return null;
126
126
  }
127
127
  try {
128
- const parsedTime = isDate(time) ? time : parse(time, dateTimeFormat, /* @__PURE__ */ new Date());
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 = isDate(time) ? time : parse(time, dateTimeFormat, /* @__PURE__ */ new Date());
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 = isDate(time) ? time : parse(time, dateTimeFormat, /* @__PURE__ */ new Date());
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
- if (isDate(str)) {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.43.0",
3
+ "version": "2.43.2",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",