@finema/core 2.23.0 → 2.23.1
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/README.md +79 -79
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
- package/dist/runtime/components/Form/Fields.vue +13 -13
- package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
- package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +43 -43
- package/dist/runtime/components/Form/InputText/index.vue +74 -74
- package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
- package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
- package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +1 -8
- package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
- package/dist/runtime/components/Form/fileState/FailedState.vue +33 -33
- package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
- package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
- package/dist/runtime/components/Form/fileState/SuccessState.vue +9 -3
- package/dist/runtime/components/Form/fileState/useUploadState.js +12 -13
- package/dist/runtime/components/Form/index.vue +5 -5
- package/dist/runtime/components/Image.vue +28 -28
- package/dist/runtime/components/Log/index.vue +17 -17
- package/dist/runtime/components/Table/ColumnDate.vue +1 -1
- package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
- package/dist/runtime/components/Table/ColumnImage.vue +4 -4
- package/dist/runtime/components/Table/ColumnText.vue +1 -1
- package/dist/runtime/components/Table/index.vue +89 -89
- package/dist/runtime/server/tsconfig.json +3 -3
- package/package.json +2 -2
|
@@ -1,101 +1,101 @@
|
|
|
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
|
-
<UTable
|
|
16
|
-
v-bind="$attrs"
|
|
17
|
-
:loading="options.status.isLoading"
|
|
18
|
-
:data="options.rawData"
|
|
19
|
-
:columns="options.columns"
|
|
20
|
-
:ui="ui"
|
|
21
|
-
>
|
|
22
|
-
<template #empty>
|
|
23
|
-
<slot
|
|
24
|
-
v-if="options.status.isLoading"
|
|
25
|
-
name="loading"
|
|
26
|
-
>
|
|
27
|
-
<Loader
|
|
28
|
-
:loading="true"
|
|
29
|
-
/>
|
|
30
|
-
</slot>
|
|
31
|
-
<slot
|
|
32
|
-
v-else-if="options.status.isError"
|
|
33
|
-
name="error"
|
|
34
|
-
>
|
|
35
|
-
<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
|
+
<UTable
|
|
16
|
+
v-bind="$attrs"
|
|
17
|
+
:loading="options.status.isLoading"
|
|
18
|
+
:data="options.rawData"
|
|
19
|
+
:columns="options.columns"
|
|
20
|
+
:ui="ui"
|
|
21
|
+
>
|
|
22
|
+
<template #empty>
|
|
23
|
+
<slot
|
|
24
|
+
v-if="options.status.isLoading"
|
|
25
|
+
name="loading"
|
|
26
|
+
>
|
|
27
|
+
<Loader
|
|
28
|
+
:loading="true"
|
|
29
|
+
/>
|
|
30
|
+
</slot>
|
|
31
|
+
<slot
|
|
32
|
+
v-else-if="options.status.isError"
|
|
33
|
+
name="error"
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
36
|
class="
|
|
37
37
|
text-error-400 flex h-[200px] items-center justify-center text-2xl
|
|
38
|
-
"
|
|
39
|
-
>
|
|
40
|
-
{{ StringHelper.getError(options.status.errorData) }}
|
|
41
|
-
</div>
|
|
42
|
-
</slot>
|
|
43
|
-
|
|
44
|
-
<slot
|
|
45
|
-
v-else
|
|
46
|
-
name="error"
|
|
47
|
-
>
|
|
48
|
-
<Empty />
|
|
49
|
-
</slot>
|
|
50
|
-
</template>
|
|
51
|
-
<template
|
|
52
|
-
v-for="column in options.columns.filter((item) => !!item.type)"
|
|
53
|
-
#[`${column.accessorKey}-cell`]="{ row }"
|
|
54
|
-
:key="column.accessorKey"
|
|
55
|
-
>
|
|
56
|
-
<component
|
|
57
|
-
:is="column.type === COLUMN_TYPES.COMPONENT ? column.component : columnTypeComponents[column.type]"
|
|
58
|
-
v-if="column.type === COLUMN_TYPES.COMPONENT || columnTypeComponents[column.type]"
|
|
59
|
-
:value="transformValue(column, row)"
|
|
60
|
-
:column="column"
|
|
61
|
-
:row="row"
|
|
62
|
-
/>
|
|
63
|
-
</template>
|
|
64
|
-
<template
|
|
65
|
-
v-for="(_, slotName) of $slots"
|
|
66
|
-
#[slotName]="slotProps"
|
|
67
|
-
>
|
|
68
|
-
<slot
|
|
69
|
-
:name="slotName"
|
|
70
|
-
v-bind="slotProps || {}"
|
|
71
|
-
/>
|
|
72
|
-
</template>
|
|
73
|
-
</UTable>
|
|
74
|
-
|
|
75
|
-
<div
|
|
76
|
-
v-if="!options.isHidePagination"
|
|
38
|
+
"
|
|
39
|
+
>
|
|
40
|
+
{{ StringHelper.getError(options.status.errorData) }}
|
|
41
|
+
</div>
|
|
42
|
+
</slot>
|
|
43
|
+
|
|
44
|
+
<slot
|
|
45
|
+
v-else
|
|
46
|
+
name="error"
|
|
47
|
+
>
|
|
48
|
+
<Empty />
|
|
49
|
+
</slot>
|
|
50
|
+
</template>
|
|
51
|
+
<template
|
|
52
|
+
v-for="column in options.columns.filter((item) => !!item.type)"
|
|
53
|
+
#[`${column.accessorKey}-cell`]="{ row }"
|
|
54
|
+
:key="column.accessorKey"
|
|
55
|
+
>
|
|
56
|
+
<component
|
|
57
|
+
:is="column.type === COLUMN_TYPES.COMPONENT ? column.component : columnTypeComponents[column.type]"
|
|
58
|
+
v-if="column.type === COLUMN_TYPES.COMPONENT || columnTypeComponents[column.type]"
|
|
59
|
+
:value="transformValue(column, row)"
|
|
60
|
+
:column="column"
|
|
61
|
+
:row="row"
|
|
62
|
+
/>
|
|
63
|
+
</template>
|
|
64
|
+
<template
|
|
65
|
+
v-for="(_, slotName) of $slots"
|
|
66
|
+
#[slotName]="slotProps"
|
|
67
|
+
>
|
|
68
|
+
<slot
|
|
69
|
+
:name="slotName"
|
|
70
|
+
v-bind="slotProps || {}"
|
|
71
|
+
/>
|
|
72
|
+
</template>
|
|
73
|
+
</UTable>
|
|
74
|
+
|
|
75
|
+
<div
|
|
76
|
+
v-if="!options.isHidePagination"
|
|
77
77
|
:class="theme.paginationContainer({
|
|
78
78
|
class: [ui?.paginationContainer]
|
|
79
|
-
})"
|
|
80
|
-
>
|
|
81
|
-
<p
|
|
79
|
+
})"
|
|
80
|
+
>
|
|
81
|
+
<p
|
|
82
82
|
:class="theme.paginationInfo({
|
|
83
83
|
class: [ui?.paginationInfo]
|
|
84
|
-
})"
|
|
85
|
-
>
|
|
86
|
-
{{ pageBetween }} รายการ จากทั้งหมด {{ totalCountWithComma }} รายการ
|
|
87
|
-
</p>
|
|
88
|
-
<Pagination
|
|
89
|
-
v-if="options.pageOptions.totalPage > 1"
|
|
90
|
-
v-model:page="page"
|
|
91
|
-
:default-page="options.pageOptions?.currentPage || 1"
|
|
92
|
-
:items-per-page="options.pageOptions.limit"
|
|
93
|
-
:total="options.pageOptions.totalCount"
|
|
94
|
-
:to="options.isRouteChange ? to : void 0"
|
|
95
|
-
@update:page="onPageChange"
|
|
96
|
-
/>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
84
|
+
})"
|
|
85
|
+
>
|
|
86
|
+
{{ pageBetween }} รายการ จากทั้งหมด {{ totalCountWithComma }} รายการ
|
|
87
|
+
</p>
|
|
88
|
+
<Pagination
|
|
89
|
+
v-if="options.pageOptions.totalPage > 1"
|
|
90
|
+
v-model:page="page"
|
|
91
|
+
:default-page="options.pageOptions?.currentPage || 1"
|
|
92
|
+
:items-per-page="options.pageOptions.limit"
|
|
93
|
+
:total="options.pageOptions.totalCount"
|
|
94
|
+
:to="options.isRouteChange ? to : void 0"
|
|
95
|
+
@update:page="onPageChange"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
99
|
</template>
|
|
100
100
|
|
|
101
101
|
<script setup>
|
|
@@ -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": "2.23.
|
|
3
|
+
"version": "2.23.1",
|
|
4
4
|
"repository": "https://gitlab.finema.co/finema/ui-kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finema Dev Core Team",
|
|
@@ -93,4 +93,4 @@
|
|
|
93
93
|
"lint-staged": {
|
|
94
94
|
"*": "eslint --fix --quiet"
|
|
95
95
|
}
|
|
96
|
-
}
|
|
96
|
+
}
|