@finema/core 1.4.24 → 1.4.25
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.d.mts +1 -0
- package/dist/module.d.ts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Dialog/index.vue +13 -3
- package/dist/runtime/composables/useApp.mjs +3 -1
- package/dist/runtime/composables/useDialog.d.ts +1 -0
- package/dist/runtime/core.config.d.ts +1 -0
- package/dist/runtime/core.config.mjs +2 -1
- package/dist/runtime/types/config.d.ts +1 -1
- package/dist/runtime/ui.config/notification.d.ts +11 -0
- package/dist/runtime/ui.config/notification.mjs +9 -0
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -24,16 +24,19 @@
|
|
|
24
24
|
:color="getColor"
|
|
25
25
|
close-button=""
|
|
26
26
|
/>
|
|
27
|
-
<div :class="[
|
|
27
|
+
<div :class="[uiConfig.actionGroup.wrapper]">
|
|
28
28
|
<Button
|
|
29
29
|
v-if="dialog.meta?.isShowCancelBtn"
|
|
30
|
-
|
|
30
|
+
:color="uiConfig.actionGroup.cancelColor"
|
|
31
|
+
:variant="uiConfig.actionGroup.cancelVariant"
|
|
31
32
|
type="button"
|
|
32
33
|
@click="dialog.closeDialogCancel"
|
|
33
34
|
>
|
|
34
35
|
{{ dialog.meta?.cancelText || 'ยกเลิก' }}
|
|
35
36
|
</Button>
|
|
36
37
|
<Button
|
|
38
|
+
:color="uiConfig.actionGroup.confirmColor"
|
|
39
|
+
:variant="uiConfig.actionGroup.confirmVariant"
|
|
37
40
|
:class="[
|
|
38
41
|
{
|
|
39
42
|
'btn-success': dialog.meta?.type === DialogType.SUCCESS,
|
|
@@ -53,8 +56,11 @@
|
|
|
53
56
|
<script lang="tsx" setup>
|
|
54
57
|
import { DialogType, useDialog } from '#core/composables/useDialog'
|
|
55
58
|
import { computed } from 'vue'
|
|
59
|
+
import { useUiConfig } from '#core/composables/useConfig'
|
|
60
|
+
import { notification } from '#core/ui.config/notification'
|
|
56
61
|
|
|
57
62
|
const dialog = useDialog()
|
|
63
|
+
const uiConfig = useUiConfig<typeof notification>(notification, 'notification')
|
|
58
64
|
|
|
59
65
|
const getColor = computed(() => {
|
|
60
66
|
if (dialog.meta?.type === DialogType.SUCCESS) {
|
|
@@ -77,6 +83,10 @@ const getColor = computed(() => {
|
|
|
77
83
|
})
|
|
78
84
|
|
|
79
85
|
const getIcon = computed(() => {
|
|
86
|
+
if (dialog.meta?.isHideIcon) {
|
|
87
|
+
return ''
|
|
88
|
+
}
|
|
89
|
+
|
|
80
90
|
if (dialog.meta?.type === DialogType.SUCCESS) {
|
|
81
91
|
return 'i-heroicons-check-circle'
|
|
82
92
|
}
|
|
@@ -90,7 +100,7 @@ const getIcon = computed(() => {
|
|
|
90
100
|
}
|
|
91
101
|
|
|
92
102
|
if (dialog.meta?.type === DialogType.WARNING) {
|
|
93
|
-
return 'i-heroicons-
|
|
103
|
+
return 'i-heroicons-exclamation-circle'
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
return ''
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSeoMeta } from "#imports";
|
|
1
|
+
import { useCoreConfig, useSeoMeta } from "#imports";
|
|
2
2
|
import { defineStore } from "pinia";
|
|
3
3
|
export const useApp = defineStore("_app", {
|
|
4
4
|
state: () => ({
|
|
@@ -16,8 +16,10 @@ export const useApp = defineStore("_app", {
|
|
|
16
16
|
this.sidebar = items;
|
|
17
17
|
},
|
|
18
18
|
defineSEO(payload) {
|
|
19
|
+
const coreConfig = useCoreConfig();
|
|
19
20
|
useSeoMeta({
|
|
20
21
|
title: payload.title,
|
|
22
|
+
titleTemplate: (title) => title ? `${title} | ${coreConfig.site_name}` : coreConfig.site_name,
|
|
21
23
|
ogTitle: payload.title,
|
|
22
24
|
description: payload.description,
|
|
23
25
|
ogDescription: payload.description,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type UIComponentList = 'modal' | 'slideover' | 'dropdown' | 'icon' | 'button' | 'buttonGroup' | 'tabs' | 'card' | 'breadcrumb' | 'badge' | 'input' | 'pagination';
|
|
1
|
+
export type UIComponentList = 'modal' | 'slideover' | 'dropdown' | 'icon' | 'button' | 'buttonGroup' | 'tabs' | 'card' | 'breadcrumb' | 'badge' | 'input' | 'pagination' | 'notification';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DeepPartial } from '#ui/types';
|
|
2
|
+
import type * as config from '#ui/ui.config';
|
|
3
|
+
export declare const notification: DeepPartial<(typeof config)['notification'] & {
|
|
4
|
+
actionGroup: {
|
|
5
|
+
wrapper: string;
|
|
6
|
+
cancelColor: string;
|
|
7
|
+
cancelVariant: string;
|
|
8
|
+
confirmColor: string;
|
|
9
|
+
confirmVariant: string;
|
|
10
|
+
};
|
|
11
|
+
}>;
|