@finema/core 3.14.1 → 3.14.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 +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/FlexDeck/index.vue +79 -79
- 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.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
- package/dist/runtime/components/Form/InputCheckbox/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputCheckboxGroup/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputCheckboxGroup/index.vue +21 -21
- package/dist/runtime/components/Form/InputCheckboxGroup/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputCurrency/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputCurrency/index.vue +49 -49
- package/dist/runtime/components/Form/InputCurrency/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputDateTime/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputDateTime/index.vue +155 -155
- package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputDateTimeRange/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue +56 -56
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputMonth/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputMonth/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputNumber/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
- package/dist/runtime/components/Form/InputNumber/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputSearch/index.d.vue.ts +1 -9
- package/dist/runtime/components/Form/InputSearch/index.vue.d.ts +1 -9
- package/dist/runtime/components/Form/InputSelect/index.d.vue.ts +1 -7
- package/dist/runtime/components/Form/InputSelect/index.vue +46 -46
- package/dist/runtime/components/Form/InputSelect/index.vue.d.ts +1 -7
- package/dist/runtime/components/Form/InputSelectMultiple/index.d.vue.ts +1 -7
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +62 -62
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue.d.ts +1 -7
- package/dist/runtime/components/Form/InputTags/index.d.vue.ts +1 -11
- package/dist/runtime/components/Form/InputTags/index.vue +54 -54
- package/dist/runtime/components/Form/InputTags/index.vue.d.ts +1 -11
- package/dist/runtime/components/Form/InputText/index.d.vue.ts +1 -7
- package/dist/runtime/components/Form/InputText/index.vue +85 -85
- package/dist/runtime/components/Form/InputText/index.vue.d.ts +1 -7
- package/dist/runtime/components/Form/InputTextarea/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
- package/dist/runtime/components/Form/InputTextarea/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputTime/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputTime/index.vue +38 -38
- package/dist/runtime/components/Form/InputTime/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputToggle/index.d.vue.ts +1 -5
- package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
- package/dist/runtime/components/Form/InputToggle/index.vue.d.ts +1 -5
- package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +50 -50
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +50 -50
- package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +50 -50
- package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadNode.vue +18 -18
- package/dist/runtime/components/Form/InputWYSIWYG/EditorLinkPopover.vue +65 -65
- package/dist/runtime/components/Form/InputWYSIWYG/README.md +96 -96
- package/dist/runtime/components/Form/InputWYSIWYG/index.vue +41 -41
- 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/MultipleFilesState.vue +75 -75
- package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
- package/dist/runtime/components/Form/fileState/useUploadImageState.js +62 -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/Base.d.vue.ts +2 -8
- package/dist/runtime/components/Table/Base.vue.d.ts +2 -8
- 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 +10 -10
- package/dist/runtime/components/Table/Pagination.vue +59 -56
- package/dist/runtime/components/Table/Simple.vue +16 -16
- package/dist/runtime/components/Table/index.vue +30 -30
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/theme/table.d.ts +1 -0
- package/dist/runtime/theme/table.js +4 -3
- package/package.json +2 -2
|
@@ -1,80 +1,83 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
3
|
:class="
|
|
4
4
|
theme.paginationContainer({
|
|
5
5
|
class: [ui?.paginationContainer]
|
|
6
6
|
})
|
|
7
|
-
"
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
7
|
+
"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
10
|
:class="
|
|
11
11
|
theme.paginationInfoWrapper({
|
|
12
12
|
class: [ui?.paginationInfoWrapper]
|
|
13
13
|
})
|
|
14
|
-
"
|
|
15
|
-
>
|
|
16
|
-
<USelect
|
|
17
|
-
v-if="options.pageOptions && !options.isHideLimitSelect"
|
|
18
|
-
size="lg"
|
|
19
|
-
trailing="รายการ"
|
|
14
|
+
"
|
|
15
|
+
>
|
|
16
|
+
<USelect
|
|
17
|
+
v-if="options.pageOptions && !options.isHideLimitSelect"
|
|
18
|
+
size="lg"
|
|
19
|
+
trailing="รายการ"
|
|
20
20
|
:class="
|
|
21
21
|
theme.paginationLimitSelect({
|
|
22
22
|
class: [ui?.paginationLimitSelect, 'cursor-pointer']
|
|
23
23
|
})
|
|
24
|
-
"
|
|
25
|
-
:items="pageLimitItems"
|
|
26
|
-
:model-value="pageLimit"
|
|
27
|
-
@update:modelValue="emits('pageLimitChange', $event)"
|
|
28
|
-
>
|
|
29
|
-
<template #default="{ modelValue }">
|
|
30
|
-
<p
|
|
24
|
+
"
|
|
25
|
+
:items="pageLimitItems"
|
|
26
|
+
:model-value="pageLimit"
|
|
27
|
+
@update:modelValue="emits('pageLimitChange', $event)"
|
|
28
|
+
>
|
|
29
|
+
<template #default="{ modelValue }">
|
|
30
|
+
<p
|
|
31
31
|
:class="
|
|
32
32
|
theme.paginationLimitSelectLabel({
|
|
33
33
|
class: [ui?.paginationLimitSelectLabel]
|
|
34
34
|
})
|
|
35
|
-
"
|
|
36
|
-
>
|
|
37
|
-
{{ modelValue }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
|
|
38
|
-
</p>
|
|
39
|
-
</template>
|
|
40
|
-
</USelect>
|
|
41
|
-
<p
|
|
35
|
+
"
|
|
36
|
+
>
|
|
37
|
+
{{ modelValue }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
|
|
38
|
+
</p>
|
|
39
|
+
</template>
|
|
40
|
+
</USelect>
|
|
41
|
+
<p
|
|
42
42
|
:class="
|
|
43
43
|
theme.paginationInfo({
|
|
44
44
|
class: [ui?.paginationInfo, '']
|
|
45
45
|
})
|
|
46
|
-
"
|
|
47
|
-
>
|
|
48
|
-
<span v-if="options.pageOptions">{{ pageBetween }} {{ appConfig.core?.locale === "th" ? "\u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "of total" }} {{ totalCountWithComma }}</span>
|
|
49
|
-
<span v-else>{{ appConfig.core?.locale === "th" ? "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "Total" }} {{ options.rawData.length }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}</span>
|
|
50
|
-
</p>
|
|
51
|
-
</div>
|
|
52
|
-
<UPagination
|
|
53
|
-
v-if="options.pageOptions && options.pageOptions.totalPage > 1"
|
|
54
|
-
:page="page"
|
|
55
|
-
:default-page="options.pageOptions?.currentPage || 1"
|
|
56
|
-
:items-per-page="options.pageOptions.limit"
|
|
57
|
-
:total="options.pageOptions.totalCount"
|
|
58
|
-
:to="options.isRouteChange ? to : void 0"
|
|
59
|
-
show-edges
|
|
60
|
-
variant="outline"
|
|
61
|
-
color="neutral"
|
|
62
|
-
active-color="neutral"
|
|
63
|
-
active-variant="subtle"
|
|
64
|
-
@update:page="emits('pageChange', $event)"
|
|
65
|
-
>
|
|
66
|
-
<template #item="{ item, page }">
|
|
67
|
-
<Button
|
|
68
|
-
:variant="page === item.value ? 'subtle' : 'outline'"
|
|
69
|
-
:color="page === item.value ? 'neutral' : 'neutral'"
|
|
70
|
-
:label="String(NumberHelper.withComma(item.value))"
|
|
71
|
-
:ui="{ label: themePagination.label }"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
46
|
+
"
|
|
47
|
+
>
|
|
48
|
+
<span v-if="options.pageOptions">{{ pageBetween }} {{ appConfig.core?.locale === "th" ? "\u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "of total" }} {{ totalCountWithComma }}</span>
|
|
49
|
+
<span v-else>{{ appConfig.core?.locale === "th" ? "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "Total" }} {{ options.rawData.length }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}</span>
|
|
50
|
+
</p>
|
|
51
|
+
</div>
|
|
52
|
+
<UPagination
|
|
53
|
+
v-if="options.pageOptions && options.pageOptions.totalPage > 1"
|
|
54
|
+
:page="page"
|
|
55
|
+
:default-page="options.pageOptions?.currentPage || 1"
|
|
56
|
+
:items-per-page="options.pageOptions.limit"
|
|
57
|
+
:total="options.pageOptions.totalCount"
|
|
58
|
+
:to="options.isRouteChange ? to : void 0"
|
|
59
|
+
show-edges
|
|
60
|
+
variant="outline"
|
|
61
|
+
color="neutral"
|
|
62
|
+
active-color="neutral"
|
|
63
|
+
active-variant="subtle"
|
|
64
|
+
@update:page="emits('pageChange', $event)"
|
|
65
|
+
>
|
|
66
|
+
<template #item="{ item, page }">
|
|
67
|
+
<Button
|
|
68
|
+
:variant="page === item.value ? 'subtle' : 'outline'"
|
|
69
|
+
:color="page === item.value ? 'neutral' : 'neutral'"
|
|
70
|
+
:label="String(NumberHelper.withComma(item.value))"
|
|
71
|
+
:ui="{ label: themePagination.label }"
|
|
72
|
+
square
|
|
73
|
+
:to="to?.(item.value)"
|
|
74
|
+
:class="theme.buttonPagination({
|
|
75
|
+
class: [ui?.buttonPagination]
|
|
76
|
+
})"
|
|
77
|
+
/>
|
|
78
|
+
</template>
|
|
79
|
+
</UPagination>
|
|
80
|
+
</div>
|
|
78
81
|
</template>
|
|
79
82
|
|
|
80
83
|
<script setup>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Base
|
|
3
|
-
v-bind="$attrs"
|
|
2
|
+
<Base
|
|
3
|
+
v-bind="$attrs"
|
|
4
4
|
:options="{
|
|
5
5
|
...options,
|
|
6
6
|
pageOptions,
|
|
7
7
|
isHideLimitSelect: true,
|
|
8
8
|
rawData: itemsByPage
|
|
9
|
-
}"
|
|
10
|
-
:ui="ui"
|
|
11
|
-
@page-change="onPageChange"
|
|
12
|
-
>
|
|
13
|
-
<template
|
|
14
|
-
v-for="(_, slot) of $slots"
|
|
15
|
-
#[slot]="slotProps"
|
|
16
|
-
>
|
|
17
|
-
<slot
|
|
18
|
-
:name="slot"
|
|
19
|
-
v-bind="slotProps || {}"
|
|
20
|
-
/>
|
|
21
|
-
</template>
|
|
22
|
-
</Base>
|
|
9
|
+
}"
|
|
10
|
+
:ui="ui"
|
|
11
|
+
@page-change="onPageChange"
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-for="(_, slot) of $slots"
|
|
15
|
+
#[slot]="slotProps"
|
|
16
|
+
>
|
|
17
|
+
<slot
|
|
18
|
+
:name="slot"
|
|
19
|
+
v-bind="slotProps || {}"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
22
|
+
</Base>
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script setup>
|
|
@@ -1,38 +1,38 @@
|
|
|
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="
|
|
6
6
|
theme.searchContainer({
|
|
7
7
|
class: [ui?.searchContainer]
|
|
8
8
|
})
|
|
9
|
-
"
|
|
10
|
-
>
|
|
11
|
-
<Input
|
|
12
|
-
v-model="q"
|
|
13
|
-
icon="i-heroicons-magnifying-glass"
|
|
14
|
-
:placeholder="options.searchPlaceholder || '\u0E04\u0E49\u0E19\u0E2B\u0E32....'"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
<Base
|
|
18
|
-
v-bind="$attrs"
|
|
19
|
-
:options="options"
|
|
20
|
-
:ui="ui"
|
|
21
|
-
:column-pinning="computedColumnPinning"
|
|
22
|
-
@page-change="onPageChange"
|
|
23
|
-
@search="emits('search', q)"
|
|
24
|
-
>
|
|
25
|
-
<template
|
|
26
|
-
v-for="(_, slot) of $slots"
|
|
27
|
-
#[slot]="slotProps"
|
|
28
|
-
>
|
|
29
|
-
<slot
|
|
30
|
-
:name="slot"
|
|
31
|
-
v-bind="slotProps || {}"
|
|
32
|
-
/>
|
|
33
|
-
</template>
|
|
34
|
-
</Base>
|
|
35
|
-
</div>
|
|
9
|
+
"
|
|
10
|
+
>
|
|
11
|
+
<Input
|
|
12
|
+
v-model="q"
|
|
13
|
+
icon="i-heroicons-magnifying-glass"
|
|
14
|
+
:placeholder="options.searchPlaceholder || '\u0E04\u0E49\u0E19\u0E2B\u0E32....'"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<Base
|
|
18
|
+
v-bind="$attrs"
|
|
19
|
+
:options="options"
|
|
20
|
+
:ui="ui"
|
|
21
|
+
:column-pinning="computedColumnPinning"
|
|
22
|
+
@page-change="onPageChange"
|
|
23
|
+
@search="emits('search', q)"
|
|
24
|
+
>
|
|
25
|
+
<template
|
|
26
|
+
v-for="(_, slot) of $slots"
|
|
27
|
+
#[slot]="slotProps"
|
|
28
|
+
>
|
|
29
|
+
<slot
|
|
30
|
+
:name="slot"
|
|
31
|
+
v-bind="slotProps || {}"
|
|
32
|
+
/>
|
|
33
|
+
</template>
|
|
34
|
+
</Base>
|
|
35
|
+
</div>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script setup>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
+
}
|
|
@@ -6,15 +6,16 @@ export const tableTheme = {
|
|
|
6
6
|
captionContainer: "hidden mb-4 text-gray-500",
|
|
7
7
|
captionBoldText: "font-bold",
|
|
8
8
|
errorMessage: "text-error-400 text-2xl h-[200px] flex justify-center items-center",
|
|
9
|
-
paginationContainer: "flex justify-between items-center flex-row md:flex-col lg:flex-row gap-4 px-4 py-3 bg-[#F2F4F7]",
|
|
10
|
-
paginationInfoWrapper: "flex items-center justify-between gap-4",
|
|
9
|
+
paginationContainer: "flex justify-between items-center flex-row md:flex-col lg:flex-row gap-y-2 gap-x-4 px-4 py-3 bg-[#F2F4F7]",
|
|
10
|
+
paginationInfoWrapper: "flex flex-wrap items-center justify-between gap-4",
|
|
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
14
|
thead: "",
|
|
15
15
|
th: "text-[#475467] whitespace-nowrap font-medium text-xs",
|
|
16
16
|
td: "text-[#475467]",
|
|
17
|
-
tr: "hover:bg-gray-50"
|
|
17
|
+
tr: "hover:bg-gray-50",
|
|
18
|
+
buttonPagination: "min-w-10 justify-center"
|
|
18
19
|
},
|
|
19
20
|
variants: {
|
|
20
21
|
pinned: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finema/core",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.3",
|
|
4
4
|
"repository": "https://gitlab.finema.co/finema/ui-kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finema Dev Core Team",
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
"lint-staged": {
|
|
84
84
|
"*": "eslint"
|
|
85
85
|
}
|
|
86
|
-
}
|
|
86
|
+
}
|