@hostlink/nuxt-light 1.66.0 → 1.67.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 (239) hide show
  1. package/README.md +1 -0
  2. package/dist/module.d.mts +6 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +34 -0
  5. package/dist/runtime/components/{l-audit-card.d.vue.ts → L/AuditCard.d.vue.ts} +1 -1
  6. package/dist/runtime/components/{l-audit-card.vue → L/AuditCard.vue} +1 -1
  7. package/dist/runtime/components/{l-audit-card.vue.d.ts → L/AuditCard.vue.d.ts} +1 -1
  8. package/dist/runtime/components/{l-bar.vue → L/Bar.vue} +1 -2
  9. package/dist/runtime/components/{l-btn.d.vue.ts → L/Btn.d.vue.ts} +0 -1
  10. package/dist/runtime/components/{l-btn.vue → L/Btn.vue} +17 -14
  11. package/dist/runtime/components/{l-btn.vue.d.ts → L/Btn.vue.d.ts} +0 -1
  12. package/dist/runtime/components/{l-card.vue → L/Card.vue} +8 -6
  13. package/dist/runtime/components/{l-checkbox.vue → L/Checkbox.vue} +4 -2
  14. package/dist/runtime/components/{l-date-picker.vue → L/DatePicker.vue} +85 -103
  15. package/dist/runtime/components/{l-delete-btn.d.vue.ts → L/DeleteBtn.d.vue.ts} +10 -1
  16. package/dist/runtime/components/{l-delete-btn.vue → L/DeleteBtn.vue} +4 -2
  17. package/dist/runtime/components/{l-delete-btn.vue.d.ts → L/DeleteBtn.vue.d.ts} +10 -1
  18. package/dist/runtime/components/L/DialogDatabaseFieldAdd.d.vue.ts +21 -0
  19. package/dist/runtime/components/{l-dialog-database-field-add.vue → L/DialogDatabaseFieldAdd.vue} +14 -15
  20. package/dist/runtime/components/L/DialogDatabaseFieldAdd.vue.d.ts +21 -0
  21. package/dist/runtime/components/L/DocumentViewer.d.vue.ts +1 -1
  22. package/dist/runtime/components/L/DocumentViewer.vue.d.ts +1 -1
  23. package/dist/runtime/components/L/DocumentViewerDialog.d.vue.ts +2 -2
  24. package/dist/runtime/components/L/DocumentViewerDialog.vue.d.ts +2 -2
  25. package/dist/runtime/components/{l-editor.vue → L/Editor.vue} +31 -17
  26. package/dist/runtime/components/L/Fieldset.d.vue.ts +15 -27
  27. package/dist/runtime/components/L/Fieldset.vue +4 -10
  28. package/dist/runtime/components/L/Fieldset.vue.d.ts +15 -27
  29. package/dist/runtime/components/{l-file-manager.vue → L/FileManager.vue} +2 -5
  30. package/dist/runtime/components/{l-icon-picker.vue → L/IconPicker.vue} +13 -13
  31. package/dist/runtime/components/{l-input.d.vue.ts → L/Input.d.vue.ts} +7 -3
  32. package/dist/runtime/components/{l-input.vue → L/Input.vue} +59 -80
  33. package/dist/runtime/components/{l-input.vue.d.ts → L/Input.vue.d.ts} +7 -3
  34. package/dist/runtime/components/{l-input-select.d.vue.ts → L/InputSelect.d.vue.ts} +3 -2
  35. package/dist/runtime/components/{l-input-select.vue → L/InputSelect.vue} +27 -9
  36. package/dist/runtime/components/{l-input-select.vue.d.ts → L/InputSelect.vue.d.ts} +3 -2
  37. package/dist/runtime/components/L/InputXlsx.d.vue.ts +17 -0
  38. package/dist/runtime/components/L/InputXlsx.vue +81 -0
  39. package/dist/runtime/components/L/InputXlsx.vue.d.ts +17 -0
  40. package/dist/runtime/components/{l-item.vue → L/Item.vue} +14 -5
  41. package/dist/runtime/components/{l-list.vue → L/List.vue} +18 -21
  42. package/dist/runtime/components/{l-page.vue → L/Page.vue} +6 -8
  43. package/dist/runtime/components/L/SearchNumber.d.vue.ts +16 -0
  44. package/dist/runtime/components/L/SearchNumber.vue +139 -0
  45. package/dist/runtime/components/L/SearchNumber.vue.d.ts +16 -0
  46. package/dist/runtime/components/L/Select.d.vue.ts +46 -0
  47. package/dist/runtime/components/{l-select.vue → L/Select.vue} +37 -18
  48. package/dist/runtime/components/L/Select.vue.d.ts +46 -0
  49. package/dist/runtime/components/L/System/Setting/logs.vue +75 -0
  50. package/dist/runtime/components/{l-tab.d.vue.ts → L/Tab.d.vue.ts} +2 -2
  51. package/dist/runtime/components/L/Tab.vue +38 -0
  52. package/dist/runtime/components/{l-tab.vue.d.ts → L/Tab.vue.d.ts} +2 -2
  53. package/dist/runtime/components/{l-table.d.vue.ts → L/Table.d.vue.ts} +16 -8
  54. package/dist/runtime/components/{l-table.vue → L/Table.vue} +139 -84
  55. package/dist/runtime/components/{l-table.vue.d.ts → L/Table.vue.d.ts} +16 -8
  56. package/dist/runtime/components/{l-tabs.vue → L/Tabs.vue} +15 -8
  57. package/dist/runtime/components/{l-time-picker.d.vue.ts → L/TimePicker.d.vue.ts} +3 -2
  58. package/dist/runtime/components/L/TimePicker.vue +73 -0
  59. package/dist/runtime/components/{l-time-picker.vue.d.ts → L/TimePicker.vue.d.ts} +3 -2
  60. package/dist/runtime/components/{MyTest.d.vue.ts → L/User/apikey.d.vue.ts} +4 -4
  61. package/dist/runtime/components/L/User/apikey.vue +18 -0
  62. package/dist/runtime/components/{MyTest.vue.d.ts → L/User/apikey.vue.d.ts} +4 -4
  63. package/dist/runtime/components/L/ViewBtn.d.vue.ts +3 -0
  64. package/dist/runtime/components/L/ViewBtn.vue.d.ts +3 -0
  65. package/dist/runtime/composables/defineLightModel.d.ts +1 -1
  66. package/dist/runtime/composables/model.d.ts +1 -1
  67. package/dist/runtime/composables/showUploadFilesDialog.js +1 -1
  68. package/dist/runtime/composables/useLight.d.ts +22 -22
  69. package/dist/runtime/composables/useLight.js +10 -1
  70. package/dist/runtime/composables/useLightProps.d.ts +26 -0
  71. package/dist/runtime/composables/useLightProps.js +73 -0
  72. package/dist/runtime/models/APIKey.d.ts +2 -0
  73. package/dist/runtime/models/APIKey.js +20 -0
  74. package/dist/runtime/models/EventLog.js +5 -1
  75. package/dist/runtime/models/SystemValue.d.ts +2 -0
  76. package/dist/runtime/models/SystemValue.js +15 -0
  77. package/dist/runtime/pages/Permission/all.vue +23 -14
  78. package/dist/runtime/pages/System/database/table.vue +28 -1
  79. package/dist/runtime/pages/System/index.vue +1 -1
  80. package/dist/runtime/pages/System/menu/index.vue +5 -1
  81. package/dist/runtime/pages/System/setting.vue +2 -0
  82. package/dist/runtime/pages/System/view_as.vue +4 -1
  83. package/dist/runtime/pages/SystemValue/index.vue +4 -1
  84. package/dist/runtime/pages/User/createAccessToken.vue +2 -1
  85. package/dist/runtime/pages/User/index.vue +2 -2
  86. package/dist/runtime/pages/User/profile.d.vue.ts +1 -1
  87. package/dist/runtime/pages/User/profile.vue +48 -5
  88. package/dist/runtime/pages/User/profile.vue.d.ts +1 -1
  89. package/dist/runtime/plugin.js +13 -26
  90. package/package.json +2 -1
  91. package/dist/runtime/components/MyTest.vue +0 -11
  92. package/dist/runtime/components/l-dialog-database-field-add.d.vue.ts +0 -9
  93. package/dist/runtime/components/l-dialog-database-field-add.vue.d.ts +0 -9
  94. package/dist/runtime/components/l-input-xlsx.d.vue.ts +0 -11
  95. package/dist/runtime/components/l-input-xlsx.vue +0 -60
  96. package/dist/runtime/components/l-input-xlsx.vue.d.ts +0 -11
  97. package/dist/runtime/components/l-select.d.vue.ts +0 -20
  98. package/dist/runtime/components/l-select.vue.d.ts +0 -20
  99. package/dist/runtime/components/l-tab.vue +0 -30
  100. package/dist/runtime/components/l-time-picker.vue +0 -71
  101. package/dist/runtime/components/{l-action-btn.d.vue.ts → L/ActionBtn.d.vue.ts} +0 -0
  102. package/dist/runtime/components/{l-action-btn.vue → L/ActionBtn.vue} +0 -0
  103. package/dist/runtime/components/{l-action-btn.vue.d.ts → L/ActionBtn.vue.d.ts} +0 -0
  104. package/dist/runtime/components/{l-add-btn.d.vue.ts → L/AddBtn.d.vue.ts} +0 -0
  105. package/dist/runtime/components/{l-add-btn.vue → L/AddBtn.vue} +0 -0
  106. package/dist/runtime/components/{l-add-btn.vue.d.ts → L/AddBtn.vue.d.ts} +0 -0
  107. package/dist/runtime/components/{l-alert.d.vue.ts → L/Alert.d.vue.ts} +0 -0
  108. package/dist/runtime/components/{l-alert.vue → L/Alert.vue} +0 -0
  109. package/dist/runtime/components/{l-alert.vue.d.ts → L/Alert.vue.d.ts} +0 -0
  110. package/dist/runtime/components/{l-app.d.vue.ts → L/App.d.vue.ts} +0 -0
  111. package/dist/runtime/components/{l-app.vue → L/App.vue} +0 -0
  112. package/dist/runtime/components/{l-app.vue.d.ts → L/App.vue.d.ts} +0 -0
  113. package/dist/runtime/components/{l-app-main.d.vue.ts → L/AppMain.d.vue.ts} +0 -0
  114. package/dist/runtime/components/{l-app-main.vue → L/AppMain.vue} +0 -0
  115. package/dist/runtime/components/{l-app-main.vue.d.ts → L/AppMain.vue.d.ts} +0 -0
  116. package/dist/runtime/components/{l-back-btn.d.vue.ts → L/BackBtn.d.vue.ts} +0 -0
  117. package/dist/runtime/components/{l-back-btn.vue → L/BackBtn.vue} +0 -0
  118. package/dist/runtime/components/{l-back-btn.vue.d.ts → L/BackBtn.vue.d.ts} +0 -0
  119. package/dist/runtime/components/{l-banner.d.vue.ts → L/Banner.d.vue.ts} +0 -0
  120. package/dist/runtime/components/{l-banner.vue → L/Banner.vue} +0 -0
  121. package/dist/runtime/components/{l-banner.vue.d.ts → L/Banner.vue.d.ts} +0 -0
  122. package/dist/runtime/components/{l-bar.d.vue.ts → L/Bar.d.vue.ts} +0 -0
  123. package/dist/runtime/components/{l-bar.vue.d.ts → L/Bar.vue.d.ts} +0 -0
  124. package/dist/runtime/components/{l-card.d.vue.ts → L/Card.d.vue.ts} +0 -0
  125. package/dist/runtime/components/{l-card.vue.d.ts → L/Card.vue.d.ts} +0 -0
  126. package/dist/runtime/components/{l-checkbox.d.vue.ts → L/Checkbox.d.vue.ts} +0 -0
  127. package/dist/runtime/components/{l-checkbox.vue.d.ts → L/Checkbox.vue.d.ts} +0 -0
  128. package/dist/runtime/components/{l-col.d.vue.ts → L/Col.d.vue.ts} +1 -1
  129. package/dist/runtime/components/{l-col.vue → L/Col.vue} +0 -0
  130. package/dist/runtime/components/{l-col.vue.d.ts → L/Col.vue.d.ts} +1 -1
  131. package/dist/runtime/components/{l-customizer.vue.d.ts → L/Customizer.d.vue.ts} +2 -2
  132. package/dist/runtime/components/{l-customizer.vue → L/Customizer.vue} +0 -0
  133. package/dist/runtime/components/{l-customizer.d.vue.ts → L/Customizer.vue.d.ts} +2 -2
  134. package/dist/runtime/components/{l-date-picker.d.vue.ts → L/DatePicker.d.vue.ts} +1 -1
  135. package/dist/runtime/components/{l-date-picker.vue.d.ts → L/DatePicker.vue.d.ts} +1 -1
  136. package/dist/runtime/components/{l-dialog-upload-files.d.vue.ts → L/DialogUploadFiles.d.vue.ts} +0 -0
  137. package/dist/runtime/components/{l-dialog-upload-files.vue → L/DialogUploadFiles.vue} +0 -0
  138. package/dist/runtime/components/{l-dialog-upload-files.vue.d.ts → L/DialogUploadFiles.vue.d.ts} +0 -0
  139. package/dist/runtime/components/{l-drag-drop.d.vue.ts → L/DragDrop.d.vue.ts} +0 -0
  140. package/dist/runtime/components/{l-drag-drop.vue → L/DragDrop.vue} +0 -0
  141. package/dist/runtime/components/{l-drag-drop.vue.d.ts → L/DragDrop.vue.d.ts} +0 -0
  142. package/dist/runtime/components/{l-drag-drop-container.d.vue.ts → L/DragDropContainer.d.vue.ts} +0 -0
  143. package/dist/runtime/components/{l-drag-drop-container.vue → L/DragDropContainer.vue} +0 -0
  144. package/dist/runtime/components/{l-drag-drop-container.vue.d.ts → L/DragDropContainer.vue.d.ts} +0 -0
  145. package/dist/runtime/components/{l-drag-drop-group.d.vue.ts → L/DragDropGroup.d.vue.ts} +0 -0
  146. package/dist/runtime/components/{l-drag-drop-group.vue → L/DragDropGroup.vue} +0 -0
  147. package/dist/runtime/components/{l-drag-drop-group.vue.d.ts → L/DragDropGroup.vue.d.ts} +0 -0
  148. package/dist/runtime/components/{l-edit-btn.d.vue.ts → L/EditBtn.d.vue.ts} +0 -0
  149. package/dist/runtime/components/{l-edit-btn.vue → L/EditBtn.vue} +0 -0
  150. package/dist/runtime/components/{l-edit-btn.vue.d.ts → L/EditBtn.vue.d.ts} +0 -0
  151. package/dist/runtime/components/{l-editor.d.vue.ts → L/Editor.d.vue.ts} +0 -0
  152. package/dist/runtime/components/{l-editor.vue.d.ts → L/Editor.vue.d.ts} +0 -0
  153. package/dist/runtime/components/{l-facebook-button.d.vue.ts → L/FacebookButton.d.vue.ts} +0 -0
  154. package/dist/runtime/components/{l-facebook-button.vue → L/FacebookButton.vue} +0 -0
  155. package/dist/runtime/components/{l-facebook-button.vue.d.ts → L/FacebookButton.vue.d.ts} +0 -0
  156. package/dist/runtime/components/{l-fav-menu.d.vue.ts → L/FavMenu.d.vue.ts} +2 -2
  157. package/dist/runtime/components/{l-fav-menu.vue → L/FavMenu.vue} +0 -0
  158. package/dist/runtime/components/{l-menu.d.vue.ts → L/FavMenu.vue.d.ts} +2 -2
  159. package/dist/runtime/components/{l-field.d.vue.ts → L/Field.d.vue.ts} +0 -0
  160. package/dist/runtime/components/{l-field.vue → L/Field.vue} +0 -0
  161. package/dist/runtime/components/{l-field.vue.d.ts → L/Field.vue.d.ts} +0 -0
  162. package/dist/runtime/components/{l-file.d.vue.ts → L/File.d.vue.ts} +0 -0
  163. package/dist/runtime/components/{l-file.vue → L/File.vue} +0 -0
  164. package/dist/runtime/components/{l-file.vue.d.ts → L/File.vue.d.ts} +0 -0
  165. package/dist/runtime/components/{l-file-manager.d.vue.ts → L/FileManager.d.vue.ts} +1 -1
  166. package/dist/runtime/components/{l-file-manager.vue.d.ts → L/FileManager.vue.d.ts} +1 -1
  167. package/dist/runtime/components/{l-file-manager-breadcrumbs.d.vue.ts → L/FileManagerBreadcrumbs.d.vue.ts} +0 -0
  168. package/dist/runtime/components/{l-file-manager-breadcrumbs.vue → L/FileManagerBreadcrumbs.vue} +0 -0
  169. package/dist/runtime/components/{l-file-manager-breadcrumbs.vue.d.ts → L/FileManagerBreadcrumbs.vue.d.ts} +0 -0
  170. package/dist/runtime/components/{l-file-manager-labels.d.vue.ts → L/FileManagerLabels.d.vue.ts} +0 -0
  171. package/dist/runtime/components/{l-file-manager-labels.vue → L/FileManagerLabels.vue} +0 -0
  172. package/dist/runtime/components/{l-file-manager-labels.vue.d.ts → L/FileManagerLabels.vue.d.ts} +0 -0
  173. package/dist/runtime/components/{l-file-manager-move.d.vue.ts → L/FileManagerMove.d.vue.ts} +0 -0
  174. package/dist/runtime/components/{l-file-manager-move.vue → L/FileManagerMove.vue} +0 -0
  175. package/dist/runtime/components/{l-file-manager-move.vue.d.ts → L/FileManagerMove.vue.d.ts} +0 -0
  176. package/dist/runtime/components/{l-file-manager-preview.d.vue.ts → L/FileManagerPreview.d.vue.ts} +0 -0
  177. package/dist/runtime/components/{l-file-manager-preview.vue → L/FileManagerPreview.vue} +0 -0
  178. package/dist/runtime/components/{l-file-manager-preview.vue.d.ts → L/FileManagerPreview.vue.d.ts} +0 -0
  179. package/dist/runtime/components/{l-file-upload.d.vue.ts → L/FileUpload.d.vue.ts} +1 -1
  180. package/dist/runtime/components/{l-file-upload.vue → L/FileUpload.vue} +0 -0
  181. package/dist/runtime/components/{l-file-upload.vue.d.ts → L/FileUpload.vue.d.ts} +1 -1
  182. package/dist/runtime/components/{l-form.d.vue.ts → L/Form.d.vue.ts} +0 -0
  183. package/dist/runtime/components/{l-form.vue → L/Form.vue} +0 -0
  184. package/dist/runtime/components/{l-form.vue.d.ts → L/Form.vue.d.ts} +0 -0
  185. package/dist/runtime/components/{l-form-dialog.d.vue.ts → L/FormDialog.d.vue.ts} +2 -2
  186. package/dist/runtime/components/{l-form-dialog.vue → L/FormDialog.vue} +0 -0
  187. package/dist/runtime/components/{l-form-dialog.vue.d.ts → L/FormDialog.vue.d.ts} +2 -2
  188. package/dist/runtime/components/{l-group-select.d.vue.ts → L/GroupSelect.d.vue.ts} +0 -0
  189. package/dist/runtime/components/{l-group-select.vue → L/GroupSelect.vue} +0 -0
  190. package/dist/runtime/components/{l-group-select.vue.d.ts → L/GroupSelect.vue.d.ts} +0 -0
  191. package/dist/runtime/components/{l-icon-picker.d.vue.ts → L/IconPicker.d.vue.ts} +0 -0
  192. package/dist/runtime/components/{l-icon-picker.vue.d.ts → L/IconPicker.vue.d.ts} +0 -0
  193. package/dist/runtime/components/{l-item.d.vue.ts → L/Item.d.vue.ts} +0 -0
  194. package/dist/runtime/components/{l-item.vue.d.ts → L/Item.vue.d.ts} +0 -0
  195. package/dist/runtime/components/{l-link.d.vue.ts → L/Link.d.vue.ts} +0 -0
  196. package/dist/runtime/components/{l-link.vue → L/Link.vue} +0 -0
  197. package/dist/runtime/components/{l-link.vue.d.ts → L/Link.vue.d.ts} +0 -0
  198. package/dist/runtime/components/{l-list.d.vue.ts → L/List.d.vue.ts} +0 -0
  199. package/dist/runtime/components/{l-list.vue.d.ts → L/List.vue.d.ts} +0 -0
  200. package/dist/runtime/components/{l-login.d.vue.ts → L/Login.d.vue.ts} +0 -0
  201. package/dist/runtime/components/{l-login.vue → L/Login.vue} +0 -0
  202. package/dist/runtime/components/{l-login.vue.d.ts → L/Login.vue.d.ts} +0 -0
  203. package/dist/runtime/components/{l-fav-menu.vue.d.ts → L/Menu.d.vue.ts} +2 -2
  204. package/dist/runtime/components/{l-menu.vue → L/Menu.vue} +0 -0
  205. package/dist/runtime/components/{l-menu.vue.d.ts → L/Menu.vue.d.ts} +2 -2
  206. package/dist/runtime/components/{l-microsoft-button.d.vue.ts → L/MicrosoftButton.d.vue.ts} +0 -0
  207. package/dist/runtime/components/{l-microsoft-button.vue → L/MicrosoftButton.vue} +0 -0
  208. package/dist/runtime/components/{l-microsoft-button.vue.d.ts → L/MicrosoftButton.vue.d.ts} +0 -0
  209. package/dist/runtime/components/{l-page.d.vue.ts → L/Page.d.vue.ts} +1 -1
  210. package/dist/runtime/components/{l-page.vue.d.ts → L/Page.vue.d.ts} +1 -1
  211. package/dist/runtime/components/{l-repeater.d.vue.ts → L/Repeater.d.vue.ts} +2 -2
  212. package/dist/runtime/components/{l-repeater.vue → L/Repeater.vue} +0 -0
  213. package/dist/runtime/components/{l-repeater.vue.d.ts → L/Repeater.vue.d.ts} +2 -2
  214. package/dist/runtime/components/{l-row.d.vue.ts → L/Row.d.vue.ts} +0 -0
  215. package/dist/runtime/components/{l-row.vue → L/Row.vue} +0 -0
  216. package/dist/runtime/components/{l-row.vue.d.ts → L/Row.vue.d.ts} +0 -0
  217. package/dist/runtime/components/{l-save-btn.d.vue.ts → L/SaveBtn.d.vue.ts} +0 -0
  218. package/dist/runtime/components/{l-save-btn.vue → L/SaveBtn.vue} +0 -0
  219. package/dist/runtime/components/{l-save-btn.vue.d.ts → L/SaveBtn.vue.d.ts} +0 -0
  220. package/dist/runtime/components/{l-setup-2fa-dialog.d.vue.ts → L/Setup2faDialog.d.vue.ts} +0 -0
  221. package/dist/runtime/components/{l-setup-2fa-dialog.vue → L/Setup2faDialog.vue} +0 -0
  222. package/dist/runtime/components/{l-setup-2fa-dialog.vue.d.ts → L/Setup2faDialog.vue.d.ts} +0 -0
  223. package/dist/runtime/components/{l-small-box.d.vue.ts → L/SmallBox.d.vue.ts} +1 -1
  224. package/dist/runtime/components/{l-small-box.vue → L/SmallBox.vue} +0 -0
  225. package/dist/runtime/components/{l-small-box.vue.d.ts → L/SmallBox.vue.d.ts} +1 -1
  226. /package/dist/runtime/components/{l-statistic.d.vue.ts → L/Statistic.d.vue.ts} +0 -0
  227. /package/dist/runtime/components/{l-statistic.vue → L/Statistic.vue} +0 -0
  228. /package/dist/runtime/components/{l-statistic.vue.d.ts → L/Statistic.vue.d.ts} +0 -0
  229. /package/dist/runtime/components/{l-view-btn.d.vue.ts → L/System/Setting/logs.d.vue.ts} +0 -0
  230. /package/dist/runtime/components/{l-view-btn.vue.d.ts → L/System/Setting/logs.vue.d.ts} +0 -0
  231. /package/dist/runtime/components/{l-tabs.d.vue.ts → L/Tabs.d.vue.ts} +0 -0
  232. /package/dist/runtime/components/{l-tabs.vue.d.ts → L/Tabs.vue.d.ts} +0 -0
  233. /package/dist/runtime/components/{l-test2.d.vue.ts → L/Test2.d.vue.ts} +0 -0
  234. /package/dist/runtime/components/{l-test2.vue → L/Test2.vue} +0 -0
  235. /package/dist/runtime/components/{l-test2.vue.d.ts → L/Test2.vue.d.ts} +0 -0
  236. /package/dist/runtime/components/{user-list.d.vue.ts → L/UserList.d.vue.ts} +0 -0
  237. /package/dist/runtime/components/{user-list.vue → L/UserList.vue} +0 -0
  238. /package/dist/runtime/components/{user-list.vue.d.ts → L/UserList.vue.d.ts} +0 -0
  239. /package/dist/runtime/components/{l-view-btn.vue → L/ViewBtn.vue} +0 -0
@@ -0,0 +1,81 @@
1
+ <script setup>
2
+ import * as XLSX from "xlsx";
3
+ import { ref, computed, useAttrs } from "vue";
4
+ import { useLightInputDefaults } from "../../composables/useLightProps";
5
+ defineOptions({ inheritAttrs: false });
6
+ const props = defineProps({
7
+ label: { type: String, required: false },
8
+ hint: { type: String, required: false },
9
+ disable: { type: Boolean, required: false }
10
+ });
11
+ const attrs = useAttrs();
12
+ const modelValue = defineModel({ type: Array, ...{ default: () => [] } });
13
+ const loading = ref(false);
14
+ const errorMsg = ref(null);
15
+ const fileInput = ref(null);
16
+ const showView = ref(false);
17
+ const hasFile = computed(() => modelValue.value.length > 0);
18
+ const base = useLightInputDefaults(props, attrs, []);
19
+ const fieldProps = computed(() => ({
20
+ ...base.value,
21
+ loading: loading.value,
22
+ error: !!errorMsg.value,
23
+ errorMessage: errorMsg.value ?? void 0
24
+ }));
25
+ const onChange = async () => {
26
+ const f = fileInput.value?.files?.[0];
27
+ if (!f) return;
28
+ loading.value = true;
29
+ errorMsg.value = null;
30
+ try {
31
+ const data = await f.arrayBuffer();
32
+ const workbook = XLSX.read(data);
33
+ const sheet = workbook.Sheets[workbook.SheetNames[0]];
34
+ modelValue.value = XLSX.utils.sheet_to_json(sheet);
35
+ } catch (e) {
36
+ errorMsg.value = e?.message ?? "Failed to parse file";
37
+ modelValue.value = [];
38
+ } finally {
39
+ loading.value = false;
40
+ }
41
+ };
42
+ const onClear = () => {
43
+ modelValue.value = [];
44
+ errorMsg.value = null;
45
+ if (fileInput.value) fileInput.value.value = "";
46
+ };
47
+ </script>
48
+
49
+ <template>
50
+ <q-field v-bind="fieldProps" :model-value="modelValue">
51
+ <template #control>
52
+ <template v-if="!hasFile">
53
+ <input type="file" accept=".xlsx,.xls" @change="onChange" ref="fileInput" />
54
+ </template>
55
+ <template v-else>
56
+ {{ modelValue.length }} records loaded
57
+ </template>
58
+ </template>
59
+
60
+ <template #prepend v-if="hasFile">
61
+ <q-icon name="sym_o_table_view" @click="showView = true" class="cursor-pointer" />
62
+ </template>
63
+
64
+ <template #append v-if="hasFile">
65
+ <q-icon name="sym_o_close" @click="onClear" class="cursor-pointer" />
66
+ </template>
67
+
68
+ <q-dialog v-model="showView" full-width>
69
+ <q-card>
70
+ <q-bar class="bg-primary text-white">
71
+ <div>{{ label ?? "Preview" }}</div>
72
+ <q-space />
73
+ <q-btn dense flat icon="sym_o_close" v-close-popup />
74
+ </q-bar>
75
+ <q-card-section>
76
+ <q-table :rows="modelValue" dense separator="cell" flat bordered />
77
+ </q-card-section>
78
+ </q-card>
79
+ </q-dialog>
80
+ </q-field>
81
+ </template>
@@ -0,0 +1,17 @@
1
+ export interface LInputXlsxProps {
2
+ label?: string;
3
+ hint?: string;
4
+ disable?: boolean;
5
+ }
6
+ type __VLS_Props = LInputXlsxProps;
7
+ type __VLS_ModelProps = {
8
+ modelValue?: any[];
9
+ };
10
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: any[]) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -1,5 +1,7 @@
1
1
  <script setup>
2
- defineProps({
2
+ import { computed } from "vue";
3
+ defineOptions({ inheritAttrs: false });
4
+ const props = defineProps({
3
5
  label: { type: String, required: false },
4
6
  name: { type: String, required: false },
5
7
  top: { type: Boolean, required: false, default: false },
@@ -24,11 +26,19 @@ defineProps({
24
26
  focused: { type: Boolean, required: false, skipCheck: true },
25
27
  onClick: { type: Function, required: false }
26
28
  });
29
+ const L_KEYS = ["label", "name", "top", "labelTop", "alignItems"];
30
+ const itemProps = computed(() => {
31
+ const result = {};
32
+ for (const [k, v] of Object.entries(props)) {
33
+ if (!L_KEYS.includes(k) && v !== void 0) result[k] = v;
34
+ }
35
+ return result;
36
+ });
27
37
  </script>
28
38
 
29
39
  <template>
30
- <q-item v-bind="$props">
31
- <q-item-section side v-if=$slots.avatar>
40
+ <q-item v-bind="itemProps">
41
+ <q-item-section side v-if="$slots.avatar">
32
42
  <slot name="avatar"></slot>
33
43
  </q-item-section>
34
44
 
@@ -40,9 +50,8 @@ defineProps({
40
50
  <slot></slot>
41
51
  </q-item-section>
42
52
 
43
- <q-item-section side v-if=$slots.end>
53
+ <q-item-section side v-if="$slots.end">
44
54
  <slot name="end"></slot>
45
55
  </q-item-section>
46
-
47
56
  </q-item>
48
57
  </template>
@@ -1,4 +1,6 @@
1
1
  <script setup>
2
+ import { computed } from "vue";
3
+ defineOptions({ inheritAttrs: false });
2
4
  const props = defineProps({
3
5
  fields: { type: Array, required: false },
4
6
  modelValue: { type: null, required: false },
@@ -9,41 +11,36 @@ const props = defineProps({
9
11
  padding: { type: Boolean, required: false, skipCheck: true },
10
12
  tag: { type: null, required: false }
11
13
  });
12
- function getTo(field) {
13
- const raw = field;
14
- if (raw.to) {
15
- if (raw.to instanceof Function) {
16
- return raw.to(props.modelValue);
17
- }
18
- if (typeof raw.to == "string") {
19
- return raw.to;
20
- }
14
+ const L_KEYS = ["fields", "modelValue"];
15
+ const listProps = computed(() => {
16
+ const result = {};
17
+ for (const [k, v] of Object.entries(props)) {
18
+ if (!L_KEYS.includes(k) && v !== void 0) result[k] = v;
21
19
  }
20
+ return result;
21
+ });
22
+ function getTo(field) {
23
+ if (!field.to) return null;
24
+ if (field.to instanceof Function) return field.to(props.modelValue);
25
+ if (typeof field.to === "string") return field.to;
22
26
  return null;
23
27
  }
24
- const getFieldValue = (field) => {
28
+ function getFieldValue(field) {
25
29
  const model = props.modelValue;
26
- if (field.field) {
27
- if (field.field instanceof Function) {
28
- return field.field(model);
29
- }
30
- }
31
- ;
30
+ if (field.field instanceof Function) return field.field(model);
32
31
  return model ? model[field.name] : null;
33
- };
32
+ }
34
33
  </script>
35
34
 
36
35
  <template>
37
- <q-list v-bind="$props">
36
+ <q-list v-bind="listProps">
38
37
  <template v-if="fields">
39
- <l-item v-for="field in fields" :label="field.label" :to="getTo(field)">
38
+ <l-item v-for="field in fields" :key="field.name ?? field.label" :label="field.label" :to="getTo(field)">
40
39
  {{ getFieldValue(field) }}
41
40
  </l-item>
42
-
43
41
  </template>
44
42
  <template v-else>
45
43
  <slot></slot>
46
44
  </template>
47
-
48
45
  </q-list>
49
46
  </template>
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
2
  import { useHead, useLight } from "#imports";
3
3
  import { useRouter, useRoute } from "vue-router";
4
- import model from "../composables/model";
5
- import getID from "../composables/getID";
4
+ import model from "../../composables/model";
5
+ import getID from "../../composables/getID";
6
6
  import { computed } from "vue";
7
7
  const router = useRouter();
8
8
  const route = useRoute();
@@ -18,11 +18,9 @@ const props = defineProps({
18
18
  gutter: { type: String, required: false, default: "sm" },
19
19
  breadcrumbs: { type: Boolean, required: false }
20
20
  });
21
- const showToolbar = computed(() => {
22
- if (props.backBtn || props.editBtn || props.deleteBtn || props.addBtn) {
23
- return true;
24
- }
25
- });
21
+ const showToolbar = computed(
22
+ () => !!(props.backBtn || props.editBtn || props.deleteBtn || props.addBtn)
23
+ );
26
24
  const title = computed(() => {
27
25
  let t = props.title || route.path.split("/")[1].replace(/([a-z])(?=[A-Z])/g, "$1 ").replace(/([A-Z]*)(?=[A-Z][a-z])/g, "$1 ");
28
26
  t = t.replace(/\s\s+/g, " ");
@@ -39,7 +37,7 @@ const onDelete = async () => {
39
37
  }
40
38
  };
41
39
  useHead({
42
- title: light.company + " - " + title.value
40
+ title: () => light.company + " - " + title.value
43
41
  });
44
42
  const localClass = computed(() => {
45
43
  return "q-gutter-" + props.gutter;
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ modelValue?: number | string | {
3
+ min?: number | null;
4
+ max?: number | null;
5
+ } | null;
6
+ placeholder?: string;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ change: (value: any) => any;
10
+ "update:modelValue": (value: any) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onChange?: ((value: any) => any) | undefined;
13
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,139 @@
1
+ <script setup>
2
+ import { ref, watch, computed } from "vue";
3
+ import { useI18n } from "vue-i18n";
4
+ const props = defineProps({
5
+ modelValue: { type: [Number, String, Object, null], required: false },
6
+ placeholder: { type: String, required: false }
7
+ });
8
+ const emit = defineEmits(["update:modelValue", "change"]);
9
+ const { t } = useI18n();
10
+ const mode = ref("equals");
11
+ const equalsValue = ref(null);
12
+ const minValue = ref(null);
13
+ const maxValue = ref(null);
14
+ watch(() => props.modelValue, (val) => {
15
+ if (val == null || val === "") {
16
+ equalsValue.value = null;
17
+ minValue.value = null;
18
+ maxValue.value = null;
19
+ } else if (typeof val === "object") {
20
+ mode.value = "range";
21
+ equalsValue.value = null;
22
+ minValue.value = val.min ?? null;
23
+ maxValue.value = val.max ?? null;
24
+ } else {
25
+ mode.value = "equals";
26
+ equalsValue.value = Number(val);
27
+ minValue.value = null;
28
+ maxValue.value = null;
29
+ }
30
+ }, { immediate: true });
31
+ const hasValue = computed(() => {
32
+ if (props.modelValue == null || props.modelValue === "") return false;
33
+ if (typeof props.modelValue === "object") {
34
+ const { min, max } = props.modelValue;
35
+ return min != null || max != null;
36
+ }
37
+ return true;
38
+ });
39
+ const displayLabel = computed(() => {
40
+ if (!hasValue.value) return t("Search");
41
+ if (typeof props.modelValue === "object") {
42
+ const { min, max } = props.modelValue;
43
+ if (min != null && max != null) return `${min} \u2013 ${max}`;
44
+ if (min != null) return `\u2265 ${min}`;
45
+ if (max != null) return `\u2264 ${max}`;
46
+ }
47
+ return `= ${props.modelValue}`;
48
+ });
49
+ const apply = () => {
50
+ let out = null;
51
+ if (mode.value === "equals") {
52
+ out = equalsValue.value;
53
+ } else {
54
+ const outRange = {};
55
+ if (minValue.value != null) outRange.min = minValue.value;
56
+ if (maxValue.value != null) outRange.max = maxValue.value;
57
+ if (Object.keys(outRange).length > 0) out = outRange;
58
+ }
59
+ emit("update:modelValue", out);
60
+ emit("change", out);
61
+ };
62
+ const clear = () => {
63
+ equalsValue.value = null;
64
+ minValue.value = null;
65
+ maxValue.value = null;
66
+ emit("update:modelValue", null);
67
+ emit("change", null);
68
+ };
69
+ </script>
70
+
71
+ <template>
72
+ <q-btn-dropdown
73
+ dense flat square no-caps
74
+ :color="hasValue ? 'primary' : 'grey-7'"
75
+ :label="displayLabel"
76
+ :icon="hasValue ? 'sym_o_filter_alt' : 'sym_o_search'"
77
+ size="sm"
78
+ content-class="l-search-number-dropdown"
79
+ >
80
+ <div class="q-pa-md" style="min-width: 280px">
81
+ <q-tabs
82
+ v-model="mode"
83
+ dense
84
+ no-caps
85
+ align="left"
86
+ active-color="primary"
87
+ indicator-color="primary"
88
+ class="text-grey"
89
+ >
90
+ <q-tab name="equals" :label="t('Equals')" />
91
+ <q-tab name="range" :label="t('Range')" />
92
+ </q-tabs>
93
+
94
+ <q-separator class="q-mb-sm" />
95
+
96
+ <q-tab-panels v-model="mode" animated>
97
+ <q-tab-panel name="equals" class="q-pa-none">
98
+ <q-input
99
+ v-model.number="equalsValue"
100
+ dense filled square
101
+ type="number"
102
+ mask="##########"
103
+ :placeholder="placeholder || t('Enter a number')"
104
+ autofocus
105
+ @keydown.enter.prevent="apply"
106
+ />
107
+ </q-tab-panel>
108
+ <q-tab-panel name="range" class="q-pa-none">
109
+ <div class="row q-gutter-sm items-center">
110
+ <q-input
111
+ v-model.number="minValue"
112
+ dense filled square
113
+ type="number"
114
+ mask="##########"
115
+ :placeholder="t('Min')"
116
+ class="col"
117
+ @keydown.enter.prevent="apply"
118
+ />
119
+ <span class="text-grey">—</span>
120
+ <q-input
121
+ v-model.number="maxValue"
122
+ dense filled square
123
+ type="number"
124
+ mask="##########"
125
+ :placeholder="t('Max')"
126
+ class="col"
127
+ @keydown.enter.prevent="apply"
128
+ />
129
+ </div>
130
+ </q-tab-panel>
131
+ </q-tab-panels>
132
+
133
+ <div class="row q-gutter-sm justify-end q-mt-md">
134
+ <q-btn flat dense :label="t('Clear')" color="negative" @click="clear" />
135
+ <q-btn flat dense :label="t('Apply')" color="primary" @click="apply" />
136
+ </div>
137
+ </div>
138
+ </q-btn-dropdown>
139
+ </template>
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ modelValue?: number | string | {
3
+ min?: number | null;
4
+ max?: number | null;
5
+ } | null;
6
+ placeholder?: string;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ change: (value: any) => any;
10
+ "update:modelValue": (value: any) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onChange?: ((value: any) => any) | undefined;
13
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,46 @@
1
+ import type { QSelectProps } from "quasar";
2
+ export interface LSelectProps extends QSelectProps {
3
+ required?: boolean;
4
+ }
5
+ type __VLS_Props = LSelectProps;
6
+ type __VLS_ModelProps = {
7
+ modelValue?: any;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare var __VLS_11: string, __VLS_12: any;
11
+ type __VLS_Slots = {} & {
12
+ [K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
15
+ validate: () => any;
16
+ focus: () => any;
17
+ reset: () => any;
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ "update:modelValue": (value: any) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
22
+ }>, {
23
+ dark: boolean | null;
24
+ rounded: boolean;
25
+ square: boolean;
26
+ dense: boolean;
27
+ outlined: boolean;
28
+ optionValue: string | ((option: string | any) => any);
29
+ filled: boolean;
30
+ stackLabel: boolean;
31
+ standout: string | boolean;
32
+ hideBottomSpace: boolean;
33
+ emitValue: boolean;
34
+ mapOptions: boolean;
35
+ inputDebounce: string | number;
36
+ optionLabel: string | ((option: string | any) => string);
37
+ optionsDark: boolean | null;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -1,6 +1,10 @@
1
1
  <script setup>
2
- import { ref, useAttrs, computed } from "vue";
2
+ import { ref, useAttrs, computed, watch } from "vue";
3
+ import useLight from "../../composables/useLight";
4
+ import { useLightInputDefaults } from "../../composables/useLightProps";
5
+ defineOptions({ inheritAttrs: false });
3
6
  const props = defineProps({
7
+ required: { type: Boolean, required: false },
4
8
  name: { type: null, required: false },
5
9
  virtualScrollHorizontal: { type: Boolean, required: false, skipCheck: true },
6
10
  virtualScrollSliceSize: { type: null, required: false },
@@ -100,6 +104,10 @@ const props = defineProps({
100
104
  onPopupShow: { type: Function, required: false },
101
105
  onPopupHide: { type: Function, required: false }
102
106
  });
107
+ const modelValue = defineModel({ type: null });
108
+ const attrs = useAttrs();
109
+ const light = useLight();
110
+ const L_KEYS = ["required", "onFilter"];
103
111
  const normalizeOption = (option) => {
104
112
  if (typeof option === "string" || typeof option === "number") {
105
113
  return { label: String(option), value: String(option) };
@@ -115,21 +123,17 @@ const normalizeOption = (option) => {
115
123
  return option;
116
124
  };
117
125
  const normalizeOptions = (options) => {
118
- if (!options) {
119
- return [];
120
- }
121
- if (Array.isArray(options)) {
122
- return options.map((option) => normalizeOption(option));
123
- }
126
+ if (!options) return [];
127
+ if (Array.isArray(options)) return options.map(normalizeOption);
124
128
  if (typeof options === "object") {
125
- return Object.keys(options).map((value) => ({
126
- label: options[value],
127
- value
128
- }));
129
+ return Object.keys(options).map((value) => ({ label: options[value], value }));
129
130
  }
130
131
  return [];
131
132
  };
132
133
  const select_options = ref(normalizeOptions(props.options || []));
134
+ watch(() => props.options, (opts) => {
135
+ select_options.value = normalizeOptions(opts || []);
136
+ });
133
137
  const filterFn = (val, update, abort) => {
134
138
  if (props.onFilter) {
135
139
  props.onFilter(val, update, abort);
@@ -150,15 +154,30 @@ const filterFn = (val, update, abort) => {
150
154
  });
151
155
  });
152
156
  };
153
- const attrs = useAttrs();
154
- const localClass = computed(() => {
155
- if (attrs.class) {
156
- return attrs.class;
157
- }
158
- return "col-12";
157
+ const base = useLightInputDefaults(props, attrs, L_KEYS);
158
+ const selectProps = computed(() => {
159
+ const result = {
160
+ ...base.value,
161
+ // label/hint already translated by composable
162
+ options: select_options.value,
163
+ onFilter: filterFn
164
+ };
165
+ if (props.required && result.label)
166
+ result.label = "* " + result.label;
167
+ return result;
168
+ });
169
+ const selectRef = ref();
170
+ defineExpose({
171
+ validate: () => selectRef.value?.validate(),
172
+ focus: () => selectRef.value?.focus(),
173
+ reset: () => selectRef.value?.reset()
159
174
  });
160
175
  </script>
161
176
 
162
177
  <template>
163
- <q-select v-bind="$light.getInputProps($props)" :options="select_options" @filter="filterFn" :class="localClass" />
178
+ <q-select ref="selectRef" v-model="modelValue" v-bind="selectProps">
179
+ <template v-for="(_, name) in $slots" #[name]="slotProps" :key="name">
180
+ <slot :name="name" v-bind="slotProps ?? {}" />
181
+ </template>
182
+ </q-select>
164
183
  </template>
@@ -0,0 +1,46 @@
1
+ import type { QSelectProps } from "quasar";
2
+ export interface LSelectProps extends QSelectProps {
3
+ required?: boolean;
4
+ }
5
+ type __VLS_Props = LSelectProps;
6
+ type __VLS_ModelProps = {
7
+ modelValue?: any;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare var __VLS_11: string, __VLS_12: any;
11
+ type __VLS_Slots = {} & {
12
+ [K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
15
+ validate: () => any;
16
+ focus: () => any;
17
+ reset: () => any;
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ "update:modelValue": (value: any) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
22
+ }>, {
23
+ dark: boolean | null;
24
+ rounded: boolean;
25
+ square: boolean;
26
+ dense: boolean;
27
+ outlined: boolean;
28
+ optionValue: string | ((option: string | any) => any);
29
+ filled: boolean;
30
+ stackLabel: boolean;
31
+ standout: string | boolean;
32
+ hideBottomSpace: boolean;
33
+ emitValue: boolean;
34
+ mapOptions: boolean;
35
+ inputDebounce: string | number;
36
+ optionLabel: string | ((option: string | any) => string);
37
+ optionsDark: boolean | null;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,75 @@
1
+ <script setup>
2
+ import { ref } from "vue";
3
+ import { q, m } from "#imports";
4
+ import { useQuasar } from "quasar";
5
+ const $q = useQuasar();
6
+ const [{ eventLogCleanup }, { userLogCleanup }] = await Promise.all([
7
+ q({ eventLogCleanup: { enabled: true, days: true } }),
8
+ q({ userLogCleanup: { enabled: true, days: true } })
9
+ ]);
10
+ const eventLog = ref({ enabled: eventLogCleanup.enabled, days: eventLogCleanup.days || 30 });
11
+ const userLog = ref({ enabled: userLogCleanup.enabled, days: userLogCleanup.days || 30 });
12
+ const retentionOptions = [
13
+ { label: "7 days", value: 7 },
14
+ { label: "14 days", value: 14 },
15
+ { label: "30 days", value: 30 },
16
+ { label: "60 days", value: 60 },
17
+ { label: "90 days", value: 90 },
18
+ { label: "180 days", value: 180 },
19
+ { label: "1 year", value: 365 }
20
+ ];
21
+ const onSave = async (type) => {
22
+ try {
23
+ if (type === "eventLog") {
24
+ await m("setEventLogCleanup", { enabled: eventLog.value.enabled, days: eventLog.value.days });
25
+ } else {
26
+ await m("setUserLogCleanup", { enabled: userLog.value.enabled, days: userLog.value.days });
27
+ }
28
+ $q.notify({ type: "positive", message: "Log cleanup settings saved" });
29
+ } catch (e) {
30
+ $q.dialog({ title: "Error", message: e.message });
31
+ }
32
+ };
33
+ </script>
34
+
35
+ <template>
36
+ <q-tab-panel name="logs" class="q-pa-lg">
37
+
38
+ <!-- Event Log -->
39
+ <div class="text-h6 q-mb-md">{{ $t("Event Log") }}</div>
40
+ <q-card flat bordered class="q-pa-md q-mb-lg" style="max-width: 480px">
41
+ <q-card-section>
42
+ <q-toggle v-model="eventLog.enabled" :label="$t('Enable nightly auto-cleanup')" color="primary" />
43
+ <div class="text-caption text-grey q-mt-xs q-ml-lg">
44
+ {{ $t("A MySQL Event Scheduler runs daily at midnight to remove old logs.") }}
45
+ </div>
46
+ </q-card-section>
47
+ <q-card-section>
48
+ <q-select v-model="eventLog.days" :options="retentionOptions" emit-value map-options
49
+ :label="$t('Keep logs for')" outlined dense :disable="!eventLog.enabled" />
50
+ </q-card-section>
51
+ <q-card-actions align="right">
52
+ <q-btn color="primary" :label="$t('Save')" unelevated @click="onSave('eventLog')" />
53
+ </q-card-actions>
54
+ </q-card>
55
+
56
+ <!-- User Log -->
57
+ <div class="text-h6 q-mb-md">{{ $t("User Log") }}</div>
58
+ <q-card flat bordered class="q-pa-md" style="max-width: 480px">
59
+ <q-card-section>
60
+ <q-toggle v-model="userLog.enabled" :label="$t('Enable nightly auto-cleanup')" color="primary" />
61
+ <div class="text-caption text-grey q-mt-xs q-ml-lg">
62
+ {{ $t("A MySQL Event Scheduler runs daily at midnight to remove old logs.") }}
63
+ </div>
64
+ </q-card-section>
65
+ <q-card-section>
66
+ <q-select v-model="userLog.days" :options="retentionOptions" emit-value map-options
67
+ :label="$t('Keep logs for')" outlined dense :disable="!userLog.enabled" />
68
+ </q-card-section>
69
+ <q-card-actions align="right">
70
+ <q-btn color="primary" :label="$t('Save')" unelevated @click="onSave('userLog')" />
71
+ </q-card-actions>
72
+ </q-card>
73
+
74
+ </q-tab-panel>
75
+ </template>