@weconstudio/nuxt 0.0.0-stage → 1.72.0

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 (208) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +115 -2
  3. package/dist/module.d.mts +7 -0
  4. package/dist/module.json +12 -0
  5. package/dist/module.mjs +250 -0
  6. package/dist/runtime/components/We/Autocomplete.d.vue.ts +13 -0
  7. package/dist/runtime/components/We/Autocomplete.vue +91 -0
  8. package/dist/runtime/components/We/Autocomplete.vue.d.ts +13 -0
  9. package/dist/runtime/components/We/BoldText.d.vue.ts +17 -0
  10. package/dist/runtime/components/We/BoldText.vue +29 -0
  11. package/dist/runtime/components/We/BoldText.vue.d.ts +17 -0
  12. package/dist/runtime/components/We/ColorPicker.d.vue.ts +11 -0
  13. package/dist/runtime/components/We/ColorPicker.vue +199 -0
  14. package/dist/runtime/components/We/ColorPicker.vue.d.ts +11 -0
  15. package/dist/runtime/components/We/ConfirmDialog.d.vue.ts +104 -0
  16. package/dist/runtime/components/We/ConfirmDialog.vue +143 -0
  17. package/dist/runtime/components/We/ConfirmDialog.vue.d.ts +104 -0
  18. package/dist/runtime/components/We/Datatable.d.vue.ts +40 -0
  19. package/dist/runtime/components/We/Datatable.vue +87 -0
  20. package/dist/runtime/components/We/Datatable.vue.d.ts +40 -0
  21. package/dist/runtime/components/We/DatatableInternal.d.vue.ts +194 -0
  22. package/dist/runtime/components/We/DatatableInternal.vue +638 -0
  23. package/dist/runtime/components/We/DatatableInternal.vue.d.ts +194 -0
  24. package/dist/runtime/components/We/DatePicker.d.vue.ts +51 -0
  25. package/dist/runtime/components/We/DatePicker.vue +901 -0
  26. package/dist/runtime/components/We/DatePicker.vue.d.ts +51 -0
  27. package/dist/runtime/components/We/Dt/Actions.d.vue.ts +51 -0
  28. package/dist/runtime/components/We/Dt/Actions.vue +106 -0
  29. package/dist/runtime/components/We/Dt/Actions.vue.d.ts +51 -0
  30. package/dist/runtime/components/We/Dt/BooleanFormatter.d.vue.ts +8 -0
  31. package/dist/runtime/components/We/Dt/BooleanFormatter.vue +26 -0
  32. package/dist/runtime/components/We/Dt/BooleanFormatter.vue.d.ts +8 -0
  33. package/dist/runtime/components/We/Dt/CardFilterContainer.d.vue.ts +17 -0
  34. package/dist/runtime/components/We/Dt/CardFilterContainer.vue +60 -0
  35. package/dist/runtime/components/We/Dt/CardFilterContainer.vue.d.ts +17 -0
  36. package/dist/runtime/components/We/Dt/CheckboxFilter.d.vue.ts +16 -0
  37. package/dist/runtime/components/We/Dt/CheckboxFilter.vue +47 -0
  38. package/dist/runtime/components/We/Dt/CheckboxFilter.vue.d.ts +16 -0
  39. package/dist/runtime/components/We/Dt/ChipGroupSelect.d.vue.ts +7 -0
  40. package/dist/runtime/components/We/Dt/ChipGroupSelect.vue +35 -0
  41. package/dist/runtime/components/We/Dt/ChipGroupSelect.vue.d.ts +7 -0
  42. package/dist/runtime/components/We/Dt/ClusterFilter.d.vue.ts +18 -0
  43. package/dist/runtime/components/We/Dt/ClusterFilter.vue +68 -0
  44. package/dist/runtime/components/We/Dt/ClusterFilter.vue.d.ts +18 -0
  45. package/dist/runtime/components/We/Dt/DatasetFormatter.d.vue.ts +19 -0
  46. package/dist/runtime/components/We/Dt/DatasetFormatter.vue +65 -0
  47. package/dist/runtime/components/We/Dt/DatasetFormatter.vue.d.ts +19 -0
  48. package/dist/runtime/components/We/Dt/DaterangeFilter.d.vue.ts +28 -0
  49. package/dist/runtime/components/We/Dt/DaterangeFilter.vue +140 -0
  50. package/dist/runtime/components/We/Dt/DaterangeFilter.vue.d.ts +28 -0
  51. package/dist/runtime/components/We/Dt/Filter.d.vue.ts +7 -0
  52. package/dist/runtime/components/We/Dt/Filter.vue +234 -0
  53. package/dist/runtime/components/We/Dt/Filter.vue.d.ts +7 -0
  54. package/dist/runtime/components/We/Dt/Filters.d.vue.ts +6 -0
  55. package/dist/runtime/components/We/Dt/Filters.vue +24 -0
  56. package/dist/runtime/components/We/Dt/Filters.vue.d.ts +6 -0
  57. package/dist/runtime/components/We/Dt/LuxonFormatter.d.vue.ts +12 -0
  58. package/dist/runtime/components/We/Dt/LuxonFormatter.vue +23 -0
  59. package/dist/runtime/components/We/Dt/LuxonFormatter.vue.d.ts +12 -0
  60. package/dist/runtime/components/We/Dt/SelectFilter.d.vue.ts +60 -0
  61. package/dist/runtime/components/We/Dt/SelectFilter.vue +333 -0
  62. package/dist/runtime/components/We/Dt/SelectFilter.vue.d.ts +60 -0
  63. package/dist/runtime/components/We/Dt/SelectResourceFilter.d.vue.ts +43 -0
  64. package/dist/runtime/components/We/Dt/SelectResourceFilter.vue +127 -0
  65. package/dist/runtime/components/We/Dt/SelectResourceFilter.vue.d.ts +43 -0
  66. package/dist/runtime/components/We/Dt/dt.types.d.ts +8 -0
  67. package/dist/runtime/components/We/EndpointSwitcher.d.vue.ts +12 -0
  68. package/dist/runtime/components/We/EndpointSwitcher.vue +256 -0
  69. package/dist/runtime/components/We/EndpointSwitcher.vue.d.ts +12 -0
  70. package/dist/runtime/components/We/Import.d.vue.ts +118 -0
  71. package/dist/runtime/components/We/Import.vue +730 -0
  72. package/dist/runtime/components/We/Import.vue.d.ts +118 -0
  73. package/dist/runtime/components/We/ImportDefaultValues.d.vue.ts +3666 -0
  74. package/dist/runtime/components/We/ImportDefaultValues.vue +115 -0
  75. package/dist/runtime/components/We/ImportDefaultValues.vue.d.ts +3666 -0
  76. package/dist/runtime/components/We/ImportMatchColumns.d.vue.ts +66 -0
  77. package/dist/runtime/components/We/ImportMatchColumns.vue +172 -0
  78. package/dist/runtime/components/We/ImportMatchColumns.vue.d.ts +66 -0
  79. package/dist/runtime/components/We/ImportPreviewResults.d.vue.ts +38 -0
  80. package/dist/runtime/components/We/ImportPreviewResults.vue +165 -0
  81. package/dist/runtime/components/We/ImportPreviewResults.vue.d.ts +38 -0
  82. package/dist/runtime/components/We/ImportSelectStart.d.vue.ts +47 -0
  83. package/dist/runtime/components/We/ImportSelectStart.vue +106 -0
  84. package/dist/runtime/components/We/ImportSelectStart.vue.d.ts +47 -0
  85. package/dist/runtime/components/We/Notification.d.vue.ts +7 -0
  86. package/dist/runtime/components/We/Notification.vue +49 -0
  87. package/dist/runtime/components/We/Notification.vue.d.ts +7 -0
  88. package/dist/runtime/components/We/S3Dropzone.d.vue.ts +17 -0
  89. package/dist/runtime/components/We/S3Dropzone.vue +527 -0
  90. package/dist/runtime/components/We/S3Dropzone.vue.d.ts +17 -0
  91. package/dist/runtime/components/We/Select.d.vue.ts +39 -0
  92. package/dist/runtime/components/We/Select.vue +354 -0
  93. package/dist/runtime/components/We/Select.vue.d.ts +39 -0
  94. package/dist/runtime/components/We/TipTap.d.vue.ts +26 -0
  95. package/dist/runtime/components/We/TipTap.vue +362 -0
  96. package/dist/runtime/components/We/TipTap.vue.d.ts +26 -0
  97. package/dist/runtime/components/We/datatable.props.d.ts +57 -0
  98. package/dist/runtime/components/We/datatable.props.js +60 -0
  99. package/dist/runtime/composables/datatable/useAutoFillHeight.d.ts +31 -0
  100. package/dist/runtime/composables/datatable/useAutoFillHeight.js +57 -0
  101. package/dist/runtime/composables/datatable/useDataTable.d.ts +33 -0
  102. package/dist/runtime/composables/datatable/useDataTable.js +161 -0
  103. package/dist/runtime/composables/datatable/useDatatableColumns.d.ts +12 -0
  104. package/dist/runtime/composables/datatable/useDatatableColumns.js +96 -0
  105. package/dist/runtime/composables/useApi.d.ts +56 -0
  106. package/dist/runtime/composables/useApi.js +230 -0
  107. package/dist/runtime/composables/useApiFetch.d.ts +2 -0
  108. package/dist/runtime/composables/useApiFetch.js +9 -0
  109. package/dist/runtime/composables/useApiUrl.d.ts +10 -0
  110. package/dist/runtime/composables/useApiUrl.js +37 -0
  111. package/dist/runtime/composables/useAuth.d.ts +9 -0
  112. package/dist/runtime/composables/useAuth.js +22 -0
  113. package/dist/runtime/composables/useBus.d.ts +8 -0
  114. package/dist/runtime/composables/useBus.js +18 -0
  115. package/dist/runtime/composables/useDateRangePresets.d.ts +21 -0
  116. package/dist/runtime/composables/useDateRangePresets.js +90 -0
  117. package/dist/runtime/composables/useForm.d.ts +29 -0
  118. package/dist/runtime/composables/useForm.js +74 -0
  119. package/dist/runtime/composables/useFormLock.d.ts +11 -0
  120. package/dist/runtime/composables/useFormLock.js +8 -0
  121. package/dist/runtime/composables/useFormWrapper.d.ts +16 -0
  122. package/dist/runtime/composables/useFormWrapper.js +36 -0
  123. package/dist/runtime/composables/useImportJob.d.ts +55 -0
  124. package/dist/runtime/composables/useImportJob.js +94 -0
  125. package/dist/runtime/composables/useLux.d.ts +1 -0
  126. package/dist/runtime/composables/useLux.js +8 -0
  127. package/dist/runtime/composables/useNotify.d.ts +12 -0
  128. package/dist/runtime/composables/useNotify.js +24 -0
  129. package/dist/runtime/composables/usePaginatedFetch.d.ts +24 -0
  130. package/dist/runtime/composables/usePaginatedFetch.js +154 -0
  131. package/dist/runtime/composables/useServerErrors.d.ts +16 -0
  132. package/dist/runtime/composables/useServerErrors.js +60 -0
  133. package/dist/runtime/composables/useValidators.d.ts +18 -0
  134. package/dist/runtime/composables/useValidators.js +56 -0
  135. package/dist/runtime/generator/code/dt.d.ts +8 -0
  136. package/dist/runtime/generator/code/dt.js +97 -0
  137. package/dist/runtime/generator/code/edit.d.ts +4 -0
  138. package/dist/runtime/generator/code/edit.js +41 -0
  139. package/dist/runtime/generator/code/form.d.ts +6 -0
  140. package/dist/runtime/generator/code/form.js +229 -0
  141. package/dist/runtime/generator/code/i18n.d.ts +5 -0
  142. package/dist/runtime/generator/code/i18n.js +43 -0
  143. package/dist/runtime/generator/code/index.d.ts +11 -0
  144. package/dist/runtime/generator/code/index.js +90 -0
  145. package/dist/runtime/generator/components/CodeSnippet.d.vue.ts +14 -0
  146. package/dist/runtime/generator/components/CodeSnippet.vue +49 -0
  147. package/dist/runtime/generator/components/CodeSnippet.vue.d.ts +14 -0
  148. package/dist/runtime/generator/components/Configuration.d.vue.ts +16 -0
  149. package/dist/runtime/generator/components/Configuration.vue +154 -0
  150. package/dist/runtime/generator/components/Configuration.vue.d.ts +16 -0
  151. package/dist/runtime/generator/components/GeneratorPage.d.vue.ts +50 -0
  152. package/dist/runtime/generator/components/GeneratorPage.vue +226 -0
  153. package/dist/runtime/generator/components/GeneratorPage.vue.d.ts +50 -0
  154. package/dist/runtime/generator/fs.d.ts +16 -0
  155. package/dist/runtime/generator/fs.js +79 -0
  156. package/dist/runtime/generator/index.d.vue.ts +52 -0
  157. package/dist/runtime/generator/index.vue +17 -0
  158. package/dist/runtime/generator/index.vue.d.ts +52 -0
  159. package/dist/runtime/internals/api.d.ts +3 -0
  160. package/dist/runtime/internals/api.js +16 -0
  161. package/dist/runtime/internals/bus.d.ts +1 -0
  162. package/dist/runtime/internals/bus.js +2 -0
  163. package/dist/runtime/internals/dt.d.ts +24 -0
  164. package/dist/runtime/internals/dt.js +57 -0
  165. package/dist/runtime/lang/en.json +211 -0
  166. package/dist/runtime/lang/it.json +211 -0
  167. package/dist/runtime/mixins/formValidator.d.ts +38 -0
  168. package/dist/runtime/mixins/formValidator.js +118 -0
  169. package/dist/runtime/plugins/api-legacy.d.ts +76 -0
  170. package/dist/runtime/plugins/api-legacy.js +11 -0
  171. package/dist/runtime/plugins/auth-legacy.d.ts +22 -0
  172. package/dist/runtime/plugins/auth-legacy.js +14 -0
  173. package/dist/runtime/plugins/bus-legacy.d.ts +6 -0
  174. package/dist/runtime/plugins/bus-legacy.js +9 -0
  175. package/dist/runtime/plugins/notify-legacy.d.ts +25 -0
  176. package/dist/runtime/plugins/notify-legacy.js +35 -0
  177. package/dist/runtime/plugins/portal.d.ts +2 -0
  178. package/dist/runtime/plugins/portal.js +5 -0
  179. package/dist/runtime/plugins/update-sanctum-app-config.d.ts +2 -0
  180. package/dist/runtime/plugins/update-sanctum-app-config.js +44 -0
  181. package/dist/runtime/plugins/vuetify-nuxt-icon.d.ts +4 -0
  182. package/dist/runtime/plugins/vuetify-nuxt-icon.js +30 -0
  183. package/dist/runtime/types/app-config.d.ts +24 -0
  184. package/dist/runtime/types/app-config.js +1 -0
  185. package/dist/runtime/types/icons.d.ts +82 -0
  186. package/dist/runtime/types/icons.js +84 -0
  187. package/dist/runtime/types/index.d.ts +2 -0
  188. package/dist/runtime/types/index.js +2 -0
  189. package/dist/runtime/types/module-options.d.ts +29 -0
  190. package/dist/runtime/types/module-options.js +0 -0
  191. package/dist/runtime/types/runtime-hooks.d.ts +17 -0
  192. package/dist/runtime/types/runtime-hooks.js +1 -0
  193. package/dist/runtime/utils/color.d.ts +10 -0
  194. package/dist/runtime/utils/color.js +38 -0
  195. package/dist/runtime/utils/file.d.ts +17 -0
  196. package/dist/runtime/utils/file.js +108 -0
  197. package/dist/runtime/utils/format.d.ts +1 -0
  198. package/dist/runtime/utils/format.js +14 -0
  199. package/dist/runtime/utils/make-enum.d.ts +15 -0
  200. package/dist/runtime/utils/make-enum.js +27 -0
  201. package/dist/runtime/utils/mergeDefaults.d.ts +1 -0
  202. package/dist/runtime/utils/mergeDefaults.js +18 -0
  203. package/dist/runtime/utils/object-to-formdata.d.ts +10 -0
  204. package/dist/runtime/utils/object-to-formdata.js +82 -0
  205. package/dist/runtime/utils/uuid.d.ts +1 -0
  206. package/dist/runtime/utils/uuid.js +9 -0
  207. package/dist/types.d.mts +9 -0
  208. package/package.json +92 -4
@@ -0,0 +1,38 @@
1
+ export namespace formValidatorMixin {
2
+ function data(): {
3
+ serverErrors: {};
4
+ allServerErrors: {};
5
+ dirtyMapserverErrors: {};
6
+ };
7
+ namespace methods {
8
+ function validatorRequired(val: any): any;
9
+ function validatorRequiredArray(val: any): any;
10
+ function validatorRequiredArrayNotEmpty(val: any): any;
11
+ function validatorNotNull(val: any): any;
12
+ function validatorMin(length: any): (v: any) => any;
13
+ function validatorMax(length: any, message: any): (v: any) => any;
14
+ function validatorMaxFileSize(size: any): (v: any) => any;
15
+ function validatorRequiredNumber(val: any): any;
16
+ function validatorEmail(val: any): any;
17
+ function validatorPhone(val: any): any;
18
+ function validatorEquals(match: any, message: any): (v: any) => any;
19
+ /**
20
+ * Decodifica un errore ajax in una serie di errori scatenati lato server
21
+ *
22
+ * @param {object} error
23
+ */
24
+ function decodeServerErrors(error: object): boolean;
25
+ /**
26
+ * Svuota eventuali errori lato server decodificati precedentemente
27
+ */
28
+ function clearServerErrors(): void;
29
+ function checkUntrackedServerErrors(notify?: boolean): any[];
30
+ function checkServerErrors(error: any, options?: {
31
+ scroll: string;
32
+ notifyUntracked: boolean;
33
+ }): boolean;
34
+ }
35
+ namespace computed {
36
+ function untrackedServerErrors(): {};
37
+ }
38
+ }
@@ -0,0 +1,118 @@
1
+ /* eslint-disable regexp/no-unused-capturing-group */
2
+ /* eslint-disable @intlify/vue-i18n/no-dynamic-keys */
3
+ import { humanFileSize } from '../utils/format.js'
4
+
5
+ /** @deprecated use useValidators & useForm */
6
+ export const formValidatorMixin = {
7
+ data() {
8
+ return {
9
+ serverErrors: {},
10
+ allServerErrors: {},
11
+ dirtyMapserverErrors: {},
12
+ }
13
+ },
14
+ methods: {
15
+ validatorRequired(val) {
16
+ return !!val || this.$t('validators.required')
17
+ },
18
+ validatorRequiredArray(val) {
19
+ return Array.isArray(val) || this.$t('validators.required')
20
+ },
21
+ // obbligatorio per i campi multipli: almeno un elemento (validatorRequiredArray accetta anche l'array vuoto)
22
+ validatorRequiredArrayNotEmpty(val) {
23
+ return (Array.isArray(val) && val.length > 0) || this.$t('validators.required')
24
+ },
25
+ validatorNotNull(val) {
26
+ return val != null || this.$t('validators.required')
27
+ },
28
+ validatorMin(length) {
29
+ return v => !v || (v || '').length >= length || this.$t('validators.minLength', { length })
30
+ },
31
+ validatorMax(length, message) {
32
+ return v => (v || '').length <= length || this.$t(message ?? 'validators.maxLength', { length })
33
+ },
34
+ validatorMaxFileSize(size) {
35
+ return v => !v || v.size <= size || this.$t('validators.maxFileSize', { size: humanFileSize(size, true) })
36
+ },
37
+ validatorRequiredNumber(val) {
38
+ const n = Number.parseInt(val, 10)
39
+ return (!Number.isNaN(n) && typeof n === 'number') || this.$t('validators.required')
40
+ },
41
+ validatorEmail(val) {
42
+ const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-0-9]+\.)+[a-z]{2,}))$/i
43
+ return !val || pattern.test(val) || this.$t('validators.email')
44
+ },
45
+ validatorPhone(val) {
46
+ const pattern = /^\d+$/
47
+ return !val || pattern.test(val) || this.$t('validators.phone')
48
+ },
49
+ validatorEquals(match, message) {
50
+ return (v) => {
51
+ return match === v || message
52
+ }
53
+ },
54
+ /**
55
+ * Decodifica un errore ajax in una serie di errori scatenati lato server
56
+ *
57
+ * @param {object} error
58
+ */
59
+ decodeServerErrors(error) {
60
+ if (error.response && error.response.status === 422) {
61
+ const data = error.response.data || error.response._data
62
+ const { errors } = data
63
+ this.allServerErrors = errors
64
+ const self = this
65
+ const handler = {
66
+ get(target, property) {
67
+ // necessario per Vue 3 cosi crede che questo proxy sia shallow e chiede tutte le chiavi
68
+ if (property === '__v_isShallow') { return true }
69
+
70
+ if (typeof property !== 'symbol' && (typeof property === 'string' && !property.startsWith('__v_') && !['toString', 'toJSON'].includes(property))) { self.dirtyMapserverErrors[property] = true }
71
+
72
+ return self.allServerErrors[property]
73
+ },
74
+ }
75
+
76
+ this.serverErrors = new Proxy({}, handler)
77
+ return true
78
+ }
79
+ return false
80
+ },
81
+ /**
82
+ * Svuota eventuali errori lato server decodificati precedentemente
83
+ */
84
+ clearServerErrors() {
85
+ this.serverErrors = {}
86
+ this.allServerErrors = {}
87
+ this.dirtyMapserverErrors = {}
88
+ },
89
+ checkUntrackedServerErrors(notify = true) {
90
+ const errors = Object.values(this.allServerErrors).map(e => e.join(', ')).flat()
91
+ if (errors.length > 0) { notify && this.$notify?.error('', errors.join('\n ')) }
92
+
93
+ return errors
94
+ },
95
+ checkServerErrors(error, options = { scroll: '.v-input.error--text', notifyUntracked: true }) {
96
+ this.clearServerErrors()
97
+ const errors = this.decodeServerErrors(error)
98
+ this.$nextTick(() => {
99
+ this.checkUntrackedServerErrors(options.notifyUntracked)
100
+ if (options.scroll) {
101
+ const selector = typeof options.scroll === 'boolean' ? '.v-input.error--text' : options.scroll
102
+ const inputsWithErrors = document.querySelectorAll(selector)
103
+ if (inputsWithErrors.length > 0) { inputsWithErrors[0].scrollIntoView({ block: 'center', behavior: 'smooth' }) }
104
+ }
105
+ })
106
+ return errors
107
+ },
108
+ },
109
+ computed: {
110
+ untrackedServerErrors() {
111
+ return Object.entries(this.allServerErrors).reduce((acc, [key, value]) => {
112
+ if (!this.dirtyMapserverErrors[key]) { acc[key] = value }
113
+
114
+ return acc
115
+ }, {})
116
+ },
117
+ },
118
+ }
@@ -0,0 +1,76 @@
1
+ declare const _default: import("#app").Plugin<{
2
+ api: {
3
+ fetch: import("ofetch").$Fetch;
4
+ request<T>(options: import("../composables/useApi.js").FetchOptions & {
5
+ url: string;
6
+ data?: import("../composables/useApi.js").BodyRequest;
7
+ }): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
8
+ get<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
9
+ getLazy<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<any>;
10
+ post<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
11
+ put<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
12
+ patch<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
13
+ delete<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
14
+ postForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
15
+ putForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
16
+ patchForm<T>(url: string, data: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
17
+ $request<T>(options: import("../composables/useApi.js").FetchOptions & {
18
+ url: string;
19
+ data?: import("../composables/useApi.js").BodyRequest;
20
+ }): Promise<T>;
21
+ $get<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
22
+ $post<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
23
+ $put<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
24
+ $patch<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
25
+ $delete<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
26
+ $postForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<T>;
27
+ $putForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<T>;
28
+ $patchForm<T>(url: string, data: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<T>;
29
+ buildFormData(data?: import("../composables/useApi.js").InputFormData, options?: import("../utils/object-to-formdata.js").Options): FormData;
30
+ $getLazy<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
31
+ $getLazyInvalidate(key?: string): void;
32
+ getSignedURL(file: File, options?: import("../composables/useApi.js").FetchOptions, signedUrl?: string): Promise<import("ofetch").FetchResponse<any>>;
33
+ uploadFile(file: File, options?: import("../composables/useApi.js").FetchOptions, signedUrl?: string): Promise<any>;
34
+ download(url: string, filename?: string, options?: import("../composables/useApi.js").FetchOptions): Promise<import("ofetch").FetchResponse<Blob>>;
35
+ changeBaseUrl(baseURL: string, reload?: boolean): void;
36
+ };
37
+ fetch: import("ofetch").$Fetch;
38
+ }> & import("#app").ObjectPlugin<{
39
+ api: {
40
+ fetch: import("ofetch").$Fetch;
41
+ request<T>(options: import("../composables/useApi.js").FetchOptions & {
42
+ url: string;
43
+ data?: import("../composables/useApi.js").BodyRequest;
44
+ }): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
45
+ get<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
46
+ getLazy<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<any>;
47
+ post<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
48
+ put<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
49
+ patch<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
50
+ delete<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
51
+ postForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
52
+ putForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
53
+ patchForm<T>(url: string, data: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<import("../composables/useApi.js").LaravelResponse<T>>;
54
+ $request<T>(options: import("../composables/useApi.js").FetchOptions & {
55
+ url: string;
56
+ data?: import("../composables/useApi.js").BodyRequest;
57
+ }): Promise<T>;
58
+ $get<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
59
+ $post<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
60
+ $put<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
61
+ $patch<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
62
+ $delete<T>(url: string, body?: import("../composables/useApi.js").BodyRequest, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
63
+ $postForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<T>;
64
+ $putForm<T>(url: string, data?: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<T>;
65
+ $patchForm<T>(url: string, data: import("../composables/useApi.js").InputFormData, options?: import("../composables/useApi.js").FetchOptions & import("../utils/object-to-formdata.js").Options): Promise<T>;
66
+ buildFormData(data?: import("../composables/useApi.js").InputFormData, options?: import("../utils/object-to-formdata.js").Options): FormData;
67
+ $getLazy<T>(url: string, options?: import("../composables/useApi.js").FetchOptions): Promise<T>;
68
+ $getLazyInvalidate(key?: string): void;
69
+ getSignedURL(file: File, options?: import("../composables/useApi.js").FetchOptions, signedUrl?: string): Promise<import("ofetch").FetchResponse<any>>;
70
+ uploadFile(file: File, options?: import("../composables/useApi.js").FetchOptions, signedUrl?: string): Promise<any>;
71
+ download(url: string, filename?: string, options?: import("../composables/useApi.js").FetchOptions): Promise<import("ofetch").FetchResponse<Blob>>;
72
+ changeBaseUrl(baseURL: string, reload?: boolean): void;
73
+ };
74
+ fetch: import("ofetch").$Fetch;
75
+ }>;
76
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { defineNuxtPlugin } from "#app";
2
+ import { useApi } from "../composables/useApi.js";
3
+ export default defineNuxtPlugin(() => {
4
+ const api = useApi();
5
+ return {
6
+ provide: {
7
+ api,
8
+ fetch: api.fetch
9
+ }
10
+ };
11
+ });
@@ -0,0 +1,22 @@
1
+ declare const _default: import("#app").Plugin<{
2
+ auth: {
3
+ login: (credentials: Record<string, unknown>, fetchIdentity?: boolean) => Promise<unknown>;
4
+ logout: () => Promise<void>;
5
+ fetchUser: () => Promise<void>;
6
+ setUserToken: (token: string) => Promise<void>;
7
+ getUserToken: () => Promise<string | undefined> | undefined;
8
+ loggedIn: boolean;
9
+ user: any;
10
+ };
11
+ }> & import("#app").ObjectPlugin<{
12
+ auth: {
13
+ login: (credentials: Record<string, unknown>, fetchIdentity?: boolean) => Promise<unknown>;
14
+ logout: () => Promise<void>;
15
+ fetchUser: () => Promise<void>;
16
+ setUserToken: (token: string) => Promise<void>;
17
+ getUserToken: () => Promise<string | undefined> | undefined;
18
+ loggedIn: boolean;
19
+ user: any;
20
+ };
21
+ }>;
22
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { defineNuxtPlugin, reactive, useAuth } from "#imports";
2
+ export default defineNuxtPlugin(() => {
3
+ const { loggedIn, user, ...methods } = useAuth();
4
+ const auth = reactive({
5
+ loggedIn,
6
+ user,
7
+ ...methods
8
+ });
9
+ return {
10
+ provide: {
11
+ auth
12
+ }
13
+ };
14
+ });
@@ -0,0 +1,6 @@
1
+ declare const _default: import("#app").Plugin<{
2
+ bus: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
3
+ }> & import("#app").ObjectPlugin<{
4
+ bus: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
5
+ }>;
6
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { defineNuxtPlugin } from "#app";
2
+ import { busInstance } from "../internals/bus.js";
3
+ export default defineNuxtPlugin(() => {
4
+ return {
5
+ provide: {
6
+ bus: busInstance
7
+ }
8
+ };
9
+ });
@@ -0,0 +1,25 @@
1
+ import type { PushStatic } from 'notivue';
2
+ type NotifyType = 'info' | 'success' | 'warn' | 'error';
3
+ type NotifyOptions = PushStatic & {
4
+ type?: NotifyType;
5
+ };
6
+ declare const _default: import("#app").Plugin<{
7
+ notify: {
8
+ info(title: string, text?: string, options?: NotifyOptions): void;
9
+ success(title: string, text?: string, options?: NotifyOptions): void;
10
+ warn(title: string, text?: string, options?: NotifyOptions): void;
11
+ error(title: string, text?: string, options?: NotifyOptions): void;
12
+ _notify(type: NotifyType, title: string, text?: string, overrides?: NotifyOptions): void;
13
+ toast(options: NotifyOptions): void;
14
+ };
15
+ }> & import("#app").ObjectPlugin<{
16
+ notify: {
17
+ info(title: string, text?: string, options?: NotifyOptions): void;
18
+ success(title: string, text?: string, options?: NotifyOptions): void;
19
+ warn(title: string, text?: string, options?: NotifyOptions): void;
20
+ error(title: string, text?: string, options?: NotifyOptions): void;
21
+ _notify(type: NotifyType, title: string, text?: string, overrides?: NotifyOptions): void;
22
+ toast(options: NotifyOptions): void;
23
+ };
24
+ }>;
25
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { defineNuxtPlugin } from "#app";
2
+ import { push } from "notivue";
3
+ import { formatError } from "../internals/api.js";
4
+ export default defineNuxtPlugin(() => {
5
+ class Notify {
6
+ info(title, text, options) {
7
+ this._notify("info", title, text, options);
8
+ }
9
+ success(title, text, options) {
10
+ this._notify("success", title, text, options);
11
+ }
12
+ warn(title, text, options) {
13
+ this._notify("warn", title, text, options);
14
+ }
15
+ error(title, text, options) {
16
+ this._notify("error", formatError(title), text, options);
17
+ }
18
+ _notify(type, title, text, overrides) {
19
+ const _type = type === "warn" ? "warning" : type;
20
+ push[_type]({
21
+ title: text ? title : void 0,
22
+ message: text || title,
23
+ ...overrides
24
+ });
25
+ }
26
+ toast(options) {
27
+ this._notify(options.type || "info", "", "", options);
28
+ }
29
+ }
30
+ return {
31
+ provide: {
32
+ notify: new Notify()
33
+ }
34
+ };
35
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { defineNuxtPlugin } from "#app";
2
+ import PortalVue from "portal-vue";
3
+ export default defineNuxtPlugin((nuxtApp) => {
4
+ nuxtApp.vueApp.use(PortalVue);
5
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,44 @@
1
+ import { defineNuxtPlugin } from "#app";
2
+ import { updateAppConfig, useApiUrl } from "#imports";
3
+ const tokenStorageKey = "auth._token.local";
4
+ const localTokenStorage = {
5
+ get: async () => {
6
+ if (import.meta.server) {
7
+ return void 0;
8
+ }
9
+ const token = window.localStorage.getItem(tokenStorageKey) ?? void 0;
10
+ if (token?.startsWith("Bearer ")) {
11
+ return token.substring(7);
12
+ }
13
+ return token;
14
+ },
15
+ set: async (app, token) => {
16
+ if (import.meta.server) {
17
+ return;
18
+ }
19
+ if (!token) {
20
+ window.localStorage.removeItem(tokenStorageKey);
21
+ return;
22
+ }
23
+ window.localStorage.setItem(tokenStorageKey, token);
24
+ }
25
+ };
26
+ export default defineNuxtPlugin({
27
+ setup(nuxtApp) {
28
+ updateAppConfig({
29
+ sanctum: {
30
+ tokenStorage: localTokenStorage
31
+ }
32
+ });
33
+ nuxtApp.hook("sanctum:request", (nuxtApp2, context) => {
34
+ const { apiUrl, xDebug } = useApiUrl();
35
+ context.options.baseURL = apiUrl.value;
36
+ context.options.credentials = void 0;
37
+ context.options.query = {
38
+ ...context.options.query,
39
+ XDEBUG_SESSION_START: xDebug.value ?? void 0
40
+ };
41
+ context.options.headers.append("Accept", "application/json");
42
+ });
43
+ }
44
+ });
@@ -0,0 +1,4 @@
1
+ import type { IconSet } from 'vuetify';
2
+ export declare function nuxtIcon(): IconSet;
3
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
4
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { defineNuxtPlugin } from "#app";
2
+ import { Icon } from "#components";
3
+ import { h } from "vue";
4
+ import { aliases } from "../types/icons.js";
5
+ export function nuxtIcon() {
6
+ const component = Icon;
7
+ return {
8
+ component: (props) => {
9
+ const { icon, tag, ...rest } = props;
10
+ return h(tag, rest, [
11
+ h(component, {
12
+ name: icon
13
+ // ...rest,
14
+ })
15
+ ]);
16
+ }
17
+ };
18
+ }
19
+ export default defineNuxtPlugin((nuxtApp) => {
20
+ nuxtApp.hook("vuetify:configuration", ({ vuetifyOptions }) => {
21
+ vuetifyOptions.icons = {
22
+ ...vuetifyOptions.icons,
23
+ defaultSet: "nuxtIcon",
24
+ aliases,
25
+ sets: {
26
+ nuxtIcon: nuxtIcon()
27
+ }
28
+ };
29
+ });
30
+ });
@@ -0,0 +1,24 @@
1
+ import type { DefineComponent, Raw } from 'vue';
2
+ export interface WeNuxtAppConfig {
3
+ we?: {
4
+ datatables?: {
5
+ persist?: 'state' | 'local' | 'session';
6
+ persistColumns?: 'state' | 'local' | 'session';
7
+ itemsPerPage?: number;
8
+ formatters?: Record<string, Raw<DefineComponent<any, any, any>>>;
9
+ };
10
+ };
11
+ }
12
+ declare module '@nuxt/schema' {
13
+ interface AppConfigInput extends WeNuxtAppConfig {
14
+ }
15
+ interface AppConfig extends WeNuxtAppConfig {
16
+ }
17
+ }
18
+ declare module 'nuxt/schema' {
19
+ interface AppConfigInput extends WeNuxtAppConfig {
20
+ }
21
+ interface AppConfig extends WeNuxtAppConfig {
22
+ }
23
+ }
24
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,82 @@
1
+ export declare const aliases: {
2
+ search: string;
3
+ save: string;
4
+ trash: string;
5
+ refresh: string;
6
+ filter: string;
7
+ filterOff: string;
8
+ columns: string;
9
+ columnsOn: string;
10
+ time: string;
11
+ datetime: string;
12
+ booleanOn: string;
13
+ booleanOff: string;
14
+ checkboxMultipleOn: string;
15
+ alert: string;
16
+ help: string;
17
+ arrowRightBold: string;
18
+ };
19
+ export declare const vuetifyAliases: {
20
+ collapse: string;
21
+ complete: string;
22
+ cancel: string;
23
+ close: string;
24
+ delete: string;
25
+ clear: string;
26
+ success: string;
27
+ info: string;
28
+ warning: string;
29
+ error: string;
30
+ prev: string;
31
+ next: string;
32
+ checkboxOn: string;
33
+ checkboxOff: string;
34
+ checkboxIndeterminate: string;
35
+ delimiter: string;
36
+ sortAsc: string;
37
+ sortDesc: string;
38
+ expand: string;
39
+ menu: string;
40
+ subgroup: string;
41
+ dropdown: string;
42
+ radioOn: string;
43
+ radioOff: string;
44
+ edit: string;
45
+ ratingEmpty: string;
46
+ ratingFull: string;
47
+ ratingHalf: string;
48
+ loading: string;
49
+ first: string;
50
+ last: string;
51
+ unfold: string;
52
+ file: string;
53
+ plus: string;
54
+ minus: string;
55
+ calendar: string;
56
+ treeviewCollapse: string;
57
+ treeviewExpand: string;
58
+ tableGroupCollapse: string;
59
+ tableGroupExpand: string;
60
+ eyeDropper: string;
61
+ upload: string;
62
+ color: string;
63
+ command: string;
64
+ ctrl: string;
65
+ space: string;
66
+ shift: string;
67
+ alt: string;
68
+ enter: string;
69
+ arrowup: string;
70
+ arrowdown: string;
71
+ arrowleft: string;
72
+ arrowright: string;
73
+ backspace: string;
74
+ play: string;
75
+ pause: string;
76
+ fullscreen: string;
77
+ fullscreenExit: string;
78
+ volumeHigh: string;
79
+ volumeMedium: string;
80
+ volumeLow: string;
81
+ volumeOff: string;
82
+ };
@@ -0,0 +1,84 @@
1
+ export const aliases = {
2
+ search: "mdi-magnify",
3
+ save: "mdi-content-save",
4
+ trash: "mdi-delete",
5
+ refresh: "mdi-refresh",
6
+ filter: "mdi-filter",
7
+ filterOff: "mdi-filter-outline",
8
+ columns: "mdi-view-column-outline",
9
+ columnsOn: "mdi-view-column",
10
+ time: "mdi-clock-outline",
11
+ datetime: "mdi-calendar-clock",
12
+ booleanOn: "mdi-check-circle-outline",
13
+ booleanOff: "mdi-close-circle-outline",
14
+ checkboxMultipleOn: "mdi-checkbox-multiple-marked",
15
+ alert: "mdi-alert-outline",
16
+ help: "mdi-help-circle",
17
+ arrowRightBold: "mdi-arrow-right-bold"
18
+ };
19
+ export const vuetifyAliases = {
20
+ collapse: "mdi-chevron-up",
21
+ complete: "mdi-check",
22
+ cancel: "mdi-close-circle",
23
+ close: "mdi-close",
24
+ delete: "mdi-close-circle",
25
+ // delete (e.g. v-chip close)
26
+ clear: "mdi-close-circle",
27
+ success: "mdi-check-circle",
28
+ info: "mdi-information",
29
+ warning: "mdi-alert-circle",
30
+ error: "mdi-close-circle",
31
+ prev: "mdi-chevron-left",
32
+ next: "mdi-chevron-right",
33
+ checkboxOn: "mdi-checkbox-marked",
34
+ checkboxOff: "mdi-checkbox-blank-outline",
35
+ checkboxIndeterminate: "mdi-minus-box",
36
+ delimiter: "mdi-circle",
37
+ // for carousel
38
+ sortAsc: "mdi-arrow-up",
39
+ sortDesc: "mdi-arrow-down",
40
+ expand: "mdi-chevron-down",
41
+ menu: "mdi-menu",
42
+ subgroup: "mdi-menu-down",
43
+ dropdown: "mdi-menu-down",
44
+ radioOn: "mdi-radiobox-marked",
45
+ radioOff: "mdi-radiobox-blank",
46
+ edit: "mdi-pencil",
47
+ ratingEmpty: "mdi-star-outline",
48
+ ratingFull: "mdi-star",
49
+ ratingHalf: "mdi-star-half-full",
50
+ loading: "mdi-cached",
51
+ first: "mdi-page-first",
52
+ last: "mdi-page-last",
53
+ unfold: "mdi-unfold-more-horizontal",
54
+ file: "mdi-paperclip",
55
+ plus: "mdi-plus",
56
+ minus: "mdi-minus",
57
+ calendar: "mdi-calendar",
58
+ treeviewCollapse: "mdi-menu-down",
59
+ treeviewExpand: "mdi-menu-right",
60
+ tableGroupCollapse: "mdi-chevron-down",
61
+ tableGroupExpand: "mdi-chevron-right",
62
+ eyeDropper: "mdi-eyedropper",
63
+ upload: "mdi-cloud-upload",
64
+ color: "mdi-palette",
65
+ command: "mdi-apple-keyboard-command",
66
+ ctrl: "mdi-apple-keyboard-control",
67
+ space: "mdi-keyboard-space",
68
+ shift: "mdi-apple-keyboard-shift",
69
+ alt: "mdi-apple-keyboard-option",
70
+ enter: "mdi-keyboard-return",
71
+ arrowup: "mdi-arrow-up",
72
+ arrowdown: "mdi-arrow-down",
73
+ arrowleft: "mdi-arrow-left",
74
+ arrowright: "mdi-arrow-right",
75
+ backspace: "mdi-backspace",
76
+ play: "mdi-play",
77
+ pause: "mdi-pause",
78
+ fullscreen: "mdi-fullscreen",
79
+ fullscreenExit: "mdi-fullscreen-exit",
80
+ volumeHigh: "mdi-volume-high",
81
+ volumeMedium: "mdi-volume-medium",
82
+ volumeLow: "mdi-volume-low",
83
+ volumeOff: "mdi-volume-variant-off"
84
+ };