@finema/core 2.52.0 → 2.52.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.52.0",
3
+ "version": "2.52.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.52.0";
7
+ const version = "2.52.2";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -1,95 +1,95 @@
1
1
  <template>
2
- <div
2
+ <div
3
3
  :class="theme.rootWrapper({
4
4
  class: [ui?.rootWrapper]
5
- })"
6
- >
7
- <Pagination
8
- v-if="!options.isHidePagination && !options.isHidePaginationTop"
9
- :options="options"
10
- :ui="ui"
11
- :page="page"
12
- :page-limit="pageLimit"
13
- class="border-b border-[#EAECF0]"
14
- @pageChange="onPageChange"
15
- @search="emits('search')"
16
- @pageLimitChange="changePageLimit"
17
- />
18
- <UTable
19
- :loading="options.status.isLoading"
20
- :columns="uTableCompatibleColumns"
21
- :data="options.rawData"
22
- v-bind="$attrs"
23
- >
24
- <template #loading-state>
25
- <Loader
26
- :loading="true"
27
- />
28
- </template>
29
- <template #empty>
30
- <slot
31
- v-if="options.status.isLoading"
32
- name="loading"
33
- >
34
- <Loader
35
- :loading="true"
36
- />
37
- </slot>
38
- <slot
39
- v-else-if="options.status.isError"
40
- name="error"
41
- >
42
- <div
43
- class="
44
- text-error-400 flex h-[200px] items-center justify-center text-2xl
45
- "
46
- >
47
- {{ StringHelper.getError(options.status.errorData) }}
48
- </div>
49
- </slot>
50
-
51
- <slot
52
- v-else
53
- name="error"
54
- >
55
- <Empty />
56
- </slot>
57
- </template>
58
- <template
59
- v-for="column in options.columns.filter((item) => !!item.type)"
60
- #[`${column.accessorKey}-cell`]="{ row }"
61
- :key="column.accessorKey"
62
- >
63
- <component
64
- :is="column.type === COLUMN_TYPES.COMPONENT ? column.component : columnTypeComponents[column.type]"
65
- v-if="column.type === COLUMN_TYPES.COMPONENT || columnTypeComponents[column.type]"
66
- :value="transformValue(column, row)"
67
- :column="column"
68
- :row="row"
69
- />
70
- </template>
71
- <template
72
- v-for="(_, slotName) of $slots"
73
- #[slotName]="slotProps"
74
- >
75
- <slot
76
- :name="slotName"
77
- v-bind="slotProps || {}"
78
- />
79
- </template>
80
- </UTable>
81
- <Pagination
82
- v-if="!options.isHidePagination && !options.isHidePaginationBottom"
83
- :options="options"
84
- :ui="ui"
85
- :page="page"
86
- :page-limit="pageLimit"
87
- class="rounded-b-lg border-t border-[#EAECF0]"
88
- @pageChange="onPageChange"
89
- @search="emits('search')"
90
- @pageLimitChange="changePageLimit"
91
- />
92
- </div>
5
+ })"
6
+ >
7
+ <Pagination
8
+ v-if="!options.isHidePagination && !options.isHidePaginationTop"
9
+ :options="options"
10
+ :ui="ui"
11
+ :page="page"
12
+ :page-limit="pageLimit"
13
+ class="border-b border-[#EAECF0]"
14
+ @pageChange="onPageChange"
15
+ @search="emits('search')"
16
+ @pageLimitChange="changePageLimit"
17
+ />
18
+ <UTable
19
+ :loading="options.status.isLoading"
20
+ :columns="uTableCompatibleColumns"
21
+ :data="options.rawData"
22
+ v-bind="$attrs"
23
+ >
24
+ <template #loading>
25
+ <Loader
26
+ :loading="true"
27
+ />
28
+ </template>
29
+ <template #empty>
30
+ <slot
31
+ v-if="options.status.isLoading"
32
+ name="loading"
33
+ >
34
+ <Loader
35
+ :loading="true"
36
+ />
37
+ </slot>
38
+ <slot
39
+ v-else-if="options.status.isError"
40
+ name="error"
41
+ >
42
+ <div
43
+ class="
44
+ text-error-400 flex h-[200px] items-center justify-center text-2xl
45
+ "
46
+ >
47
+ {{ StringHelper.getError(options.status.errorData) }}
48
+ </div>
49
+ </slot>
50
+
51
+ <slot
52
+ v-else
53
+ name="error"
54
+ >
55
+ <Empty />
56
+ </slot>
57
+ </template>
58
+ <template
59
+ v-for="column in options.columns.filter((item) => !!item.type)"
60
+ #[`${column.accessorKey}-cell`]="{ row }"
61
+ :key="column.accessorKey"
62
+ >
63
+ <component
64
+ :is="column.type === COLUMN_TYPES.COMPONENT ? column.component : columnTypeComponents[column.type]"
65
+ v-if="column.type === COLUMN_TYPES.COMPONENT || columnTypeComponents[column.type]"
66
+ :value="transformValue(column, row)"
67
+ :column="column"
68
+ :row="row"
69
+ />
70
+ </template>
71
+ <template
72
+ v-for="(_, slotName) of $slots"
73
+ #[slotName]="slotProps"
74
+ >
75
+ <slot
76
+ :name="slotName"
77
+ v-bind="slotProps || {}"
78
+ />
79
+ </template>
80
+ </UTable>
81
+ <Pagination
82
+ v-if="!options.isHidePagination && !options.isHidePaginationBottom"
83
+ :options="options"
84
+ :ui="ui"
85
+ :page="page"
86
+ :page-limit="pageLimit"
87
+ class="rounded-b-lg border-t border-[#EAECF0]"
88
+ @pageChange="onPageChange"
89
+ @search="emits('search')"
90
+ @pageLimitChange="changePageLimit"
91
+ />
92
+ </div>
93
93
  </template>
94
94
 
95
95
  <script setup>
@@ -1,14 +1,14 @@
1
1
  import type { ISimpleTableOptions } from '#core/components/Table/types';
2
2
  import type { tableTheme } from '../../theme/table.js';
3
3
  import type { TableSlots } from '@nuxt/ui';
4
+ type Slot = TableSlots<any> & {
5
+ error: (props?: Record<string, any>) => any;
6
+ };
4
7
  type __VLS_Props = {
5
8
  options: ISimpleTableOptions<any>;
6
9
  ui?: typeof tableTheme['slots'];
7
10
  };
8
11
  type __VLS_Slots = Slot;
9
- type Slot = TableSlots<any> & {
10
- error: (props?: Record<string, any>) => any;
11
- };
12
12
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
14
  export default _default;
@@ -1,34 +1,34 @@
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="theme.searchContainer({
6
6
  class: [ui?.searchContainer]
7
- })"
8
- >
9
- <Input
10
- v-model="q"
11
- icon="i-heroicons-magnifying-glass"
12
- :placeholder="options.searchPlaceholder || '\u0E04\u0E49\u0E19\u0E2B\u0E32....'"
13
- />
14
- </div>
15
- <Base
16
- v-bind="$attrs"
17
- :options="options"
18
- @page-change="onPageChange"
19
- @search="emits('search', q)"
20
- >
21
- <template
22
- v-for="(_, slot) of $slots"
23
- #[slot]="slotProps"
24
- >
25
- <slot
26
- :name="slot"
27
- v-bind="slotProps || {}"
28
- />
29
- </template>
30
- </Base>
31
- </div>
7
+ })"
8
+ >
9
+ <Input
10
+ v-model="q"
11
+ icon="i-heroicons-magnifying-glass"
12
+ :placeholder="options.searchPlaceholder || '\u0E04\u0E49\u0E19\u0E2B\u0E32....'"
13
+ />
14
+ </div>
15
+ <Base
16
+ v-bind="$attrs"
17
+ :options="options"
18
+ @page-change="onPageChange"
19
+ @search="emits('search', q)"
20
+ >
21
+ <template
22
+ v-for="(_, slot) of $slots"
23
+ #[slot]="slotProps"
24
+ >
25
+ <slot
26
+ :name="slot"
27
+ v-bind="slotProps || {}"
28
+ />
29
+ </template>
30
+ </Base>
31
+ </div>
32
32
  </template>
33
33
 
34
34
  <script setup>
@@ -1,14 +1,14 @@
1
1
  import type { TableSlots } from '@nuxt/ui';
2
2
  import type { ITableOptions } from '#core/components/Table/types';
3
3
  import { tableTheme } from '#core/theme/table';
4
+ type Slot = TableSlots<any> & {
5
+ error: (props?: Record<string, any>) => any;
6
+ };
4
7
  type __VLS_Props = {
5
8
  options: ITableOptions<any>;
6
9
  ui?: typeof tableTheme['slots'];
7
10
  };
8
11
  type __VLS_Slots = Slot;
9
- type Slot = TableSlots<any> & {
10
- error: (props?: Record<string, any>) => any;
11
- };
12
12
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
13
  search: (q: string) => any;
14
14
  pageChange: (page: number) => any;
@@ -1,7 +1,7 @@
1
1
  export const tableTheme = {
2
2
  slots: {
3
- root: "bg-white",
4
- rootWrapper: "rounded-t-lg rounded-b-lg border-1 border-[#EAECF0]",
3
+ root: "",
4
+ rootWrapper: "rounded-t-lg rounded-b-lg border-1 border-[#EAECF0] bg-white",
5
5
  searchContainer: "mb-4 flex justify-end",
6
6
  captionContainer: "hidden mb-4 text-gray-500",
7
7
  captionBoldText: "font-bold",
@@ -11,8 +11,8 @@ export const tableTheme = {
11
11
  paginationInfo: "text-sm font-bold text-gray-600",
12
12
  paginationLimitSelect: "max-sm:!hidden min-w-[120px]",
13
13
  paginationLimitSelectLabel: "font-bold text-gray-600",
14
- thead: "bg-primary",
15
- th: "text-[#475467] bg-white whitespace-nowrap font-medium text-xs",
14
+ thead: "",
15
+ th: "text-[#475467] whitespace-nowrap font-medium text-xs",
16
16
  td: "text-[#475467]"
17
17
  },
18
18
  variants: {
@@ -24,7 +24,7 @@ export const tableTheme = {
24
24
  },
25
25
  sticky: {
26
26
  true: {
27
- thead: "sticky top-0 inset-x-0 bg-primary z-[1] backdrop-blur",
27
+ thead: "sticky top-0 inset-x-0 z-[1] backdrop-blur",
28
28
  tfoot: "sticky bottom-0 inset-x-0 bg-white z-[1] backdrop-blur"
29
29
  }
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.52.0",
3
+ "version": "2.52.2",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",
@@ -91,4 +91,4 @@
91
91
  "lint-staged": {
92
92
  "*": "eslint"
93
93
  }
94
- }
94
+ }