@finema/core 2.52.1 → 2.52.3

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.1",
3
+ "version": "2.52.3",
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.1";
7
+ const version = "2.52.3";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -1,8 +1,10 @@
1
1
  <template>
2
2
  <div
3
- :class="theme.rootWrapper({
4
- class: [ui?.rootWrapper]
5
- })"
3
+ :class="
4
+ theme.rootWrapper({
5
+ class: [ui?.rootWrapper]
6
+ })
7
+ "
6
8
  >
7
9
  <Pagination
8
10
  v-if="!options.isHidePagination && !options.isHidePaginationTop"
@@ -20,38 +22,24 @@
20
22
  :columns="uTableCompatibleColumns"
21
23
  :data="options.rawData"
22
24
  v-bind="$attrs"
25
+ :ui="ui"
23
26
  >
24
- <template #loading-state>
25
- <Loader
26
- :loading="true"
27
- />
27
+ <template #loading>
28
+ <Loader :loading="true" />
28
29
  </template>
29
30
  <template #empty>
30
- <slot
31
- v-if="options.status.isLoading"
32
- name="loading"
33
- >
34
- <Loader
35
- :loading="true"
36
- />
31
+ <slot v-if="options.status.isLoading" name="loading">
32
+ <Loader :loading="true" />
37
33
  </slot>
38
- <slot
39
- v-else-if="options.status.isError"
40
- name="error"
41
- >
34
+ <slot v-else-if="options.status.isError" name="error">
42
35
  <div
43
- class="
44
- text-error-400 flex h-[200px] items-center justify-center text-2xl
45
- "
36
+ class="text-error-400 flex h-[200px] items-center justify-center text-2xl"
46
37
  >
47
38
  {{ StringHelper.getError(options.status.errorData) }}
48
39
  </div>
49
40
  </slot>
50
41
 
51
- <slot
52
- v-else
53
- name="error"
54
- >
42
+ <slot v-else name="error">
55
43
  <Empty />
56
44
  </slot>
57
45
  </template>
@@ -61,21 +49,19 @@
61
49
  :key="column.accessorKey"
62
50
  >
63
51
  <component
64
- :is="column.type === COLUMN_TYPES.COMPONENT ? column.component : columnTypeComponents[column.type]"
65
- v-if="column.type === COLUMN_TYPES.COMPONENT || columnTypeComponents[column.type]"
52
+ :is="
53
+ column.type === COLUMN_TYPES.COMPONENT ? column.component : columnTypeComponents[column.type]
54
+ "
55
+ v-if="
56
+ column.type === COLUMN_TYPES.COMPONENT || columnTypeComponents[column.type]
57
+ "
66
58
  :value="transformValue(column, row)"
67
59
  :column="column"
68
60
  :row="row"
69
61
  />
70
62
  </template>
71
- <template
72
- v-for="(_, slotName) of $slots"
73
- #[slotName]="slotProps"
74
- >
75
- <slot
76
- :name="slotName"
77
- v-bind="slotProps || {}"
78
- />
63
+ <template v-for="(_, slotName) of $slots" #[slotName]="slotProps">
64
+ <slot :name="slotName" v-bind="slotProps || {}" />
79
65
  </template>
80
66
  </UTable>
81
67
  <Pagination
@@ -94,10 +80,17 @@
94
80
 
95
81
  <script setup>
96
82
  import { computed, ref } from "vue";
97
- import { COLUMN_TYPES } from "#core/components/Table/types";
83
+ import {
84
+ COLUMN_TYPES
85
+ } from "#core/components/Table/types";
98
86
  import ColumnNumber from "#core/components/Table/ColumnNumber.vue";
99
87
  import ColumnImage from "#core/components/Table/ColumnImage.vue";
100
- import { updateAppConfig, useAppConfig, useUiConfig, useWatchChange } from "#imports";
88
+ import {
89
+ updateAppConfig,
90
+ useAppConfig,
91
+ useUiConfig,
92
+ useWatchChange
93
+ } from "#imports";
101
94
  import ColumnDateTime from "#core/components/Table/ColumnDateTime.vue";
102
95
  import Empty from "#core/components/Empty.vue";
103
96
  import ColumnDate from "#core/components/Table/ColumnDate.vue";
@@ -120,7 +113,9 @@ const columnTypeComponents = {
120
113
  const theme = computed(() => useUiConfig(tableTheme, "table")());
121
114
  const config = useAppConfig();
122
115
  const page = ref(props.options.pageOptions?.currentPage || 1);
123
- const pageLimit = ref(props.options.pageOptions?.limit || config.core.limit_per_page);
116
+ const pageLimit = ref(
117
+ props.options.pageOptions?.limit || config.core.limit_per_page
118
+ );
124
119
  const uTableCompatibleColumns = computed(
125
120
  () => props.options.columns.map((col) => ({
126
121
  ...col,
@@ -2,7 +2,7 @@ import { type ISimpleTableOptions, type ITableOptions } from '#core/components/T
2
2
  import { tableTheme } from '#core/theme/table';
3
3
  type __VLS_Props = {
4
4
  options: ITableOptions<any> & ISimpleTableOptions<any>;
5
- ui?: typeof tableTheme['slots'];
5
+ ui?: (typeof tableTheme)['slots'];
6
6
  };
7
7
  declare var __VLS_22: {}, __VLS_29: {}, __VLS_31: {}, __VLS_45: string | number, __VLS_46: any;
8
8
  type __VLS_Slots = {} & {
@@ -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;
@@ -2,9 +2,11 @@
2
2
  <div ref="tableContainer">
3
3
  <div
4
4
  v-if="options.isEnabledSearch"
5
- :class="theme.searchContainer({
6
- class: [ui?.searchContainer]
7
- })"
5
+ :class="
6
+ theme.searchContainer({
7
+ class: [ui?.searchContainer]
8
+ })
9
+ "
8
10
  >
9
11
  <Input
10
12
  v-model="q"
@@ -17,15 +19,10 @@
17
19
  :options="options"
18
20
  @page-change="onPageChange"
19
21
  @search="emits('search', q)"
22
+ :ui="ui"
20
23
  >
21
- <template
22
- v-for="(_, slot) of $slots"
23
- #[slot]="slotProps"
24
- >
25
- <slot
26
- :name="slot"
27
- v-bind="slotProps || {}"
28
- />
24
+ <template v-for="(_, slot) of $slots" #[slot]="slotProps">
25
+ <slot :name="slot" v-bind="slotProps || {}" />
29
26
  </template>
30
27
  </Base>
31
28
  </div>
@@ -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
- ui?: typeof tableTheme['slots'];
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;
@@ -14,6 +14,7 @@ export declare const tableTheme: {
14
14
  thead: string;
15
15
  th: string;
16
16
  td: string;
17
+ tr: string;
17
18
  };
18
19
  variants: {
19
20
  pinned: {
@@ -13,7 +13,8 @@ export const tableTheme = {
13
13
  paginationLimitSelectLabel: "font-bold text-gray-600",
14
14
  thead: "",
15
15
  th: "text-[#475467] whitespace-nowrap font-medium text-xs",
16
- td: "text-[#475467]"
16
+ td: "text-[#475467]",
17
+ tr: ""
17
18
  },
18
19
  variants: {
19
20
  pinned: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.52.1",
3
+ "version": "2.52.3",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",