@finema/core 2.52.3 → 2.52.5
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 +1 -1
- package/dist/runtime/components/Form/InputComponent/index.vue +4 -1
- package/dist/runtime/components/Table/Base.vue +22 -6
- package/dist/runtime/components/Table/Pagination.vue +33 -23
- package/dist/runtime/components/Table/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/Table/index.vue +9 -3
- package/dist/runtime/theme/dateTime.js +1 -1
- package/dist/runtime/theme/dropdownMenu.js +1 -1
- package/dist/runtime/theme/selectMenu.js +1 -1
- package/package.json +3 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -28,10 +28,16 @@
|
|
|
28
28
|
<Loader :loading="true" />
|
|
29
29
|
</template>
|
|
30
30
|
<template #empty>
|
|
31
|
-
<slot
|
|
31
|
+
<slot
|
|
32
|
+
v-if="options.status.isLoading"
|
|
33
|
+
name="loading"
|
|
34
|
+
>
|
|
32
35
|
<Loader :loading="true" />
|
|
33
36
|
</slot>
|
|
34
|
-
<slot
|
|
37
|
+
<slot
|
|
38
|
+
v-else-if="options.status.isError"
|
|
39
|
+
name="error"
|
|
40
|
+
>
|
|
35
41
|
<div
|
|
36
42
|
class="text-error-400 flex h-[200px] items-center justify-center text-2xl"
|
|
37
43
|
>
|
|
@@ -39,7 +45,10 @@
|
|
|
39
45
|
</div>
|
|
40
46
|
</slot>
|
|
41
47
|
|
|
42
|
-
<slot
|
|
48
|
+
<slot
|
|
49
|
+
v-else
|
|
50
|
+
name="error"
|
|
51
|
+
>
|
|
43
52
|
<Empty />
|
|
44
53
|
</slot>
|
|
45
54
|
</template>
|
|
@@ -60,8 +69,14 @@
|
|
|
60
69
|
:row="row"
|
|
61
70
|
/>
|
|
62
71
|
</template>
|
|
63
|
-
<template
|
|
64
|
-
|
|
72
|
+
<template
|
|
73
|
+
v-for="(_, slotName) of $slots"
|
|
74
|
+
#[slotName]="slotProps"
|
|
75
|
+
>
|
|
76
|
+
<slot
|
|
77
|
+
:name="slotName"
|
|
78
|
+
v-bind="slotProps || {}"
|
|
79
|
+
/>
|
|
65
80
|
</template>
|
|
66
81
|
</UTable>
|
|
67
82
|
<Pagination
|
|
@@ -89,7 +104,8 @@ import {
|
|
|
89
104
|
updateAppConfig,
|
|
90
105
|
useAppConfig,
|
|
91
106
|
useUiConfig,
|
|
92
|
-
useWatchChange
|
|
107
|
+
useWatchChange,
|
|
108
|
+
StringHelper
|
|
93
109
|
} from "#imports";
|
|
94
110
|
import ColumnDateTime from "#core/components/Table/ColumnDateTime.vue";
|
|
95
111
|
import Empty from "#core/components/Empty.vue";
|
|
@@ -1,39 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
:class="
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
:class="
|
|
4
|
+
theme.paginationContainer({
|
|
5
|
+
class: [ui?.paginationContainer]
|
|
6
|
+
})
|
|
7
|
+
"
|
|
6
8
|
>
|
|
7
9
|
<div
|
|
8
|
-
:class="
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
:class="
|
|
11
|
+
theme.paginationInfoWrapper({
|
|
12
|
+
class: [ui?.paginationInfoWrapper]
|
|
13
|
+
})
|
|
14
|
+
"
|
|
11
15
|
>
|
|
12
16
|
<USelect
|
|
13
17
|
v-if="options.pageOptions && !options.isHideLimitSelect"
|
|
14
18
|
size="lg"
|
|
15
19
|
trailing="รายการ"
|
|
16
|
-
:class="
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
:class="
|
|
21
|
+
theme.paginationLimitSelect({
|
|
22
|
+
class: [ui?.paginationLimitSelect, 'cursor-pointer']
|
|
23
|
+
})
|
|
24
|
+
"
|
|
19
25
|
:items="pageLimitItems"
|
|
20
26
|
:model-value="pageLimit"
|
|
21
27
|
@update:modelValue="emits('pageLimitChange', $event)"
|
|
22
28
|
>
|
|
23
29
|
<template #default="{ modelValue }">
|
|
24
30
|
<p
|
|
25
|
-
:class="
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
:class="
|
|
32
|
+
theme.paginationLimitSelectLabel({
|
|
33
|
+
class: [ui?.paginationLimitSelectLabel]
|
|
34
|
+
})
|
|
35
|
+
"
|
|
28
36
|
>
|
|
29
|
-
{{ modelValue }}
|
|
37
|
+
{{ modelValue }} รายการ
|
|
30
38
|
</p>
|
|
31
39
|
</template>
|
|
32
40
|
</USelect>
|
|
33
41
|
<p
|
|
34
|
-
:class="
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
:class="
|
|
43
|
+
theme.paginationInfo({
|
|
44
|
+
class: [ui?.paginationInfo, '']
|
|
45
|
+
})
|
|
46
|
+
"
|
|
37
47
|
>
|
|
38
48
|
<span v-if="options.pageOptions">{{ pageBetween }} จากทั้งหมด {{ totalCountWithComma }}</span>
|
|
39
49
|
<span v-else>ทั้งหมด {{ options.rawData.length }} รายการ</span>
|
|
@@ -58,7 +68,11 @@
|
|
|
58
68
|
</template>
|
|
59
69
|
|
|
60
70
|
<script setup>
|
|
61
|
-
import {
|
|
71
|
+
import {
|
|
72
|
+
computed,
|
|
73
|
+
NumberHelper,
|
|
74
|
+
useUiConfig
|
|
75
|
+
} from "#imports";
|
|
62
76
|
import UPagination from "#ui/components/Pagination";
|
|
63
77
|
import USelect from "#ui/components/Select";
|
|
64
78
|
import { tableTheme } from "../../theme/table";
|
|
@@ -75,12 +89,8 @@ const pageLimitItems = [
|
|
|
75
89
|
value: 10
|
|
76
90
|
},
|
|
77
91
|
{
|
|
78
|
-
label: "
|
|
79
|
-
value:
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: "30",
|
|
83
|
-
value: 30
|
|
92
|
+
label: "25",
|
|
93
|
+
value: 25
|
|
84
94
|
},
|
|
85
95
|
{
|
|
86
96
|
label: "50",
|
|
@@ -4,7 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
page: number;
|
|
5
5
|
pageLimit: number;
|
|
6
6
|
options: ITableOptions<any> & ISimpleTableOptions<any>;
|
|
7
|
-
ui?: typeof tableTheme['slots'];
|
|
7
|
+
ui?: (typeof tableTheme)['slots'];
|
|
8
8
|
};
|
|
9
9
|
declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
10
|
search: () => any;
|
|
@@ -17,12 +17,18 @@
|
|
|
17
17
|
<Base
|
|
18
18
|
v-bind="$attrs"
|
|
19
19
|
:options="options"
|
|
20
|
+
:ui="ui"
|
|
20
21
|
@page-change="onPageChange"
|
|
21
22
|
@search="emits('search', q)"
|
|
22
|
-
:ui="ui"
|
|
23
23
|
>
|
|
24
|
-
<template
|
|
25
|
-
|
|
24
|
+
<template
|
|
25
|
+
v-for="(_, slot) of $slots"
|
|
26
|
+
#[slot]="slotProps"
|
|
27
|
+
>
|
|
28
|
+
<slot
|
|
29
|
+
:name="slot"
|
|
30
|
+
v-bind="slotProps || {}"
|
|
31
|
+
/>
|
|
26
32
|
</template>
|
|
27
33
|
</Base>
|
|
28
34
|
</div>
|
|
@@ -4,7 +4,7 @@ export const selectMenuTheme = {
|
|
|
4
4
|
trailingIcon: "group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
5
5
|
selectedWrapper: "flex w-full items-center justify-between",
|
|
6
6
|
selectedLabel: "truncate",
|
|
7
|
-
clearIcon: "size-6",
|
|
7
|
+
clearIcon: "size-6 bg-gray-400 hover:bg-gray-400/75",
|
|
8
8
|
item: "cursor-pointer max-sm:h-14",
|
|
9
9
|
tagsWrapper: "flex flex-wrap gap-x-2 gap-y-1",
|
|
10
10
|
tagsItem: "px-1.5 py-0.5 rounded-sm inline-flex items-center gap-0.5 bg-primary text-white data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finema/core",
|
|
3
|
-
"version": "2.52.
|
|
3
|
+
"version": "2.52.5",
|
|
4
4
|
"repository": "https://gitlab.finema.co/finema/ui-kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finema Dev Core Team",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dev:build": "nuxi build playground",
|
|
33
33
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
34
34
|
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
35
|
-
"lint": "eslint .
|
|
36
|
-
"lint:fix": "eslint --fix .
|
|
35
|
+
"lint": "eslint .",
|
|
36
|
+
"lint:fix": "eslint --fix .",
|
|
37
37
|
"test": "vitest run",
|
|
38
38
|
"test:watch": "vitest watch",
|
|
39
39
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|