@finema/core 3.20.0 → 3.20.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.
Files changed (56) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +53 -60
  3. package/dist/runtime/components/App.d.vue.ts +2 -2
  4. package/dist/runtime/components/App.vue.d.ts +2 -2
  5. package/dist/runtime/components/Empty.d.vue.ts +1 -1
  6. package/dist/runtime/components/Empty.vue.d.ts +1 -1
  7. package/dist/runtime/components/FlexDeck/index.vue +79 -79
  8. package/dist/runtime/components/Form/FieldWrapper.d.vue.ts +2 -2
  9. package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
  10. package/dist/runtime/components/Form/FieldWrapper.vue.d.ts +2 -2
  11. package/dist/runtime/components/Form/Fields.vue +13 -13
  12. package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
  13. package/dist/runtime/components/Form/InputCheckboxGroup/index.vue +21 -21
  14. package/dist/runtime/components/Form/InputCurrency/index.vue +49 -49
  15. package/dist/runtime/components/Form/InputDateTime/index.vue +63 -63
  16. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +56 -56
  17. package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
  18. package/dist/runtime/components/Form/InputSelect/index.vue +110 -110
  19. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +118 -118
  20. package/dist/runtime/components/Form/InputTags/index.d.vue.ts +2 -2
  21. package/dist/runtime/components/Form/InputTags/index.vue +54 -54
  22. package/dist/runtime/components/Form/InputTags/index.vue.d.ts +2 -2
  23. package/dist/runtime/components/Form/InputText/index.vue +86 -86
  24. package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
  25. package/dist/runtime/components/Form/InputTime/index.vue +38 -38
  26. package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
  27. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
  28. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +50 -50
  29. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +50 -50
  30. package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +50 -50
  31. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadNode.vue +18 -18
  32. package/dist/runtime/components/Form/InputWYSIWYG/EditorLinkPopover.vue +65 -65
  33. package/dist/runtime/components/Form/InputWYSIWYG/README.md +96 -96
  34. package/dist/runtime/components/Form/InputWYSIWYG/index.vue +41 -41
  35. package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
  36. package/dist/runtime/components/Form/fileState/FailedState.vue +33 -33
  37. package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
  38. package/dist/runtime/components/Form/fileState/MultipleFilesState.vue +75 -75
  39. package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
  40. package/dist/runtime/components/Form/index.vue +5 -5
  41. package/dist/runtime/components/Image.vue +28 -28
  42. package/dist/runtime/components/Log/index.vue +17 -17
  43. package/dist/runtime/components/Table/Base.d.vue.ts +4 -4
  44. package/dist/runtime/components/Table/Base.vue +117 -117
  45. package/dist/runtime/components/Table/Base.vue.d.ts +4 -4
  46. package/dist/runtime/components/Table/ColumnDate.vue +1 -1
  47. package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
  48. package/dist/runtime/components/Table/ColumnImage.vue +4 -4
  49. package/dist/runtime/components/Table/ColumnText.vue +10 -10
  50. package/dist/runtime/components/Table/Pagination.vue +62 -62
  51. package/dist/runtime/components/Table/Simple.vue +19 -19
  52. package/dist/runtime/components/Table/index.vue +33 -33
  53. package/dist/runtime/components/TeleportSafe.d.vue.ts +2 -2
  54. package/dist/runtime/components/TeleportSafe.vue.d.ts +2 -2
  55. package/dist/runtime/server/tsconfig.json +3 -3
  56. package/package.json +10 -10
@@ -1,14 +1,14 @@
1
1
  <template>
2
- <NuxtLink
3
- v-if="column.meta?.link"
4
- v-bind="column.meta.link"
5
- >
6
- {{ getValue }}
7
- </NuxtLink>
8
-
9
- <span v-else>
10
- {{ getValue }}
11
- </span>
2
+ <NuxtLink
3
+ v-if="column.meta?.link"
4
+ v-bind="column.meta.link"
5
+ >
6
+ {{ getValue }}
7
+ </NuxtLink>
8
+
9
+ <span v-else>
10
+ {{ getValue }}
11
+ </span>
12
12
  </template>
13
13
 
14
14
  <script setup>
@@ -1,90 +1,90 @@
1
1
  <template>
2
- <div
2
+ <div
3
3
  :class="
4
4
  theme.paginationContainer({
5
5
  class: [ui?.paginationContainer]
6
6
  })
7
- "
8
- >
9
- <div
7
+ "
8
+ >
9
+ <div
10
10
  :class="
11
11
  theme.paginationInfoWrapper({
12
12
  class: [ui?.paginationInfoWrapper]
13
13
  })
14
- "
15
- >
16
- <USelect
17
- v-if="options.pageOptions && !options.isHideLimitSelect"
18
- size="lg"
19
- trailing="รายการ"
14
+ "
15
+ >
16
+ <USelect
17
+ v-if="options.pageOptions && !options.isHideLimitSelect"
18
+ size="lg"
19
+ trailing="รายการ"
20
20
  :class="
21
21
  theme.paginationLimitSelect({
22
22
  class: [ui?.paginationLimitSelect, 'cursor-pointer']
23
23
  })
24
- "
25
- :items="pageLimitItems"
26
- :model-value="pageLimit"
27
- @update:modelValue="emits('pageLimitChange', $event)"
28
- >
29
- <template #default="{ modelValue }">
30
- <p
24
+ "
25
+ :items="pageLimitItems"
26
+ :model-value="pageLimit"
27
+ @update:modelValue="emits('pageLimitChange', $event)"
28
+ >
29
+ <template #default="{ modelValue }">
30
+ <p
31
31
  :class="
32
32
  theme.paginationLimitSelectLabel({
33
33
  class: [ui?.paginationLimitSelectLabel]
34
34
  })
35
- "
36
- >
37
- {{ modelValue }}
38
- {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
39
- </p>
40
- </template>
41
- </USelect>
42
- <p
35
+ "
36
+ >
37
+ {{ modelValue }}
38
+ {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
39
+ </p>
40
+ </template>
41
+ </USelect>
42
+ <p
43
43
  :class="
44
44
  theme.paginationInfo({
45
45
  class: [ui?.paginationInfo, '']
46
46
  })
47
- "
48
- >
49
- <span v-if="options.pageOptions">{{ pageBetween }}
50
- {{ appConfig.core?.locale === "th" ? "\u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "of total" }}
51
- {{ totalCountWithComma }}</span>
52
- <span v-else>{{ appConfig.core?.locale === "th" ? "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "Total" }}
53
- {{ options.rawData.length }}
54
- {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}</span>
55
- </p>
56
- </div>
57
- <UPagination
58
- v-if="options.pageOptions && options.pageOptions.totalPage > 1"
59
- :page="page"
60
- :default-page="options.pageOptions?.currentPage || 1"
61
- :items-per-page="options.pageOptions.limit"
62
- :total="options.pageOptions.totalCount"
63
- :to="options.isRouteChange ? to : void 0"
64
- show-edges
65
- variant="outline"
66
- color="neutral"
67
- active-color="neutral"
68
- active-variant="subtle"
69
- @update:page="emits('pageChange', $event)"
70
- >
71
- <template #item="{ item, page }">
72
- <Button
73
- :variant="page === item.value ? 'subtle' : 'outline'"
74
- :color="page === item.value ? 'neutral' : 'neutral'"
75
- :label="String(NumberHelper.withComma(item.value))"
76
- :ui="{ label: themePagination.label }"
77
- square
78
- :to="options.isRouteChange ? to?.(item.value) : void 0"
47
+ "
48
+ >
49
+ <span v-if="options.pageOptions">{{ pageBetween }}
50
+ {{ appConfig.core?.locale === "th" ? "\u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "of total" }}
51
+ {{ totalCountWithComma }}</span>
52
+ <span v-else>{{ appConfig.core?.locale === "th" ? "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "Total" }}
53
+ {{ options.rawData.length }}
54
+ {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}</span>
55
+ </p>
56
+ </div>
57
+ <UPagination
58
+ v-if="options.pageOptions && options.pageOptions.totalPage > 1"
59
+ :page="page"
60
+ :default-page="options.pageOptions?.currentPage || 1"
61
+ :items-per-page="options.pageOptions.limit"
62
+ :total="options.pageOptions.totalCount"
63
+ :to="options.isRouteChange ? to : void 0"
64
+ show-edges
65
+ variant="outline"
66
+ color="neutral"
67
+ active-color="neutral"
68
+ active-variant="subtle"
69
+ @update:page="emits('pageChange', $event)"
70
+ >
71
+ <template #item="{ item, page }">
72
+ <Button
73
+ :variant="page === item.value ? 'subtle' : 'outline'"
74
+ :color="page === item.value ? 'neutral' : 'neutral'"
75
+ :label="String(NumberHelper.withComma(item.value))"
76
+ :ui="{ label: themePagination.label }"
77
+ square
78
+ :to="options.isRouteChange ? to?.(item.value) : void 0"
79
79
  :class="
80
80
  theme.buttonPagination({
81
81
  class: [ui?.buttonPagination]
82
82
  })
83
- "
84
- />
85
- </template>
86
- </UPagination>
87
- </div>
83
+ "
84
+ />
85
+ </template>
86
+ </UPagination>
87
+ </div>
88
88
  </template>
89
89
 
90
90
  <script setup>
@@ -1,28 +1,28 @@
1
1
  <template>
2
- <Base
3
- v-bind="$attrs"
2
+ <Base
3
+ v-bind="$attrs"
4
4
  :options="{
5
5
  ...options,
6
6
  pageOptions,
7
7
  isHideLimitSelect: true,
8
8
  rawData: itemsByPage
9
- }"
10
- :ui="computedUi"
11
- :to="to"
12
- :target="target"
13
- :preserve-query="preserveQuery"
14
- @page-change="onPageChange"
15
- >
16
- <template
17
- v-for="(_, slot) of $slots"
18
- #[slot]="slotProps"
19
- >
20
- <slot
21
- :name="slot"
22
- v-bind="slotProps || {}"
23
- />
24
- </template>
25
- </Base>
9
+ }"
10
+ :ui="computedUi"
11
+ :to="to"
12
+ :target="target"
13
+ :preserve-query="preserveQuery"
14
+ @page-change="onPageChange"
15
+ >
16
+ <template
17
+ v-for="(_, slot) of $slots"
18
+ #[slot]="slotProps"
19
+ >
20
+ <slot
21
+ :name="slot"
22
+ v-bind="slotProps || {}"
23
+ />
24
+ </template>
25
+ </Base>
26
26
  </template>
27
27
 
28
28
  <script setup>
@@ -1,41 +1,41 @@
1
1
  <template>
2
- <div ref="tableContainer">
3
- <div
4
- v-if="options.isEnabledSearch"
2
+ <div ref="tableContainer">
3
+ <div
4
+ v-if="options.isEnabledSearch"
5
5
  :class="
6
6
  theme.searchContainer({
7
7
  class: [ui?.searchContainer]
8
8
  })
9
- "
10
- >
11
- <Input
12
- v-model="q"
13
- icon="i-heroicons-magnifying-glass"
14
- :placeholder="options.searchPlaceholder || '\u0E04\u0E49\u0E19\u0E2B\u0E32....'"
15
- />
16
- </div>
17
- <Base
18
- v-bind="$attrs"
19
- :options="options"
20
- :ui="computedUi"
21
- :column-pinning="computedColumnPinning"
22
- :to="to"
23
- :target="target"
24
- :preserve-query="preserveQuery"
25
- @page-change="onPageChange"
26
- @search="emits('search', q)"
27
- >
28
- <template
29
- v-for="(_, slot) of $slots"
30
- #[slot]="slotProps"
31
- >
32
- <slot
33
- :name="slot"
34
- v-bind="slotProps || {}"
35
- />
36
- </template>
37
- </Base>
38
- </div>
9
+ "
10
+ >
11
+ <Input
12
+ v-model="q"
13
+ icon="i-heroicons-magnifying-glass"
14
+ :placeholder="options.searchPlaceholder || '\u0E04\u0E49\u0E19\u0E2B\u0E32....'"
15
+ />
16
+ </div>
17
+ <Base
18
+ v-bind="$attrs"
19
+ :options="options"
20
+ :ui="computedUi"
21
+ :column-pinning="computedColumnPinning"
22
+ :to="to"
23
+ :target="target"
24
+ :preserve-query="preserveQuery"
25
+ @page-change="onPageChange"
26
+ @search="emits('search', q)"
27
+ >
28
+ <template
29
+ v-for="(_, slot) of $slots"
30
+ #[slot]="slotProps"
31
+ >
32
+ <slot
33
+ :name="slot"
34
+ v-bind="slotProps || {}"
35
+ />
36
+ </template>
37
+ </Base>
38
+ </div>
39
39
  </template>
40
40
 
41
41
  <script setup>
@@ -2,9 +2,9 @@ type __VLS_Props = {
2
2
  to: string;
3
3
  disabled?: boolean;
4
4
  };
5
- declare var __VLS_6: {};
5
+ declare var __VLS_7: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_6) => any;
7
+ default?: (props: typeof __VLS_7) => any;
8
8
  };
9
9
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -2,9 +2,9 @@ type __VLS_Props = {
2
2
  to: string;
3
3
  disabled?: boolean;
4
4
  };
5
- declare var __VLS_6: {};
5
+ declare var __VLS_7: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_6) => any;
7
+ default?: (props: typeof __VLS_7) => any;
8
8
  };
9
9
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,3 +1,3 @@
1
- {
2
- "extends": "../../../.nuxt/tsconfig.server.json",
3
- }
1
+ {
2
+ "extends": "../../../.nuxt/tsconfig.server.json",
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "3.20.0",
3
+ "version": "3.20.2",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",
@@ -43,8 +43,8 @@
43
43
  "@iconify-json/heroicons": "^1.2.2",
44
44
  "@iconify-json/ph": "^1.2.2",
45
45
  "@iconify-json/svg-spinners": "^1.2.2",
46
- "@nuxt/kit": "^4.1.3",
47
- "@nuxt/ui": "^4.5.0",
46
+ "@nuxt/kit": "^4.4.8",
47
+ "@nuxt/ui": "^4.8.2",
48
48
  "@pinia/nuxt": "^0.11.0",
49
49
  "@tailwindcss/typography": "^0.5.0-alpha.3",
50
50
  "@tiptap/extension-text-align": "^3.18.0",
@@ -63,18 +63,18 @@
63
63
  "url-join": "^5.0.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@eslint/js": "^9.26.0",
66
+ "@eslint/js": "^10.0.1",
67
67
  "@finema/eslint-config": "^2.0.4",
68
- "@nuxt/devtools": "^2.6.0",
68
+ "@nuxt/devtools": "^3.2.4",
69
69
  "@nuxt/eslint-config": "^1.4.1",
70
70
  "@nuxt/module-builder": "^1.0.2",
71
- "@nuxt/schema": "^4.1.3",
72
- "@nuxt/test-utils": "^3.19.0",
71
+ "@nuxt/schema": "^4.4.8",
72
+ "@nuxt/test-utils": "^4.0.3",
73
73
  "@types/node": "latest",
74
74
  "changelogen": "^0.6.1",
75
75
  "husky": "^9.1.7",
76
- "lint-staged": "^16.0.0",
77
- "nuxt": "^4.1.3",
76
+ "lint-staged": "^17.0.7",
77
+ "nuxt": "^4.4.8",
78
78
  "typescript": "~5.9.3",
79
79
  "typescript-eslint": "^8.18.0",
80
80
  "vitest": "^4.0.2",
@@ -83,4 +83,4 @@
83
83
  "lint-staged": {
84
84
  "*": "eslint"
85
85
  }
86
- }
86
+ }