@ramathibodi/nuxt-commons 0.1.21 → 0.1.23

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.
Files changed (46) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.d.ts +1 -1
  3. package/dist/module.json +5 -1
  4. package/dist/runtime/components/ExportCSV.vue +22 -13
  5. package/dist/runtime/components/FileBtn.vue +4 -2
  6. package/dist/runtime/components/ImportCSV.vue +24 -14
  7. package/dist/runtime/components/document/TemplateBuilder.vue +1 -1
  8. package/dist/runtime/components/form/SignPad.vue +30 -30
  9. package/dist/runtime/components/form/Table.vue +3 -20
  10. package/dist/runtime/components/form/images/Field.vue +187 -0
  11. package/dist/runtime/components/form/images/Pad.vue +43 -0
  12. package/dist/runtime/components/model/Table.vue +20 -12
  13. package/dist/runtime/components/model/iterator.vue +24 -14
  14. package/dist/runtime/composables/alert.d.ts +1 -1
  15. package/dist/runtime/composables/{alert.mjs → alert.js} +1 -2
  16. package/dist/runtime/composables/api.d.ts +4 -4
  17. package/dist/runtime/composables/api.js +52 -0
  18. package/dist/runtime/composables/document/{template.mjs → template.js} +8 -16
  19. package/dist/runtime/composables/graphql.d.ts +6 -5
  20. package/dist/runtime/composables/{graphql.mjs → graphql.js} +31 -40
  21. package/dist/runtime/composables/graphqlModel.d.ts +18 -17
  22. package/dist/runtime/composables/{graphqlModel.mjs → graphqlModel.js} +26 -36
  23. package/dist/runtime/composables/graphqlModelItem.d.ts +13 -13
  24. package/dist/runtime/composables/{graphqlModelItem.mjs → graphqlModelItem.js} +6 -9
  25. package/dist/runtime/composables/graphqlModelOperation.d.ts +7 -7
  26. package/dist/runtime/composables/{graphqlModelOperation.mjs → graphqlModelOperation.js} +6 -12
  27. package/dist/runtime/composables/graphqlOperation.d.ts +2 -2
  28. package/dist/runtime/composables/{graphqlOperation.mjs → graphqlOperation.js} +15 -28
  29. package/dist/runtime/composables/menu.d.ts +1 -1
  30. package/dist/runtime/composables/{menu.mjs → menu.js} +4 -5
  31. package/dist/runtime/composables/utils/fuzzy.d.ts +1 -1
  32. package/dist/runtime/composables/utils/validation.d.ts +32 -0
  33. package/dist/runtime/plugins/permission.d.ts +1 -1
  34. package/dist/runtime/plugins/{permission.mjs → permission.js} +2 -4
  35. package/dist/runtime/types/menu.d.ts +3 -0
  36. package/dist/runtime/utils/datetime.d.ts +214 -16
  37. package/dist/runtime/utils/{datetime.mjs → datetime.js} +22 -44
  38. package/dist/runtime/utils/{object.mjs → object.js} +1 -2
  39. package/dist/types.d.mts +1 -16
  40. package/dist/types.d.ts +1 -16
  41. package/package.json +35 -34
  42. package/dist/runtime/composables/api.mjs +0 -64
  43. package/dist/runtime/plugins/vueSignaturePad.d.ts +0 -2
  44. package/dist/runtime/plugins/vueSignaturePad.mjs +0 -5
  45. /package/dist/runtime/composables/utils/{fuzzy.mjs → fuzzy.js} +0 -0
  46. /package/dist/runtime/composables/utils/{validation.mjs → validation.js} +0 -0
package/dist/types.d.mts CHANGED
@@ -1,16 +1 @@
1
-
2
- import type { ModuleOptions } from './module.js'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['nuxt-commons']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['nuxt-commons']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['nuxt-commons']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['nuxt-commons']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module.js'
1
+ export { type ModuleOptions, default } from './module.js'
package/dist/types.d.ts CHANGED
@@ -1,16 +1 @@
1
-
2
- import type { ModuleOptions } from './module'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['nuxt-commons']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['nuxt-commons']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['nuxt-commons']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['nuxt-commons']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module'
1
+ export { type ModuleOptions, default } from './module'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramathibodi/nuxt-commons",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Ramathibodi Nuxt modules for common components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -58,25 +58,25 @@
58
58
  "@codemirror/lang-javascript": "^6.2.2",
59
59
  "@codemirror/lang-vue": "^0.1.3",
60
60
  "@codemirror/theme-one-dark": "^6.1.2",
61
- "@fortawesome/fontawesome-free": "^6.5.2",
62
- "@fullcalendar/core": "^6.1.11",
63
- "@fullcalendar/daygrid": "^6.1.11",
64
- "@fullcalendar/interaction": "^6.1.11",
65
- "@fullcalendar/list": "^6.1.11",
66
- "@fullcalendar/multimonth": "^6.1.11",
67
- "@fullcalendar/timegrid": "^6.1.11",
68
- "@fullcalendar/vue3": "^6.1.11",
69
- "@graphql-codegen/add": "^5.0.2",
61
+ "@fortawesome/fontawesome-free": "^6.6.0",
62
+ "@fullcalendar/core": "^6.1.15",
63
+ "@fullcalendar/daygrid": "^6.1.15",
64
+ "@fullcalendar/interaction": "^6.1.15",
65
+ "@fullcalendar/list": "^6.1.15",
66
+ "@fullcalendar/multimonth": "^6.1.15",
67
+ "@fullcalendar/timegrid": "^6.1.15",
68
+ "@fullcalendar/vue3": "^6.1.15",
69
+ "@graphql-codegen/add": "^5.0.3",
70
70
  "@graphql-codegen/cli": "^5.0.2",
71
71
  "@graphql-codegen/plugin-helpers": "^5.0.4",
72
- "@graphql-codegen/typescript": "^4.0.6",
72
+ "@graphql-codegen/typescript": "^4.0.9",
73
73
  "@mdi/font": "^7.4.47",
74
- "@nuxt/kit": "^3.11.2",
74
+ "@nuxt/kit": "^3.13.1",
75
75
  "@nuxtjs/apollo": "5.0.0-alpha.14",
76
- "@vue/apollo-composable": "^4.0.2",
76
+ "@vue/apollo-composable": "^4.2.1",
77
77
  "@vuepic/vue-datepicker": "^7.4.1",
78
- "@vueuse/integrations": "^10.10.0",
79
- "@zxing/browser": "^0.1.4",
78
+ "@vueuse/integrations": "^11.0.3",
79
+ "@zxing/browser": "^0.1.5",
80
80
  "cropperjs": "^1.6.2",
81
81
  "currency.js": "^2.0.4",
82
82
  "exif-rotate-js": "^1.5.0",
@@ -84,37 +84,38 @@
84
84
  "gql-query-builder": "^3.8.0",
85
85
  "graphql": "^16.9.0",
86
86
  "lodash": "^4.17.21",
87
- "luxon": "^3.4.4",
87
+ "luxon": "^3.5.0",
88
88
  "maska": "^2.1.11",
89
+ "painterro": "^1.2.87",
89
90
  "pdf-vue3": "^1.0.12",
90
91
  "prettier": "3.3.2",
91
92
  "print-js": "^1.6.0",
92
93
  "uid": "^2.0.2",
93
- "vue": "^3.4.25",
94
+ "vue": "^3.5.3",
94
95
  "vue-codemirror": "^6.1.1",
95
96
  "vue-signature-pad": "^3.0.2",
96
- "vuetify": "^3.6.8",
97
+ "vuetify": "^3.7.1",
97
98
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz"
98
99
  },
99
100
  "devDependencies": {
100
- "@nuxt/devtools": "^1.2.0",
101
- "@nuxt/eslint-config": "^0.3.9",
102
- "@nuxt/module-builder": "^0.5.5",
103
- "@nuxt/schema": "^3.11.2",
104
- "@nuxt/test-utils": "^3.12.1",
105
- "@types/lodash": "^4.17.0",
101
+ "@nuxt/devtools": "^1.4.1",
102
+ "@nuxt/eslint-config": "^0.5.6",
103
+ "@nuxt/module-builder": "^0.8.3",
104
+ "@nuxt/schema": "^3.13.1",
105
+ "@nuxt/test-utils": "^3.14.1",
106
+ "@types/lodash": "^4.17.7",
106
107
  "@types/luxon": "^3.4.2",
107
- "@types/node": "^18.17.5",
108
- "@vueuse/core": "^10.9.0",
109
- "@vueuse/nuxt": "^10.9.0",
108
+ "@types/node": "^18.19.50",
109
+ "@vueuse/core": "^10.11.1",
110
+ "@vueuse/nuxt": "^10.11.1",
110
111
  "changelogen": "^0.5.5",
111
- "eslint": "^9.1.1",
112
- "nuxt": "^3.11.2",
112
+ "eslint": "^9.10.0",
113
+ "nuxt": "^3.13.1",
113
114
  "nuxt-lodash": "^2.5.3",
114
- "sass": "^1.75.0",
115
- "typescript": "^5.4.5",
116
- "vitest": "^1.5.1",
117
- "vue-tsc": "^1.8.27"
115
+ "sass": "^1.78.0",
116
+ "typescript": "^5.5.4",
117
+ "vitest": "^1.6.0",
118
+ "vue-tsc": "2.0.29"
118
119
  },
119
- "packageManager": "pnpm@9.8.0+sha512.8e4c3550fb500e808dbc30bb0ce4dd1eb614e30b1c55245f211591ec2cdf9c611cabd34e1364b42f564bd54b3945ed0f49d61d1bbf2ec9bd74b866fcdc723276"
120
+ "packageManager": "pnpm@9.10.0+sha512.73a29afa36a0d092ece5271de5177ecbf8318d454ecd701343131b8ebc0c1a91c487da46ab77c8e596d6acf1461e3594ced4becedf8921b074fbd8653ed7051c"
120
121
  }
@@ -1,64 +0,0 @@
1
- import { trimEnd, trimStart } from "lodash-es";
2
- import { useFetch, useRuntimeConfig } from "#imports";
3
- export function useApi() {
4
- const config = useRuntimeConfig();
5
- function urlBuilder(url) {
6
- let returnUrl = "";
7
- if (Array.isArray(url)) {
8
- if (url[0].toLowerCase() == "agent")
9
- url[0] = config?.public.WS_AGENT || config?.public.WS_DEVICE;
10
- returnUrl = url.join("/");
11
- } else {
12
- returnUrl = url;
13
- }
14
- if (returnUrl.startsWith("http://") || returnUrl.startsWith("https://"))
15
- return returnUrl;
16
- else
17
- return trimEnd(config?.public.WS_API, "/") + "/" + trimStart(returnUrl, "/");
18
- }
19
- function optionBuilder(method, body, params, options) {
20
- let returnOption = {
21
- method,
22
- body,
23
- query: params
24
- };
25
- const headers = {
26
- "Content-Type": "application/json",
27
- "Accept": "application/json"
28
- };
29
- if (options) {
30
- options = Object.assign(options, returnOption);
31
- if (options.headers)
32
- options.headers = Object.assign(options.headers, headers);
33
- else
34
- options.headers = headers;
35
- }
36
- returnOption = Object.assign(returnOption, options);
37
- return returnOption;
38
- }
39
- function get(url, body, params, options) {
40
- return useFetch(urlBuilder(url), optionBuilder("GET", body, params, options));
41
- }
42
- function getPromise(url, body, params, options) {
43
- return new Promise(async (resolve, reject) => {
44
- const { data, error } = await get(url, body, params, options);
45
- if (!error.value)
46
- resolve(data.value);
47
- else
48
- reject(error.value);
49
- });
50
- }
51
- function post(url, body, params, options) {
52
- return useFetch(urlBuilder(url), optionBuilder("POST", body, params, options));
53
- }
54
- function postPromise(url, body, params, options) {
55
- return new Promise(async (resolve, reject) => {
56
- const { data, error } = await post(url, body, params, options);
57
- if (!error.value)
58
- resolve(data.value);
59
- else
60
- reject(error.value);
61
- });
62
- }
63
- return { urlBuilder, get, getPromise, post, postPromise };
64
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
2
- export default _default;
@@ -1,5 +0,0 @@
1
- import { defineNuxtPlugin } from "nuxt/app";
2
- import VueSignaturePad from "vue-signature-pad";
3
- export default defineNuxtPlugin((nuxtApp) => {
4
- nuxtApp.vueApp.use(VueSignaturePad);
5
- });