@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
@@ -1,8 +1,8 @@
1
1
  import type { QTabPanelProps, QTabProps } from 'quasar';
2
2
  type __VLS_Props = QTabPanelProps & QTabProps;
3
- declare var __VLS_7: {};
3
+ declare var __VLS_8: {};
4
4
  type __VLS_Slots = {} & {
5
- default?: (props: typeof __VLS_7) => any;
5
+ default?: (props: typeof __VLS_8) => any;
6
6
  };
7
7
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
8
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -0,0 +1,38 @@
1
+ <script setup>
2
+ import { QTabs, QTabPanels } from "quasar";
3
+ import { getCurrentInstance, computed } from "vue";
4
+ import { useLightLabel } from "../../composables/useLightProps";
5
+ defineOptions({ inheritAttrs: false });
6
+ const props = defineProps({
7
+ name: { type: [Number, String], required: false },
8
+ disable: { type: Boolean, required: false },
9
+ icon: { type: null, required: false },
10
+ label: { type: null, required: false },
11
+ alert: { type: [Boolean, String], required: false, skipCheck: true },
12
+ alertIcon: { type: null, required: false },
13
+ noCaps: { type: Boolean, required: false, skipCheck: true },
14
+ contentClass: { type: null, required: false },
15
+ ripple: { type: Boolean, required: false, skipCheck: true },
16
+ tabindex: { type: null, required: false }
17
+ });
18
+ const parentType = getCurrentInstance()?.parent?.type;
19
+ const isTab = parentType === QTabs;
20
+ const isPanel = parentType === QTabPanels;
21
+ const translatedLabel = useLightLabel(props);
22
+ const tabProps = computed(() => {
23
+ const { scrollTarget, ...rest } = props;
24
+ return { ...rest, label: translatedLabel.value };
25
+ });
26
+ const panelProps = computed(() => ({
27
+ name: props.name,
28
+ disable: props.disable,
29
+ scrollTarget: props.scrollTarget
30
+ }));
31
+ </script>
32
+
33
+ <template>
34
+ <q-tab-panel v-if="isPanel" v-bind="panelProps">
35
+ <slot></slot>
36
+ </q-tab-panel>
37
+ <q-tab v-else-if="isTab" v-bind="tabProps" />
38
+ </template>
@@ -1,8 +1,8 @@
1
1
  import type { QTabPanelProps, QTabProps } from 'quasar';
2
2
  type __VLS_Props = QTabPanelProps & QTabProps;
3
- declare var __VLS_7: {};
3
+ declare var __VLS_8: {};
4
4
  type __VLS_Slots = {} & {
5
- default?: (props: typeof __VLS_7) => any;
5
+ default?: (props: typeof __VLS_8) => any;
6
6
  };
7
7
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
8
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,10 +1,18 @@
1
1
  import type { Component } from "vue";
2
2
  import { Dialog } from 'quasar';
3
3
  import type { QTableColumn, QTableProps } from 'quasar';
4
+ export interface SearchOptionsContext {
5
+ filters: Record<string, any>;
6
+ columnValue: any;
7
+ column: LTableColumn;
8
+ }
9
+ export type SearchOptionsResolver = (ctx: SearchOptionsContext) => Promise<Record<string, any>[]>;
4
10
  export type LTableColumn = QTableColumn & {
5
11
  searchType?: "date" | "text" | "number" | "select" | "boolean";
6
12
  searchable?: boolean;
7
- searchOptions?: Record<string, any>[] | Function;
13
+ searchPlaceholder?: string;
14
+ searchOptions?: Record<string, any>[] | SearchOptionsResolver;
15
+ searchDependsOn?: string[];
8
16
  searchMultiple?: boolean;
9
17
  searchIndex?: string;
10
18
  component?: Component;
@@ -15,7 +23,7 @@ export type LTableColumn = QTableColumn & {
15
23
  * @deprecated use gql instead
16
24
  */
17
25
  gqlField?: string | Array<string> | Object;
18
- searchMethod?: "equals" | "contains";
26
+ searchMethod?: "equals" | "contains" | "range";
19
27
  autoWidth?: boolean;
20
28
  };
21
29
  export type LTableProps = QTableProps & {
@@ -71,17 +79,17 @@ export interface LTableRequest {
71
79
  }) => void;
72
80
  }
73
81
  declare function requestServerInteraction(): void;
74
- declare var __VLS_114: any, __VLS_117: string, __VLS_118: any, __VLS_149: any, __VLS_152: any, __VLS_315: string, __VLS_316: any;
82
+ declare var __VLS_135: any, __VLS_138: string, __VLS_139: any, __VLS_170: any, __VLS_173: any, __VLS_343: string, __VLS_344: any;
75
83
  type __VLS_Slots = {} & {
76
- [K in NonNullable<typeof __VLS_117>]?: (props: typeof __VLS_118) => any;
84
+ [K in NonNullable<typeof __VLS_138>]?: (props: typeof __VLS_139) => any;
77
85
  } & {
78
- [K in NonNullable<typeof __VLS_315>]?: (props: typeof __VLS_316) => any;
86
+ [K in NonNullable<typeof __VLS_343>]?: (props: typeof __VLS_344) => any;
79
87
  } & {
80
- actions?: (props: typeof __VLS_114) => any;
88
+ actions?: (props: typeof __VLS_135) => any;
81
89
  } & {
82
- 'row-expand'?: (props: typeof __VLS_149) => any;
90
+ 'row-expand'?: (props: typeof __VLS_170) => any;
83
91
  } & {
84
- 'top-right'?: (props: typeof __VLS_152) => any;
92
+ 'top-right'?: (props: typeof __VLS_173) => any;
85
93
  };
86
94
  declare const __VLS_base: import("vue").DefineComponent<LTableProps, {
87
95
  requestServerInteraction: typeof requestServerInteraction;
@@ -1,9 +1,10 @@
1
1
  <script setup>
2
2
  import { useQuasar, QTable, Dialog } from "quasar";
3
3
  import { defu } from "defu";
4
- import { ref, computed, onMounted, useSlots, watch, reactive } from "vue";
5
- import useLight from "../composables/useLight";
6
- import model from "../composables/model";
4
+ import { ref, computed, onMounted, useSlots, watch, useAttrs } from "vue";
5
+ import useLight from "../../composables/useLight";
6
+ import { useLightTableDefaults } from "../../composables/useLightProps";
7
+ import model from "../../composables/model";
7
8
  import { toQuery } from "@hostlink/light";
8
9
  import { list, navigateTo } from "#imports";
9
10
  import { useI18n } from "vue-i18n";
@@ -134,40 +135,29 @@ const filters = useSessionStorage(storageKey.value, {});
134
135
  if (!saveFilters.value) {
135
136
  filters.value = {};
136
137
  }
138
+ defineOptions({ inheritAttrs: false });
137
139
  const light = useLight();
140
+ const vAttrs = useAttrs();
141
+ const L_KEYS = ["actions", "sortBy", "modelName", "searchable", "onRequestData", "addComponent", "addComponentProps", "name", "searchStyle", "canExpandRow"];
142
+ const base = useLightTableDefaults(props, vAttrs, L_KEYS);
138
143
  const pagination = ref(props.pagination);
139
144
  if (props.rowsPerPageOptions[0] == 0) {
140
145
  pagination.value.rowsPerPage = 0;
141
146
  }
142
- props.columns?.forEach((col) => {
143
- if (!col.align) {
144
- col.align = "left";
145
- }
146
- if (!col.field && col.name) {
147
- col.field = col.name;
148
- }
149
- col.label = t(col.label);
150
- });
151
- if (props.columns) {
152
- for (let i = 0; i < props.columns.length; i++) {
153
- if (props.columns[i]?.searchOptions) {
154
- let opts = props.columns[i]?.searchOptions;
155
- if (typeof opts == "function") {
156
- props.columns[i].searchOptions = await opts();
157
- }
158
- }
159
- }
160
- }
147
+ const localColumns = computed(
148
+ () => props.columns?.map((col) => ({
149
+ ...col,
150
+ align: col.align ?? "left",
151
+ field: col.field ?? col.name,
152
+ label: t(col.label),
153
+ searchPlaceholder: col.searchPlaceholder ? t(col.searchPlaceholder) : void 0
154
+ }))
155
+ );
161
156
  const emits = defineEmits(["request-data", "update:selected", "delete"]);
162
157
  const loading = ref(false);
163
- let activeEdit = false;
164
- let actionView = false;
165
- let actionDelete = false;
166
- if (props.actions.length > 0) {
167
- actionView = props.actions.includes("view");
168
- activeEdit = props.actions.includes("edit") || props.actions.includes("update");
169
- actionDelete = props.actions.includes("delete");
170
- }
158
+ const actionView = computed(() => props.actions.includes("view"));
159
+ const activeEdit = computed(() => props.actions.includes("edit") || props.actions.includes("update"));
160
+ const actionDelete = computed(() => props.actions.includes("delete"));
171
161
  if (props.sortBy) {
172
162
  let [sortBy, descending] = props.sortBy.split(":");
173
163
  pagination.value.sortBy = sortBy;
@@ -179,14 +169,49 @@ const hasSearch = computed(() => {
179
169
  });
180
170
  });
181
171
  const table = ref();
182
- const rows = ref(props.rows);
183
- if (rows.value == void 0) {
184
- rows.value = [];
185
- }
186
- onMounted(() => {
187
- table.value && table.value.requestServerInteraction();
172
+ const rows = ref(props.rows ?? []);
173
+ const resolvedSearchOptions = ref({});
174
+ const localSearchOptions = ref({});
175
+ let resolveSeq = 0;
176
+ const resolveColumnOptions = async (col) => {
177
+ if (!col.searchOptions || !col.name) return;
178
+ if (Array.isArray(col.searchOptions)) {
179
+ resolvedSearchOptions.value[col.name] = col.searchOptions;
180
+ localSearchOptions.value[col.name] = col.searchOptions;
181
+ return;
182
+ }
183
+ const ctx = {
184
+ filters: { ...filters.value },
185
+ columnValue: filters.value[col.name],
186
+ column: col
187
+ };
188
+ const seq = ++resolveSeq;
189
+ try {
190
+ const result = await col.searchOptions(ctx);
191
+ if (seq !== resolveSeq) return;
192
+ resolvedSearchOptions.value[col.name] = result;
193
+ localSearchOptions.value[col.name] = result;
194
+ } catch {
195
+ }
196
+ };
197
+ onMounted(async () => {
198
+ await Promise.all(
199
+ (props.columns ?? []).map((col) => resolveColumnOptions(col))
200
+ );
201
+ table.value?.requestServerInteraction();
188
202
  });
189
- let primaryKey = ref(props.rowKey);
203
+ watch(filters, (newFilters, oldFilters) => {
204
+ if (!props.columns) return;
205
+ for (const col of props.columns) {
206
+ if (!col.searchDependsOn?.length) continue;
207
+ if (typeof col.searchOptions !== "function") continue;
208
+ if (!col.name) continue;
209
+ const deps = col.searchDependsOn;
210
+ const changed = deps.some((dep) => newFilters?.[dep] !== oldFilters?.[dep]);
211
+ if (changed) resolveColumnOptions(col);
212
+ }
213
+ }, { deep: true });
214
+ const primaryKey = ref(props.rowKey);
190
215
  const modelName = ref(props.modelName);
191
216
  const validateData = () => {
192
217
  if (primaryKey.value == null) return;
@@ -234,13 +259,13 @@ const onLocalRequest = async (p) => {
234
259
  }
235
260
  localFields = defu(localFields, { [col.name]: true });
236
261
  });
237
- if (actionView) {
262
+ if (actionView.value) {
238
263
  localFields = defu(localFields, { canView: true });
239
264
  }
240
- if (actionDelete) {
265
+ if (actionDelete.value) {
241
266
  localFields = defu(localFields, { canDelete: true });
242
267
  }
243
- if (activeEdit) {
268
+ if (activeEdit.value) {
244
269
  localFields = defu(localFields, { canUpdate: true });
245
270
  }
246
271
  const callback = {
@@ -316,7 +341,7 @@ const onLocalRequest = async (p) => {
316
341
  }
317
342
  this.setData(await l.fetchWithMeta());
318
343
  } catch (e) {
319
- quasar.dialog({
344
+ $q.dialog({
320
345
  message: e,
321
346
  color: "negative"
322
347
  });
@@ -341,6 +366,18 @@ const getFilterValue = () => {
341
366
  const k = col.searchIndex ?? col.name;
342
367
  if (col.searchType == "boolean") {
343
368
  f[k] = filters.value[col.name];
369
+ } else if (col.searchMethod == "range" && typeof filters.value[col.name] === "object") {
370
+ const rangeValue = filters.value[col.name];
371
+ const rangeFilter = {};
372
+ if (rangeValue.min !== null && rangeValue.min !== "" && rangeValue.min !== void 0) {
373
+ rangeFilter._gte = Number(rangeValue.min);
374
+ }
375
+ if (rangeValue.max !== null && rangeValue.max !== "" && rangeValue.max !== void 0) {
376
+ rangeFilter._lte = Number(rangeValue.max);
377
+ }
378
+ if (Object.keys(rangeFilter).length > 0) {
379
+ f[k] = rangeFilter;
380
+ }
344
381
  } else if (col.searchType == "number") {
345
382
  f[k] = filters.value[col.name];
346
383
  } else if (col.searchType == "date") {
@@ -378,16 +415,13 @@ const onFilters = () => {
378
415
  });
379
416
  };
380
417
  const slots = useSlots();
381
- const ss = Object.entries(slots).map(([key, value]) => {
382
- return key;
383
- });
384
- const quasar = useQuasar();
418
+ const ss = computed(() => Object.keys(slots));
385
419
  const onDelete = async (id) => {
386
420
  if (modelName.value == null) return;
387
421
  try {
388
422
  await model(modelName.value).delete(id);
389
423
  } catch (e) {
390
- quasar.notify({
424
+ $q.notify({
391
425
  message: e.message,
392
426
  color: "negative"
393
427
  });
@@ -399,12 +433,9 @@ const onDelete = async (id) => {
399
433
  emits("delete", id);
400
434
  };
401
435
  const attrs = computed(() => {
402
- const a = { ...light.styles.table, ...Object.fromEntries(Object.entries(props).filter(([key, value]) => value !== void 0)) };
403
- if (props.name) {
404
- a.visibleColumns = visibleColumns.value;
405
- }
406
436
  return {
407
- ...a,
437
+ ...base.value,
438
+ ...props.name ? { visibleColumns: visibleColumns.value } : {},
408
439
  loadingLabel: t(props.loadingLabel),
409
440
  noDataLabel: t(props.noDataLabel),
410
441
  rowsPerPageOptions: props.rowsPerPageOptions,
@@ -414,20 +445,14 @@ const attrs = computed(() => {
414
445
  };
415
446
  });
416
447
  const filter = ref("");
417
- const toColumns = props.columns?.filter((col) => {
418
- return col.to;
419
- }).map((col) => {
420
- col.slot_name = "body-cell-" + col.name;
421
- return col;
422
- });
423
448
  const isDark = computed(() => {
424
449
  return light.theme == "dark";
425
450
  });
426
451
  const hasRowExpand = computed(() => {
427
- return ss.indexOf("row-expand") >= 0;
452
+ return ss.value.indexOf("row-expand") >= 0;
428
453
  });
429
454
  const hasActions = computed(() => {
430
- return props.actions.length > 0 || ss.indexOf("actions") >= 0;
455
+ return props.actions.length > 0 || ss.value.indexOf("actions") >= 0;
431
456
  });
432
457
  const localSelected = computed({
433
458
  get() {
@@ -440,9 +465,6 @@ const localSelected = computed({
440
465
  watch(() => props.rows, (val) => {
441
466
  rows.value = val;
442
467
  });
443
- const computedColumns = computed(() => {
444
- return props.columns;
445
- });
446
468
  function requestServerInteraction() {
447
469
  table.value && table.value.requestServerInteraction();
448
470
  }
@@ -458,26 +480,40 @@ const onAdd = () => {
458
480
  requestServerInteraction();
459
481
  });
460
482
  };
461
- const localSearchOptions = ref({});
462
483
  const searchSelectFilter = (val, update, name) => {
463
- if (val == "") {
484
+ const allOptions = resolvedSearchOptions.value[name] ?? [];
485
+ if (val === "") {
464
486
  update(() => {
465
- const column = props.columns?.find((col) => col.name == name);
466
- localSearchOptions.value[name] = column?.searchOptions;
487
+ localSearchOptions.value[name] = allOptions;
467
488
  });
468
489
  } else {
469
490
  update(() => {
470
491
  const needle = val.toLocaleLowerCase();
471
- const column = props.columns?.find((col) => col.name == name);
472
- const options = column?.searchOptions;
473
- if (Array.isArray(options)) {
474
- localSearchOptions.value[name] = options.filter((v) => v.label.toLocaleLowerCase().indexOf(needle) > -1);
475
- } else {
476
- localSearchOptions.value[name] = options;
477
- }
492
+ localSearchOptions.value[name] = Array.isArray(allOptions) ? allOptions.filter((v) => v.label.toLocaleLowerCase().indexOf(needle) > -1) : allOptions;
478
493
  });
479
494
  }
480
495
  };
496
+ const localFilterMethod = (rows2, terms) => {
497
+ if (!terms || Object.keys(terms).length === 0) return rows2;
498
+ return rows2.filter((row) => {
499
+ for (const [key, value] of Object.entries(terms)) {
500
+ if (value === null || value === void 0 || value === "") continue;
501
+ const cell = row[key];
502
+ if (typeof value === "object" && value !== null && "contains" in value) {
503
+ if (!String(cell ?? "").toLowerCase().includes(String(value.contains).toLowerCase())) return false;
504
+ } else if (typeof value === "object" && value !== null && "_between" in value) {
505
+ if (cell < value._between[0] || cell > value._between[1]) return false;
506
+ } else if (typeof value === "object" && value !== null && ("_gte" in value || "_lte" in value)) {
507
+ if ("_gte" in value && value._gte !== null && value._gte !== void 0 && cell < value._gte) return false;
508
+ if ("_lte" in value && value._lte !== null && value._lte !== void 0 && cell > value._lte) return false;
509
+ } else {
510
+ if (cell !== value) return false;
511
+ }
512
+ }
513
+ return true;
514
+ });
515
+ };
516
+ const clientFilterTerms = computed(() => isServerSide ? null : getFilterValue());
481
517
  const showTopRight = computed(() => {
482
518
  return props.name && hasFilters.value || props.searchable || props.name && (props.columns && props.columns.length > 0);
483
519
  });
@@ -517,8 +553,11 @@ const hasFilters = computed(() => {
517
553
  </script>
518
554
 
519
555
  <template>
520
- <q-table v-bind="attrs" :loading="loading" :rows="rows" ref="table" @request="onLocalRequest" :columns="columns"
521
- v-model:pagination="pagination" :filter="filter" v-model:selected="localSelected">
556
+ <q-table v-bind="attrs" :loading="loading" :rows="rows" ref="table" @request="onLocalRequest" :columns="localColumns"
557
+ v-model:pagination="pagination"
558
+ :filter="isServerSide ? filter : clientFilterTerms"
559
+ :filter-method="isServerSide ? void 0 : localFilterMethod"
560
+ v-model:selected="localSelected">
522
561
  <template #header="props">
523
562
  <q-tr :props="props">
524
563
  <q-th v-if="selection != 'none'" auto-width>
@@ -556,13 +595,22 @@ const hasFilters = computed(() => {
556
595
  <div :class="{ 'text-grey-8': !isDark }" v-if="primaryKey">
557
596
 
558
597
  <l-action-btn v-if="actionView && props.row.canView"
559
- :to="`/${modelName}/${props.row[primaryKey]}/view`" icon="sym_o_search" />
598
+ :to="`/${modelName}/${props.row[primaryKey]}/view`"
599
+ :icon="light.styles.table.actionIcons.view">
600
+ <q-tooltip>{{ $t("View") }}</q-tooltip>
601
+ </l-action-btn>
560
602
 
561
603
  <l-action-btn v-if="activeEdit && props.row.canUpdate"
562
- :to="`/${modelName}/${props.row[primaryKey]}/edit`" icon="sym_o_edit" />
604
+ :to="`/${modelName}/${props.row[primaryKey]}/edit`"
605
+ :icon="light.styles.table.actionIcons.edit">
606
+ <q-tooltip>{{ $t("Edit") }}</q-tooltip>
607
+ </l-action-btn>
563
608
 
564
609
  <l-delete-btn v-if="actionDelete && props.row.canDelete"
565
- @submit="onDelete(props.row[primaryKey])" size="sm"></l-delete-btn>
610
+ :icon="light.styles.table.actionIcons.delete"
611
+ @submit="onDelete(props.row[primaryKey])" size="sm">
612
+ <q-tooltip>{{ $t("Delete") }}</q-tooltip>
613
+ </l-delete-btn>
566
614
 
567
615
  <slot name="actions" v-bind="props"></slot>
568
616
  </div>
@@ -571,10 +619,10 @@ const hasFilters = computed(() => {
571
619
 
572
620
  <template v-for="col in props.cols">
573
621
  <template v-if="ss.indexOf('body-cell-' + col.name) >= 0">
574
- <slot :name="'body-cell-' + col.name" v-bind="props"></slot>
622
+ <slot :name="'body-cell-' + col.name" v-bind="{ ...props, col, value: props.row[col.field] }"></slot>
575
623
  </template>
576
624
  <template v-else>
577
- <q-td :key="col.name" :props="props" :auto-width="col.autoWidth ?? false"><template
625
+ <q-td :key="col.name" :props="props" :auto-width="col.autoWidth ?? false" :style="col.style"><template
578
626
  v-if="col.to" class="bg-primary">
579
627
  <l-link :to="col.to(props.row)" v-if="col.to(props.row)">{{ col.value }}</l-link>
580
628
  </template>
@@ -646,7 +694,7 @@ const hasFilters = computed(() => {
646
694
  </q-td>
647
695
  </template -->
648
696
 
649
- <template #top-row="props" v-if="hasSearch && isServerSide">
697
+ <template #top-row="props" v-if="hasSearch">
650
698
  <q-tr>
651
699
  <q-td v-if="selection != 'none'" auto-width />
652
700
  <q-td v-if="hasRowExpand" auto-width />
@@ -655,7 +703,14 @@ const hasFilters = computed(() => {
655
703
 
656
704
  <template v-if="col.searchable">
657
705
 
658
- <template v-if="col.searchType == 'number'">
706
+ <template v-if="col.searchMethod == 'range' && (!col.searchType || col.searchType == 'number')">
707
+ <l-search-number
708
+ v-model="filters[col.name]"
709
+ @change="onFilters"
710
+ />
711
+ </template>
712
+
713
+ <template v-else-if="col.searchType == 'number'">
659
714
  <q-input style="min-width: 80px;" dense clearable filled square
660
715
  v-model.number="tempFilters[col.name]"
661
716
  @keydown.enter.prevent="filters[col.name] = tempFilters[col.name]"
@@ -684,9 +739,9 @@ const hasFilters = computed(() => {
684
739
 
685
740
  </template>
686
741
 
687
- <template v-if="!col.searchType || col.searchType == 'text'">
742
+ <template v-if="(!col.searchType || col.searchType == 'text') && col.searchMethod != 'range'">
688
743
  <q-input style="min-width: 80px;" dense clearable filled square
689
- v-model="tempFilters[col.name]" @keydown.enter.prevent="filters[col.name] = tempFilters[col.name]" @clear="delete filters[col.name]" :enterkeyhint="$t('search')" :style="col.searchStyle"></q-input>
744
+ v-model="tempFilters[col.name]" @keydown.enter.prevent="filters[col.name] = tempFilters[col.name]" @clear="delete filters[col.name]" :enterkeyhint="$t('search')" :placeholder="col.searchPlaceholder" :style="col.searchStyle"></q-input>
690
745
 
691
746
  </template>
692
747
 
@@ -1,10 +1,18 @@
1
1
  import type { Component } from "vue";
2
2
  import { Dialog } from 'quasar';
3
3
  import type { QTableColumn, QTableProps } from 'quasar';
4
+ export interface SearchOptionsContext {
5
+ filters: Record<string, any>;
6
+ columnValue: any;
7
+ column: LTableColumn;
8
+ }
9
+ export type SearchOptionsResolver = (ctx: SearchOptionsContext) => Promise<Record<string, any>[]>;
4
10
  export type LTableColumn = QTableColumn & {
5
11
  searchType?: "date" | "text" | "number" | "select" | "boolean";
6
12
  searchable?: boolean;
7
- searchOptions?: Record<string, any>[] | Function;
13
+ searchPlaceholder?: string;
14
+ searchOptions?: Record<string, any>[] | SearchOptionsResolver;
15
+ searchDependsOn?: string[];
8
16
  searchMultiple?: boolean;
9
17
  searchIndex?: string;
10
18
  component?: Component;
@@ -15,7 +23,7 @@ export type LTableColumn = QTableColumn & {
15
23
  * @deprecated use gql instead
16
24
  */
17
25
  gqlField?: string | Array<string> | Object;
18
- searchMethod?: "equals" | "contains";
26
+ searchMethod?: "equals" | "contains" | "range";
19
27
  autoWidth?: boolean;
20
28
  };
21
29
  export type LTableProps = QTableProps & {
@@ -71,17 +79,17 @@ export interface LTableRequest {
71
79
  }) => void;
72
80
  }
73
81
  declare function requestServerInteraction(): void;
74
- declare var __VLS_114: any, __VLS_117: string, __VLS_118: any, __VLS_149: any, __VLS_152: any, __VLS_315: string, __VLS_316: any;
82
+ declare var __VLS_135: any, __VLS_138: string, __VLS_139: any, __VLS_170: any, __VLS_173: any, __VLS_343: string, __VLS_344: any;
75
83
  type __VLS_Slots = {} & {
76
- [K in NonNullable<typeof __VLS_117>]?: (props: typeof __VLS_118) => any;
84
+ [K in NonNullable<typeof __VLS_138>]?: (props: typeof __VLS_139) => any;
77
85
  } & {
78
- [K in NonNullable<typeof __VLS_315>]?: (props: typeof __VLS_316) => any;
86
+ [K in NonNullable<typeof __VLS_343>]?: (props: typeof __VLS_344) => any;
79
87
  } & {
80
- actions?: (props: typeof __VLS_114) => any;
88
+ actions?: (props: typeof __VLS_135) => any;
81
89
  } & {
82
- 'row-expand'?: (props: typeof __VLS_149) => any;
90
+ 'row-expand'?: (props: typeof __VLS_170) => any;
83
91
  } & {
84
- 'top-right'?: (props: typeof __VLS_152) => any;
92
+ 'top-right'?: (props: typeof __VLS_173) => any;
85
93
  };
86
94
  declare const __VLS_base: import("vue").DefineComponent<LTableProps, {
87
95
  requestServerInteraction: typeof requestServerInteraction;
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
- import { useSlots, useRouter, useRoute, watch, onMounted } from "#imports";
2
+ import { useLight } from "#imports";
3
+ import { useSlots, useRouter, useRoute, watch, computed } from "#imports";
3
4
  const props = defineProps({
4
5
  name: { type: String, required: false, default: "tab" },
5
6
  route: { type: Boolean, required: false },
@@ -25,6 +26,7 @@ const props = defineProps({
25
26
  dense: { type: Boolean, required: false, skipCheck: true },
26
27
  "onUpdate:modelValue": { type: Function, required: false }
27
28
  });
29
+ const light = useLight();
28
30
  const slots = useSlots();
29
31
  const router = useRouter();
30
32
  const route = useRoute();
@@ -38,12 +40,7 @@ if (modelValue.value === void 0) {
38
40
  }
39
41
  watch(modelValue, (newValue) => {
40
42
  if (props.route && props.name && newValue) {
41
- router.push({
42
- query: {
43
- ...route.query,
44
- [props.name]: newValue
45
- }
46
- });
43
+ router.push({ query: { ...route.query, [props.name]: newValue } });
47
44
  }
48
45
  }, { immediate: false });
49
46
  watch(() => props.name ? route.query[props.name] : null, (newTab) => {
@@ -51,11 +48,21 @@ watch(() => props.name ? route.query[props.name] : null, (newTab) => {
51
48
  modelValue.value = newTab;
52
49
  }
53
50
  });
51
+ const L_KEYS = ["route", "name"];
52
+ const tabsProps = computed(() => {
53
+ const result = {};
54
+ for (const [k, v] of Object.entries(props)) {
55
+ if (!L_KEYS.includes(k) && v !== void 0) result[k] = v;
56
+ }
57
+ return result;
58
+ });
54
59
  </script>
55
60
 
56
61
  <template>
57
62
  <l-card>
58
- <q-tabs v-bind="$props" class="text-grey" active-color="primary" indicator-color="primary"
63
+ <q-tabs v-bind="tabsProps" class="text-grey"
64
+ :active-color="light.color"
65
+ :indicator-color="light.color"
59
66
  v-model="modelValue">
60
67
  <slot></slot>
61
68
  </q-tabs>
@@ -6,9 +6,11 @@ export interface LTimePickerProps {
6
6
  nowBtn?: boolean;
7
7
  withSeconds?: boolean;
8
8
  format24h?: boolean;
9
- mask?: string;
10
9
  hideBottomSpace?: boolean;
11
10
  color?: string;
11
+ disable?: boolean;
12
+ readonly?: boolean;
13
+ dark?: boolean;
12
14
  }
13
15
  type __VLS_Props = LTimePickerProps;
14
16
  type __VLS_ModelProps = {
@@ -24,7 +26,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
24
26
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
27
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
26
28
  }>, {
27
- mask: string;
28
29
  format24h: boolean;
29
30
  required: boolean;
30
31
  hideBottomSpace: boolean;