@finema/core 1.4.61 → 1.4.63

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": "1.4.61",
3
+ "version": "1.4.63",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
2
 
3
3
  const name = "@finema/core";
4
- const version = "1.4.61";
4
+ const version = "1.4.63";
5
5
 
6
6
  const colors = {
7
7
  black: "#20243E",
@@ -384,6 +384,10 @@ const module = defineNuxtModule({
384
384
  nuxtRunTimeConfigOptions,
385
385
  nuxt.options.runtimeConfig
386
386
  );
387
+ nuxt.options.build = {
388
+ ...nuxt.options.build || {},
389
+ transpile: [...nuxt.options.build?.transpile || [], "date-fns"]
390
+ };
387
391
  await installModule("@pinia/nuxt");
388
392
  await installModule("@vee-validate/nuxt", veeValidateNuxtOptions);
389
393
  await installModule("nuxt-security", nuxtSecurityOptions);
@@ -6,9 +6,9 @@
6
6
  </template>
7
7
  <script lang="ts" setup>
8
8
  import { type PropType } from 'vue'
9
- import { type AlertColor, type AlertVariant, type Avatar, type Button } from '#ui/types'
10
9
  import type { Strategy } from '#core/types/utils'
11
10
  import { type alert } from '#ui/ui.config'
11
+ import type { AlertColor, AlertVariant, Avatar, Button } from '#ui/types'
12
12
 
13
13
  defineProps({
14
14
  title: {
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script lang="ts" setup>
6
6
  import { type PropType } from '#imports'
7
- import { type AvatarSize } from '#ui/types'
7
+ import type { AvatarSize } from '#ui/types'
8
8
 
9
9
  defineOptions({
10
10
  inheritAttrs: true,
@@ -14,9 +14,9 @@
14
14
 
15
15
  <script setup lang="ts">
16
16
  import { useUiConfig, type PropType, useUI, toRef } from '#imports'
17
- import { type BadgeSize, type BadgeColor, type BadgeVariant } from '#ui/types'
18
17
  import { badge } from '#core/ui.config'
19
18
  import type { Strategy } from '#core/types/utils'
19
+ import type { BadgeColor, BadgeSize, BadgeVariant } from '#ui/types'
20
20
 
21
21
  const config = useUiConfig<typeof badge>(badge, 'badge')
22
22
 
@@ -16,9 +16,8 @@
16
16
 
17
17
  <script setup lang="ts">
18
18
  import { useUiConfig, type PropType, useUI, toRef } from '#imports'
19
- import { type BreadcrumbLink } from '#ui/types'
20
- import type { Strategy } from '#core/types/utils'
21
19
  import { breadcrumb } from '#core/ui.config'
20
+ import type { BreadcrumbLink, Strategy } from '#ui/types'
22
21
 
23
22
  const config = useUiConfig<typeof breadcrumb>(breadcrumb, 'breadcrumb')
24
23
 
@@ -5,10 +5,10 @@
5
5
  </template>
6
6
 
7
7
  <script lang="ts" setup>
8
- import { type PropType } from '#imports'
9
- import { type ButtonSize } from '#ui/types/button'
10
- import { type Strategy } from '#core/types/utils'
11
- import { type buttonGroup, button } from '#ui/ui.config'
8
+ import type { PropType } from 'vue'
9
+ import type { ButtonSize } from '#ui/types/button'
10
+ import { button, type buttonGroup } from '#ui/ui.config'
11
+ import type { Strategy } from '#ui/types'
12
12
 
13
13
  defineProps({
14
14
  size: {
@@ -7,11 +7,10 @@
7
7
  </template>
8
8
 
9
9
  <script lang="ts" setup>
10
- import { type PropType } from '#imports'
11
- import { type ButtonSize, type ButtonColor, type ButtonVariant } from '#ui/types/button'
12
- import { type Strategy } from '#core/types/utils'
13
10
  import { type button } from '#ui/ui.config'
14
11
  import { UButton } from '#components'
12
+ import type { ButtonColor, ButtonSize, ButtonVariant } from '#ui/types/button'
13
+ import type { PropType } from 'vue'
15
14
 
16
15
  defineProps({
17
16
  ...UButton.props,
@@ -14,8 +14,8 @@
14
14
 
15
15
  <script setup lang="ts">
16
16
  import { useUiConfig, type PropType, useUI, toRef } from '#imports'
17
- import type { Strategy } from '#core/types/utils'
18
17
  import { card } from '#core/ui.config'
18
+ import type { Strategy } from '#ui/types'
19
19
 
20
20
  const config = useUiConfig<typeof card>(card, 'card')
21
21
 
@@ -19,10 +19,9 @@
19
19
 
20
20
  <script lang="ts" setup>
21
21
  import { type PropType, useUiConfig, useUI, toRef } from '#imports'
22
- import { type DropdownItem } from '#ui/types'
23
- import type { Strategy } from '#core/types/utils'
24
22
  import { dropdown } from '#ui/ui.config'
25
23
  import { DropdownPlacementArray, type DropdownPlacement } from './types'
24
+ import type { DropdownItem, Strategy } from '#ui/types'
26
25
 
27
26
  const config = useUiConfig<typeof dropdown>(dropdown, 'dropdown')
28
27
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  <script lang="ts" setup>
19
19
  import { type IFieldProps } from '#core/components/Form/types'
20
- import { type FormGroupSize } from '#ui/types/form-group'
20
+ import type { FormGroupSize } from '#ui/types'
21
21
 
22
22
  defineProps<IFieldProps>()
23
23
  </script>
@@ -25,9 +25,9 @@
25
25
  <script lang="ts" setup>
26
26
  import { useUiConfig } from '../composables/useConfig'
27
27
  import { pagination } from '#core/ui.config'
28
- import { type ButtonSize } from '#ui/types'
29
28
  import { useUI, type PropType, toRef, computed } from '#imports'
30
- import { type Strategy } from '../types/utils'
29
+ import type { ButtonSize } from '#ui/types/button'
30
+ import type { Strategy } from '#ui/types'
31
31
 
32
32
  const config = useUiConfig<typeof pagination>(pagination, 'pagination')
33
33
 
@@ -21,9 +21,9 @@
21
21
 
22
22
  <script setup lang="ts">
23
23
  import { useUiConfig, type PropType, useUI, toRef } from '#imports'
24
- import { type TabItem } from '#ui/types'
25
24
  import type { Strategy } from '#core/types/utils'
26
25
  import { tabs } from '#core/ui.config'
26
+ import type { TabItem } from '#ui/types'
27
27
 
28
28
  const config = useUiConfig<typeof tabs>(tabs, 'tabs')
29
29
 
@@ -1,5 +1,5 @@
1
1
  import { addHours, addYears, format, formatISO, isDate, isValid, parse, subHours } from "date-fns";
2
- import th from "date-fns/locale/th/index";
2
+ import * as locales from "date-fns/locale";
3
3
  import { useCoreConfig } from "#core/composables/useConfig";
4
4
  const dateFormat = useCoreConfig().date_format;
5
5
  const dateTimeFormat = useCoreConfig().date_time_format;
@@ -14,7 +14,7 @@ export class TimeHelper {
14
14
  newDateStr = addYears(dateStr, 543);
15
15
  }
16
16
  if (isThaiMonth) {
17
- options.locale = th;
17
+ options.locale = locales.th;
18
18
  }
19
19
  return format(newDateStr, formatStr, options);
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.61",
3
+ "version": "1.4.63",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",
@@ -38,7 +38,7 @@
38
38
  "@pinia/nuxt": "^0.5.1",
39
39
  "@vee-validate/nuxt": "^4.12.5",
40
40
  "@vee-validate/zod": "^4.12.5",
41
- "@vuepic/vue-datepicker": "^7.4.1",
41
+ "@vuepic/vue-datepicker": "^8.1.0",
42
42
  "axios": "^1.6.7",
43
43
  "date-fns": "^3.3.1",
44
44
  "i18next": "^23.8.2",