@finema/core 2.52.6 → 2.54.0
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 +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Table/Base.vue +5 -8
- package/dist/runtime/components/Table/types.d.ts +2 -0
- package/dist/runtime/composables/useTable.js +1 -0
- package/dist/runtime/helpers/apiPageHelper.js +1 -1
- package/dist/runtime/theme/dialog.js +1 -1
- package/dist/runtime/theme/slideover.js +1 -1
- package/dist/runtime/theme/table.js +2 -2
- package/package.json +9 -9
package/dist/module.json
CHANGED
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.
|
|
7
|
+
const version = "2.54.0";
|
|
8
8
|
|
|
9
9
|
const nuxtAppOptions = {
|
|
10
10
|
head: {
|
|
@@ -49,7 +49,7 @@ const nuxtRunTimeConfigOptions = {
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
const core = {
|
|
52
|
-
limit_per_page:
|
|
52
|
+
limit_per_page: 25,
|
|
53
53
|
default_primary_key: "id",
|
|
54
54
|
time_format: "HH:mm",
|
|
55
55
|
date_format: "dd-MMM-yyyy",
|
|
@@ -101,7 +101,6 @@ import {
|
|
|
101
101
|
import ColumnNumber from "#core/components/Table/ColumnNumber.vue";
|
|
102
102
|
import ColumnImage from "#core/components/Table/ColumnImage.vue";
|
|
103
103
|
import {
|
|
104
|
-
updateAppConfig,
|
|
105
104
|
useAppConfig,
|
|
106
105
|
useUiConfig,
|
|
107
106
|
useWatchChange,
|
|
@@ -129,9 +128,7 @@ const columnTypeComponents = {
|
|
|
129
128
|
const theme = computed(() => useUiConfig(tableTheme, "table")());
|
|
130
129
|
const config = useAppConfig();
|
|
131
130
|
const page = ref(props.options.pageOptions?.currentPage || 1);
|
|
132
|
-
const pageLimit = ref(
|
|
133
|
-
props.options.pageOptions?.limit || config.core.limit_per_page
|
|
134
|
-
);
|
|
131
|
+
const pageLimit = ref(props.options.pageOptions?.limit || config.core.limit_per_page);
|
|
135
132
|
const uTableCompatibleColumns = computed(
|
|
136
133
|
() => props.options.columns.map((col) => ({
|
|
137
134
|
...col,
|
|
@@ -156,11 +153,11 @@ const onPageChange = (newPage) => {
|
|
|
156
153
|
};
|
|
157
154
|
const changePageLimit = (limit) => {
|
|
158
155
|
pageLimit.value = limit;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
props.options.repo.fetchPageChange(1, {
|
|
157
|
+
params: {
|
|
158
|
+
...props.options.pageOptions?.request?.params,
|
|
159
|
+
limit
|
|
162
160
|
}
|
|
163
161
|
});
|
|
164
|
-
emits("search");
|
|
165
162
|
};
|
|
166
163
|
</script>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
import type { TableColumn as NuxtUiTableColumn } from '@nuxt/ui';
|
|
3
3
|
import type { IPageOptions, IStatus } from '#core/types/lib';
|
|
4
|
+
import type { IUsePageLoader } from '../../helpers/apiPageHelper.js';
|
|
4
5
|
export declare enum COLUMN_TYPES {
|
|
5
6
|
COMPONENT = "COMPONENT",
|
|
6
7
|
DATE = "DATE",
|
|
@@ -26,6 +27,7 @@ export interface IBaseTableOptions<T extends Record<string, any> = Record<string
|
|
|
26
27
|
isHideCaption?: boolean;
|
|
27
28
|
}
|
|
28
29
|
export interface ITableOptions<T extends Record<string, any> = Record<string, any>> extends IBaseTableOptions<T> {
|
|
30
|
+
repo: IUsePageLoader<T>;
|
|
29
31
|
pageOptions: IPageOptions;
|
|
30
32
|
isHideToolbar?: boolean;
|
|
31
33
|
isEnabledSearch?: boolean;
|
|
@@ -131,7 +131,7 @@ export const apiFetchHelper = async (state, onUpdateStatus, onUpdateOptions, onU
|
|
|
131
131
|
...opts.getBaseRequestOptions?.() || {},
|
|
132
132
|
...opts.fetch?.getRequestOptions?.(page, query, opts) || {}
|
|
133
133
|
};
|
|
134
|
-
const limit = Number(baseRequestOptions.params?.limit || config.limit_per_page);
|
|
134
|
+
const limit = Number(state().options.limit || baseRequestOptions.params?.limit || config.limit_per_page);
|
|
135
135
|
const requestOptions = prepareRequestOptions(
|
|
136
136
|
baseRequestOptions,
|
|
137
137
|
{
|
|
@@ -19,7 +19,7 @@ export const dialogTheme = {
|
|
|
19
19
|
"md:translate-x-[-50%] md:translate-y-[-50%]",
|
|
20
20
|
"md:!rounded-lg md:space-x-4"
|
|
21
21
|
],
|
|
22
|
-
overlay: "fixed inset-0 bg-
|
|
22
|
+
overlay: "fixed inset-0 bg-[#0C111D]/60 backdrop-blur",
|
|
23
23
|
iconWrapper: "rounded-full size-[48px] flex justify-center items-center",
|
|
24
24
|
wrapper: "flex flex-col w-full justify-start items-start",
|
|
25
25
|
confirmColor: "info",
|
|
@@ -25,8 +25,8 @@ export const tableTheme = {
|
|
|
25
25
|
},
|
|
26
26
|
sticky: {
|
|
27
27
|
true: {
|
|
28
|
-
thead: "sticky top-0 inset-x-0 z-[1]
|
|
29
|
-
tfoot: "sticky bottom-0 inset-x-0 bg-white z-[1]
|
|
28
|
+
thead: "sticky bg-transparent top-0 inset-x-0 z-[1]",
|
|
29
|
+
tfoot: "sticky bottom-0 inset-x-0 bg-white z-[1]"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finema/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.54.0",
|
|
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.
|
|
47
|
-
"@nuxt/ui": "^4.0
|
|
46
|
+
"@nuxt/kit": "^4.1.3",
|
|
47
|
+
"@nuxt/ui": "^4.1.0",
|
|
48
48
|
"@pinia/nuxt": "^0.11.0",
|
|
49
49
|
"@tailwindcss/typography": "^0.5.0-alpha.3",
|
|
50
50
|
"@tiptap/extension-image": "^3.0.7",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@vee-validate/nuxt": "^4.15.1",
|
|
60
60
|
"@vee-validate/valibot": "^4.15.1",
|
|
61
61
|
"@vuepic/vue-datepicker": "^11.0.2",
|
|
62
|
-
"@vueuse/components": "^13.
|
|
63
|
-
"@vueuse/core": "^13.
|
|
62
|
+
"@vueuse/components": "^13.9.0",
|
|
63
|
+
"@vueuse/core": "^13.9.0",
|
|
64
64
|
"@wdns/vue-code-block": "^2.3.5",
|
|
65
65
|
"axios": "^1.10.0",
|
|
66
66
|
"date-fns": "^4.1.0",
|
|
@@ -76,16 +76,16 @@
|
|
|
76
76
|
"@nuxt/devtools": "^2.6.0",
|
|
77
77
|
"@nuxt/eslint-config": "^1.4.1",
|
|
78
78
|
"@nuxt/module-builder": "^1.0.2",
|
|
79
|
-
"@nuxt/schema": "^4.
|
|
79
|
+
"@nuxt/schema": "^4.1.3",
|
|
80
80
|
"@nuxt/test-utils": "^3.19.0",
|
|
81
81
|
"@types/node": "latest",
|
|
82
82
|
"changelogen": "^0.6.1",
|
|
83
83
|
"husky": "^9.1.7",
|
|
84
84
|
"lint-staged": "^16.0.0",
|
|
85
|
-
"nuxt": "^4.
|
|
86
|
-
"typescript": "~5.
|
|
85
|
+
"nuxt": "^4.1.3",
|
|
86
|
+
"typescript": "~5.9.3",
|
|
87
87
|
"typescript-eslint": "^8.18.0",
|
|
88
|
-
"vitest": "^
|
|
88
|
+
"vitest": "^4.0.2",
|
|
89
89
|
"vue-tsc": "^3.0.4"
|
|
90
90
|
},
|
|
91
91
|
"lint-staged": {
|