@finema/core 2.26.0 → 2.26.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.26.0",
3
+ "version": "2.26.2",
4
4
  "configKey": "core",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
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.26.0";
7
+ const version = "2.26.2";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -111,7 +111,8 @@ const module = defineNuxtModule({
111
111
  "date-fns",
112
112
  "date-fns-tz",
113
113
  "@vuepic/vue-datepicker",
114
- "defu"
114
+ "defu",
115
+ "form-data"
115
116
  ]
116
117
  },
117
118
  _nuxt.options.build
@@ -119,7 +120,15 @@ const module = defineNuxtModule({
119
120
  _nuxt.options.vite = defu(
120
121
  {
121
122
  optimizeDeps: {
122
- include: [..._nuxt.options.vite?.optimizeDeps?.include || [], "@wdns/vue-code-block", "valibot", "@vee-validate/valibot", "axios"]
123
+ include: [
124
+ ..._nuxt.options.vite?.optimizeDeps?.include || [],
125
+ "@wdns/vue-code-block",
126
+ "valibot",
127
+ "@vee-validate/valibot",
128
+ "axios",
129
+ "tailwind-variants",
130
+ "@vueuse/core"
131
+ ]
123
132
  }
124
133
  },
125
134
  _nuxt.options.vite
@@ -23,11 +23,7 @@ defineProps({
23
23
  const coreConfig = useCoreConfig();
24
24
  useHead({
25
25
  titleTemplate: (titleChunk) => {
26
- return titleChunk ? `${titleChunk} %separator %siteName` : "%siteName";
27
- },
28
- templateParams: {
29
- siteName: coreConfig.site_name,
30
- separator: "-"
26
+ return titleChunk ? `${titleChunk} - ${coreConfig.site_name}` : coreConfig.site_name;
31
27
  }
32
28
  });
33
29
  </script>
@@ -10,8 +10,9 @@ export var DialogType = /* @__PURE__ */ ((DialogType2) => {
10
10
  })(DialogType || {});
11
11
  export const useDialog = () => {
12
12
  const overlay = useOverlay();
13
- const modal = overlay.create(Dialog);
13
+ const modalLoading = overlay.create(Dialog);
14
14
  const openDialog = async (payload) => {
15
+ const modal = overlay.create(Dialog);
15
16
  const result = await modal.open(payload);
16
17
  const res = await result.result;
17
18
  return new Promise((resolve, reject) => {
@@ -54,14 +55,21 @@ export const useDialog = () => {
54
55
  });
55
56
  };
56
57
  const loading = async (payload = {}) => {
57
- return openDialog({
58
+ const result = await modalLoading.open({
58
59
  ...payload,
59
60
  title: payload.title || "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14...",
60
61
  type: "loading" /* LOADING */
61
62
  });
63
+ const res = await result.result;
64
+ return new Promise((resolve, reject) => {
65
+ if (res) {
66
+ resolve(true);
67
+ }
68
+ reject(false);
69
+ });
62
70
  };
63
71
  const close = async () => {
64
- return modal.close();
72
+ return modalLoading.close();
65
73
  };
66
74
  return {
67
75
  error,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.26.0",
3
+ "version": "2.26.2",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",