@chelone/vue 0.7.0 → 0.10.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 (229) hide show
  1. package/dist/admin/admin.vue_vue_type_script_setup_true_lang.js +5 -4
  2. package/dist/admin/auth-gate.js +1 -3
  3. package/dist/admin/resource-view.d.ts +8 -0
  4. package/dist/admin/resource-view.js +19 -0
  5. package/dist/auth/permissions-hooks.js +1 -3
  6. package/dist/choices/choices-context.d.ts +1 -2
  7. package/dist/choices/use-choices.d.ts +3 -3
  8. package/dist/choices/use-choices.js +13 -10
  9. package/dist/choices/use-reference-input.js +4 -4
  10. package/dist/components/admin/auth/auth-error.vue_vue_type_script_setup_true_lang.js +4 -3
  11. package/dist/components/admin/auth/auth-layout.vue_vue_type_script_setup_true_lang.js +1 -1
  12. package/dist/components/admin/auth/can-access.vue.d.ts +2 -2
  13. package/dist/components/admin/auth/login-form.vue_vue_type_script_setup_true_lang.js +3 -2
  14. package/dist/components/admin/auth/login-with-email.vue_vue_type_script_setup_true_lang.js +1 -0
  15. package/dist/components/admin/buttons/bulk-update-button.vue.d.ts +19 -6
  16. package/dist/components/admin/buttons/bulk-update-button.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/dist/components/admin/buttons/clone-button.vue.d.ts +19 -16
  18. package/dist/components/admin/buttons/clone-button.vue_vue_type_script_setup_true_lang.js +4 -5
  19. package/dist/components/admin/buttons/delete-button.vue.d.ts +19 -10
  20. package/dist/components/admin/buttons/delete-button.vue_vue_type_script_setup_true_lang.js +6 -7
  21. package/dist/components/admin/buttons/dual-approval-button.vue_vue_type_script_setup_true_lang.js +14 -2
  22. package/dist/components/admin/buttons/edit-button.vue.d.ts +19 -16
  23. package/dist/components/admin/buttons/edit-button.vue_vue_type_script_setup_true_lang.js +4 -5
  24. package/dist/components/admin/buttons/export-button.vue_vue_type_script_setup_true_lang.js +2 -2
  25. package/dist/components/admin/buttons/fields-selector.vue_vue_type_script_setup_true_lang.js +1 -2
  26. package/dist/components/admin/buttons/filter-button.vue_vue_type_script_setup_true_lang.js +1 -1
  27. package/dist/components/admin/buttons/record-button-props.d.ts +12 -0
  28. package/dist/components/admin/buttons/show-button.vue.d.ts +19 -16
  29. package/dist/components/admin/buttons/show-button.vue_vue_type_script_setup_true_lang.js +4 -5
  30. package/dist/components/admin/buttons/status-transition-button.vue_vue_type_script_setup_true_lang.js +3 -7
  31. package/dist/components/admin/buttons/update-button.vue.d.ts +28 -24
  32. package/dist/components/admin/buttons/update-button.vue_vue_type_script_setup_true_lang.js +3 -4
  33. package/dist/components/admin/common/application-updated-notification.vue_vue_type_script_setup_true_lang.js +1 -1
  34. package/dist/components/admin/common/i18n-key-editor.vue_vue_type_script_setup_true_lang.js +1 -2
  35. package/dist/components/admin/csv-import/csv-import.vue_vue_type_script_setup_true_lang.js +2 -5
  36. package/dist/components/admin/feedback/error.vue_vue_type_script_setup_true_lang.js +1 -1
  37. package/dist/components/admin/feedback/linear-progress.vue_vue_type_script_setup_true_lang.js +1 -0
  38. package/dist/components/admin/feedback/loading.vue_vue_type_script_setup_true_lang.js +7 -6
  39. package/dist/components/admin/feedback/placeholder.vue_vue_type_script_setup_true_lang.js +4 -1
  40. package/dist/components/admin/fields/api-key-field.vue.d.ts +3 -3
  41. package/dist/components/admin/fields/api-key-field.vue_vue_type_script_setup_true_lang.js +6 -7
  42. package/dist/components/admin/fields/array-field.vue.d.ts +3 -3
  43. package/dist/components/admin/fields/badge-field.vue.d.ts +3 -3
  44. package/dist/components/admin/fields/boolean-field.vue.d.ts +3 -3
  45. package/dist/components/admin/fields/chip-field.vue.d.ts +3 -3
  46. package/dist/components/admin/fields/color-field.vue.d.ts +3 -3
  47. package/dist/components/admin/fields/cron-field.vue.d.ts +3 -3
  48. package/dist/components/admin/fields/currency-field.vue.d.ts +3 -3
  49. package/dist/components/admin/fields/date-field.vue.d.ts +3 -3
  50. package/dist/components/admin/fields/diff-viewer.vue.d.ts +3 -3
  51. package/dist/components/admin/fields/duration-field.vue.d.ts +3 -3
  52. package/dist/components/admin/fields/email-field.vue.d.ts +3 -3
  53. package/dist/components/admin/fields/field-props.d.ts +2 -2
  54. package/dist/components/admin/fields/file-field.vue.d.ts +3 -3
  55. package/dist/components/admin/fields/function-field.vue.d.ts +3 -3
  56. package/dist/components/admin/fields/image-field.vue.d.ts +3 -3
  57. package/dist/components/admin/fields/json-field.vue.d.ts +3 -3
  58. package/dist/components/admin/fields/number-field.vue.d.ts +3 -3
  59. package/dist/components/admin/fields/phone-field.vue.d.ts +3 -3
  60. package/dist/components/admin/fields/phone-field.vue_vue_type_script_setup_true_lang.js +3 -1
  61. package/dist/components/admin/fields/rating-field.vue.d.ts +3 -3
  62. package/dist/components/admin/fields/rating-field.vue_vue_type_script_setup_true_lang.js +5 -5
  63. package/dist/components/admin/fields/record-field.vue.d.ts +3 -3
  64. package/dist/components/admin/fields/reference-array-field.vue.d.ts +20 -10
  65. package/dist/components/admin/fields/reference-field.vue.d.ts +22 -35
  66. package/dist/components/admin/fields/reference-many-count.vue.d.ts +20 -5
  67. package/dist/components/admin/fields/reference-many-field.vue.d.ts +20 -12
  68. package/dist/components/admin/fields/reference-one-field.vue.d.ts +22 -12
  69. package/dist/components/admin/fields/select-field.vue.d.ts +3 -3
  70. package/dist/components/admin/fields/subscription-plan-field.vue.d.ts +3 -3
  71. package/dist/components/admin/fields/text-array-field.vue.d.ts +3 -3
  72. package/dist/components/admin/fields/text-field.vue.d.ts +3 -3
  73. package/dist/components/admin/fields/url-field.vue.d.ts +3 -3
  74. package/dist/components/admin/fields/usage-meter-field.vue.d.ts +3 -3
  75. package/dist/components/admin/fields/usage-meter-field.vue_vue_type_script_setup_true_lang.js +6 -6
  76. package/dist/components/admin/fields/webhook-endpoint-field.vue.d.ts +3 -3
  77. package/dist/components/admin/fields/webhook-endpoint-field.vue_vue_type_script_setup_true_lang.js +1 -1
  78. package/dist/components/admin/fields/wrapper-field.vue.d.ts +21 -11
  79. package/dist/components/admin/inputs/api-key-input.vue.d.ts +20 -5
  80. package/dist/components/admin/inputs/api-key-input.vue_vue_type_script_setup_true_lang.js +3 -4
  81. package/dist/components/admin/inputs/array-input-row.vue_vue_type_script_setup_true_lang.js +1 -1
  82. package/dist/components/admin/inputs/checkbox-group-input.vue_vue_type_script_setup_true_lang.js +1 -1
  83. package/dist/components/admin/inputs/date-input-format.d.ts +4 -1
  84. package/dist/components/admin/inputs/date-input-format.js +10 -1
  85. package/dist/components/admin/inputs/date-input.vue_vue_type_script_setup_true_lang.js +3 -2
  86. package/dist/components/admin/inputs/date-time-input.vue_vue_type_script_setup_true_lang.js +3 -2
  87. package/dist/components/admin/inputs/duration-input.vue_vue_type_script_setup_true_lang.js +1 -1
  88. package/dist/components/admin/inputs/image-input-thumbnail.vue_vue_type_script_setup_true_lang.js +6 -5
  89. package/dist/components/admin/inputs/image-input.vue.d.ts +1 -0
  90. package/dist/components/admin/inputs/image-input.vue_vue_type_script_setup_true_lang.js +4 -1
  91. package/dist/components/admin/inputs/in-place-editor-form.vue.d.ts +3 -3
  92. package/dist/components/admin/inputs/in-place-editor-form.vue_vue_type_script_setup_true_lang.js +1 -1
  93. package/dist/components/admin/inputs/in-place-editor.vue.d.ts +3 -3
  94. package/dist/components/admin/inputs/number-input.vue.d.ts +6 -0
  95. package/dist/components/admin/inputs/number-input.vue_vue_type_script_setup_true_lang.js +9 -0
  96. package/dist/components/admin/inputs/password-input.vue_vue_type_script_setup_true_lang.js +34 -30
  97. package/dist/components/admin/inputs/phone-input.vue_vue_type_script_setup_true_lang.js +1 -1
  98. package/dist/components/admin/inputs/radio-button-group-input.vue_vue_type_script_setup_true_lang.js +1 -1
  99. package/dist/components/admin/inputs/rating-input.vue_vue_type_script_setup_true_lang.js +24 -12
  100. package/dist/components/admin/inputs/reference-input.vue.d.ts +1 -1
  101. package/dist/components/admin/inputs/reference-input.vue_vue_type_script_setup_true_lang.js +2 -1
  102. package/dist/components/admin/inputs/resettable-text-input.vue.d.ts +6 -4
  103. package/dist/components/admin/inputs/resettable-text-input.vue_vue_type_script_setup_true_lang.js +44 -39
  104. package/dist/components/admin/inputs/subscription-plan-picker.vue_vue_type_script_setup_true_lang.js +2 -2
  105. package/dist/components/admin/inputs/text-input.vue.d.ts +13 -2
  106. package/dist/components/admin/inputs/text-input.vue_vue_type_script_setup_true_lang.js +9 -4
  107. package/dist/components/admin/inputs/time-input.vue_vue_type_script_setup_true_lang.js +3 -2
  108. package/dist/components/admin/inputs/use-choice-input.d.ts +2 -2
  109. package/dist/components/admin/layout/app-sidebar.vue.d.ts +12 -1
  110. package/dist/components/admin/layout/app-sidebar.vue_vue_type_script_setup_true_lang.js +15 -11
  111. package/dist/components/admin/layout/command-menu-content.vue_vue_type_script_setup_true_lang.js +1 -1
  112. package/dist/components/admin/layout/command-menu.vue.d.ts +1 -1
  113. package/dist/components/admin/layout/command-menu.vue_vue_type_script_setup_true_lang.js +9 -63
  114. package/dist/components/admin/layout/data-provider-devtools-entry.vue.d.ts +1 -1
  115. package/dist/components/admin/layout/data-provider-devtools-entry.vue_vue_type_script_setup_true_lang.js +3 -3
  116. package/dist/components/admin/layout/data-provider-devtools.vue_vue_type_script_setup_true_lang.js +62 -28
  117. package/dist/components/admin/layout/icons.d.ts +2 -0
  118. package/dist/components/admin/layout/icons.js +3 -1
  119. package/dist/components/admin/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
  120. package/dist/components/admin/layout/menu-item-link.vue.d.ts +5 -0
  121. package/dist/components/admin/layout/menu-item-link.vue_vue_type_script_setup_true_lang.js +27 -8
  122. package/dist/components/admin/layout/onboarding-tour-overlay.vue_vue_type_script_setup_true_lang.js +1 -2
  123. package/dist/components/admin/layout/resource-menu-item-group.vue.d.ts +8 -1
  124. package/dist/components/admin/layout/resource-menu-item-group.vue_vue_type_script_setup_true_lang.js +8 -7
  125. package/dist/components/admin/layout/theme-provider.vue_vue_type_script_setup_true_lang.js +2 -1
  126. package/dist/components/admin/layout/title-portal-id.d.ts +1 -1
  127. package/dist/components/admin/layout/title-portal-id.js +1 -9
  128. package/dist/components/admin/layout/top-toolbar.vue_vue_type_script_setup_true_lang.js +4 -1
  129. package/dist/components/admin/list/approval-queue-row.vue.d.ts +2 -2
  130. package/dist/components/admin/list/approval-queue-row.vue_vue_type_script_setup_true_lang.js +2 -2
  131. package/dist/components/admin/list/approval-queue.vue.d.ts +3 -3
  132. package/dist/components/admin/list/calendar-agenda-view.vue.d.ts +23 -15
  133. package/dist/components/admin/list/calendar-event.vue.d.ts +21 -8
  134. package/dist/components/admin/list/calendar-list.vue.d.ts +29 -56
  135. package/dist/components/admin/list/calendar-list.vue_vue_type_script_setup_true_lang.js +12 -8
  136. package/dist/components/admin/list/calendar-month-view.vue.d.ts +26 -20
  137. package/dist/components/admin/list/calendar-month-view.vue_vue_type_script_setup_true_lang.js +2 -6
  138. package/dist/components/admin/list/calendar-week-view.vue.d.ts +24 -17
  139. package/dist/components/admin/list/data-table-col.vue_vue_type_script_setup_true_lang.js +8 -5
  140. package/dist/components/admin/list/data-table-context.d.ts +9 -6
  141. package/dist/components/admin/list/data-table-context.js +9 -1
  142. package/dist/components/admin/list/data-table-row.vue.d.ts +19 -15
  143. package/dist/components/admin/list/data-table-row.vue_vue_type_script_setup_true_lang.js +5 -9
  144. package/dist/components/admin/list/data-table.vue.d.ts +35 -23
  145. package/dist/components/admin/list/data-table.vue_vue_type_script_setup_true_lang.js +4 -7
  146. package/dist/components/admin/list/list-pagination.vue_vue_type_script_setup_true_lang.js +2 -2
  147. package/dist/components/admin/list/pivot-grid.vue.d.ts +3 -3
  148. package/dist/components/admin/list/record-timeline.vue.d.ts +3 -3
  149. package/dist/components/admin/list/record-timeline.vue_vue_type_script_setup_true_lang.js +1 -1
  150. package/dist/components/admin/list/simple-list-item.vue.d.ts +21 -19
  151. package/dist/components/admin/list/simple-list-item.vue_vue_type_script_setup_true_lang.js +3 -7
  152. package/dist/components/admin/list/simple-list.vue.d.ts +28 -20
  153. package/dist/components/admin/list/single-field-list-record.vue.d.ts +19 -9
  154. package/dist/components/admin/list/single-field-list.vue.d.ts +21 -11
  155. package/dist/components/admin/list/tree-list-context.d.ts +11 -6
  156. package/dist/components/admin/list/tree-list-node.vue.d.ts +19 -4
  157. package/dist/components/admin/list/tree-list.vue.d.ts +28 -37
  158. package/dist/components/admin/realtime/comments-thread.vue_vue_type_script_setup_true_lang.js +56 -44
  159. package/dist/components/admin/realtime/menu-live.vue.d.ts +3 -1
  160. package/dist/components/admin/realtime/menu-live.vue_vue_type_script_setup_true_lang.js +42 -12
  161. package/dist/components/admin/supabase/forgot-password-form.vue_vue_type_script_setup_true_lang.js +4 -3
  162. package/dist/components/admin/supabase/set-password-form.vue_vue_type_script_setup_true_lang.js +4 -3
  163. package/dist/components/admin/supabase/use-password-recovery.js +11 -1
  164. package/dist/components/admin/view/create.vue_vue_type_script_setup_true_lang.js +1 -1
  165. package/dist/components/admin/view/edit.vue_vue_type_script_setup_true_lang.js +1 -1
  166. package/dist/components/admin/view/show.vue_vue_type_script_setup_true_lang.js +1 -1
  167. package/dist/components/admin/widgets/job-monitor-row.vue.d.ts +24 -11
  168. package/dist/components/admin/widgets/job-monitor.vue.d.ts +3 -3
  169. package/dist/components/admin/widgets/job-monitor.vue_vue_type_script_setup_true_lang.js +2 -2
  170. package/dist/components/block-editor/block-doc-field.vue.d.ts +3 -3
  171. package/dist/components/block-editor/block-drag-handle.vue_vue_type_script_setup_true_lang.js +3 -4
  172. package/dist/components/block-editor/image-block-config.vue_vue_type_script_setup_true_lang.js +2 -3
  173. package/dist/components/charts/bar-chart.vue.d.ts +6 -2
  174. package/dist/components/charts/bar-chart.vue_vue_type_script_setup_true_lang.js +6 -4
  175. package/dist/components/charts/series-chart.d.ts +1 -1
  176. package/dist/components/charts/series-chart.js +9 -3
  177. package/dist/components/index.js +2 -2
  178. package/dist/components/inspector/configurable.vue.d.ts +0 -21
  179. package/dist/components/inspector/configurable.vue_vue_type_script_setup_true_lang.js +2 -2
  180. package/dist/components/inspector/inspector.vue_vue_type_script_setup_true_lang.js +6 -8
  181. package/dist/components/kanban/kanban-board.vue.d.ts +3 -3
  182. package/dist/components/kanban/kanban-board.vue_vue_type_script_setup_true_lang.js +7 -2
  183. package/dist/components/maps/bbox-field.vue_vue_type_script_setup_true_lang.js +4 -4
  184. package/dist/components/maps/geo-json-field.vue_vue_type_script_setup_true_lang.js +4 -4
  185. package/dist/components/maps/geo-json-layers.vue_vue_type_script_setup_true_lang.js +3 -3
  186. package/dist/components/maps/geo-json-view.vue_vue_type_script_setup_true_lang.js +3 -2
  187. package/dist/components/maps/lat-lng-field.vue_vue_type_script_setup_true_lang.js +4 -3
  188. package/dist/components/maps/lat-lng-input.vue_vue_type_script_setup_true_lang.js +5 -7
  189. package/dist/components/maps/map-canvas.vue_vue_type_script_setup_true_lang.js +3 -3
  190. package/dist/components/maps/use-map.js +1 -3
  191. package/dist/components/maps-draw/shape-input.vue_vue_type_script_setup_true_lang.js +5 -5
  192. package/dist/components/maps-draw/simplify-input.vue_vue_type_script_setup_true_lang.js +2 -2
  193. package/dist/components/maps-osm/geocoding-input.vue_vue_type_script_setup_true_lang.js +2 -1
  194. package/dist/components/maps-osm/map-with-search.vue_vue_type_script_setup_true_lang.js +2 -2
  195. package/dist/components/mdx-editor/mdx-editor-theme.css +47 -0
  196. package/dist/components/mdx-editor/mdx-field.vue.d.ts +21 -11
  197. package/dist/components/mdx-editor/mdx-input.vue_vue_type_script_setup_true_lang.js +4 -1
  198. package/dist/components/monaco/internal/use-json-schema.js +1 -2
  199. package/dist/components/monaco/internal/use-monaco-markers.d.ts +0 -6
  200. package/dist/components/monaco/internal/use-monaco-markers.js +4 -2
  201. package/dist/components/monaco/monaco-json-field-lazy.vue.d.ts +2 -2
  202. package/dist/components/monaco/monaco-json-field-lazy.vue_vue_type_script_setup_true_lang.js +3 -2
  203. package/dist/components/monaco/monaco-json-field.vue.d.ts +3 -3
  204. package/dist/components/monaco/monaco-json-input-lazy.vue_vue_type_script_setup_true_lang.js +4 -4
  205. package/dist/components/rich-text-input/rich-text-field.vue.d.ts +3 -3
  206. package/dist/components/ui/avatar.js +1 -1
  207. package/dist/components/ui/badge.js +4 -4
  208. package/dist/components/ui/button-variants.js +1 -1
  209. package/dist/components/ui/chart/chart-container.vue_vue_type_script_setup_true_lang.js +1 -1
  210. package/dist/components/ui/checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
  211. package/dist/components/ui/command/command-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
  212. package/dist/components/ui/sidebar/sidebar-menu-button.vue_vue_type_script_setup_true_lang.js +1 -1
  213. package/dist/components/ui/sidebar/sidebar-parts.js +2 -2
  214. package/dist/components/ui/sidebar/sidebar.vue_vue_type_script_setup_true_lang.js +2 -2
  215. package/dist/controllers/use-controller-for-id.d.ts +2 -2
  216. package/dist/controllers/use-prev-next-controller.d.ts +2 -2
  217. package/dist/controllers/use-reference-many-field-controller.d.ts +4 -4
  218. package/dist/controllers/use-reference-one-field-controller.d.ts +4 -4
  219. package/dist/create-resource-components.d.ts +225 -117
  220. package/dist/data/undoable.js +2 -2
  221. package/dist/form/use-form.d.ts +5 -3
  222. package/dist/form/use-form.js +1 -1
  223. package/dist/form/use-input.d.ts +0 -2
  224. package/dist/form/use-input.js +1 -2
  225. package/dist/index.js +2 -2
  226. package/dist/resource-context.d.ts +5 -1
  227. package/dist/resource-context.js +4 -0
  228. package/dist/router/use-get-path-for-record.d.ts +3 -3
  229. package/package.json +5 -5
@@ -1,5 +1,6 @@
1
1
  import { useTranslate } from "../../../i18n/use-translate.js";
2
2
  import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, toDisplayString, unref } from "vue";
3
+ import { DEVTOOLS_MAX_VALUE_LENGTH } from "@chelone/core";
3
4
  // src/components/admin/layout/data-provider-devtools-entry.vue?vue&type=script&setup=true&lang.ts
4
5
  var _hoisted_1 = ["data-status"];
5
6
  var _hoisted_2 = { class: "flex items-baseline gap-2" };
@@ -17,8 +18,6 @@ var _hoisted_10 = { class: "max-h-48 overflow-auto rounded bg-muted p-2 whitespa
17
18
  var _hoisted_11 = { key: 1 };
18
19
  var _hoisted_12 = { class: "text-muted-foreground" };
19
20
  var _hoisted_13 = { class: "max-h-48 overflow-auto rounded bg-muted p-2 whitespace-pre-wrap break-all" };
20
- var maxValueLength = 2e3;
21
- /** The value as indented JSON cut to `maxValueLength`, or `undefined` when there is none to show. */
22
21
  var data_provider_devtools_entry_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
23
22
  __name: "data-provider-devtools-entry",
24
23
  props: { entry: {} },
@@ -30,9 +29,10 @@ var data_provider_devtools_entry_vue_vue_type_script_setup_true_lang_default = /
30
29
  */
31
30
  const props = __props;
32
31
  const translate = useTranslate();
32
+ /** The value as indented JSON cut to `DEVTOOLS_MAX_VALUE_LENGTH`, or `undefined` when there is none to show. */
33
33
  function show(value) {
34
34
  try {
35
- return JSON.stringify(value, null, 2)?.slice(0, maxValueLength);
35
+ return JSON.stringify(value, null, 2)?.slice(0, DEVTOOLS_MAX_VALUE_LENGTH);
36
36
  } catch {
37
37
  return "[unserializable]";
38
38
  }
@@ -1,21 +1,28 @@
1
1
  import { useTranslate } from "../../../i18n/use-translate.js";
2
2
  import { cn } from "../../../lib/utils.js";
3
3
  import button_default from "../../ui/button.js";
4
+ import { buttonVariants } from "../../ui/button-variants.js";
4
5
  import data_provider_devtools_entry_default from "./data-provider-devtools-entry.js";
5
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, renderList, shallowRef, toDisplayString, unref, watch, withCtx } from "vue";
6
+ import { ActivityIcon } from "./icons.js";
7
+ import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, renderList, shallowRef, toDisplayString, unref, watch, withCtx } from "vue";
6
8
  import { shouldHandleHotkey } from "@chelone/core";
7
9
  // src/components/admin/layout/data-provider-devtools.vue?vue&type=script&setup=true&lang.ts
8
- var _hoisted_1 = ["aria-label", "data-open"];
9
- var _hoisted_2 = ["data-open"];
10
- var _hoisted_3 = { class: "font-semibold" };
11
- var _hoisted_4 = { class: "text-muted-foreground tabular-nums" };
12
- var _hoisted_5 = {
10
+ var _hoisted_1 = ["aria-label"];
11
+ var _hoisted_2 = {
12
+ "data-slot": "data-provider-devtools-badge",
13
+ class: "absolute top-0 right-0 min-w-4 -translate-y-1/2 translate-x-1/2 rounded-full bg-primary px-1 text-center text-[10px] leading-4 text-primary-foreground tabular-nums"
14
+ };
15
+ var _hoisted_3 = ["aria-label"];
16
+ var _hoisted_4 = { class: "flex items-center gap-2 border-b px-3 py-1.5" };
17
+ var _hoisted_5 = { class: "font-semibold" };
18
+ var _hoisted_6 = { class: "text-muted-foreground tabular-nums" };
19
+ var _hoisted_7 = {
13
20
  key: 0,
14
21
  class: "px-3 py-2 text-muted-foreground"
15
22
  };
16
- var _hoisted_6 = {
23
+ var _hoisted_8 = {
17
24
  key: 1,
18
- class: "overflow-y-auto"
25
+ class: "min-h-0 flex-1 overflow-y-auto"
19
26
  };
20
27
  var data_provider_devtools_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
21
28
  __name: "data-provider-devtools",
@@ -30,11 +37,13 @@ var data_provider_devtools_vue_vue_type_script_setup_true_lang_default = /*@__PU
30
37
  },
31
38
  setup(__props) {
32
39
  /**
33
- * `<DataProviderDevtools>` — a floating panel at the bottom right that lists
34
- * the calls a `createDataProviderLog` log has recorded: method, resource,
35
- * duration and, for a failed call, the error. The Vue twin of
40
+ * `<DataProviderDevtools>` — a round button at the bottom right carrying a
41
+ * badge with the number of calls a `createDataProviderLog` log has recorded.
42
+ * Activating it opens a panel listing those calls: method, resource, duration
43
+ * and, for a failed call, the error. The panel's Hide button, or the
44
+ * `shortcut`, closes it back to the button. The Vue twin of
36
45
  * `@chelone/react`'s `layout/data-provider-devtools.tsx`. Wrap the data
37
- * provider with `log.wrap`, then mount the panel once, in the layout.
46
+ * provider with `log.wrap`, then mount the component once, in the layout.
38
47
  */
39
48
  const props = __props;
40
49
  const translate = useTranslate();
@@ -48,6 +57,7 @@ var data_provider_devtools_vue_vue_type_script_setup_true_lang_default = /*@__PU
48
57
  }));
49
58
  }, { immediate: true });
50
59
  const entries = computed(() => [...snapshot.value.entries].reverse());
60
+ const title = () => translate("chelone.devtools.title", { _: "Data provider" });
51
61
  function onKeydown(event) {
52
62
  const target = event.target instanceof HTMLElement ? event.target : null;
53
63
  if (!shouldHandleHotkey(event, props.shortcut, target)) return;
@@ -56,24 +66,48 @@ var data_provider_devtools_vue_vue_type_script_setup_true_lang_default = /*@__PU
56
66
  }
57
67
  onMounted(() => window.addEventListener("keydown", onKeydown));
58
68
  onBeforeUnmount(() => window.removeEventListener("keydown", onKeydown));
69
+ const triggerRef = ref(null);
70
+ const panelRef = ref(null);
71
+ watch(open, (opened) => {
72
+ nextTick(() => {
73
+ const focused = document.activeElement;
74
+ if (focused !== null && focused !== document.body && focused.isConnected) return;
75
+ (opened ? panelRef : triggerRef).value?.focus();
76
+ });
77
+ });
59
78
  return (_ctx, _cache) => {
60
- return openBlock(), createElementBlock("section", {
61
- "aria-label": unref(translate)("chelone.devtools.title", { _: "Data provider" }),
79
+ return !open.value ? (openBlock(), createElementBlock("button", {
80
+ key: 0,
81
+ ref_key: "triggerRef",
82
+ ref: triggerRef,
83
+ type: "button",
84
+ "aria-expanded": false,
85
+ "aria-label": `${title()} (${snapshot.value.entries.length})`,
86
+ "data-slot": "data-provider-devtools",
87
+ "data-open": false,
88
+ class: normalizeClass(unref(cn)(unref(buttonVariants)({
89
+ variant: "outline",
90
+ size: "icon"
91
+ }), "fixed right-4 bottom-4 z-50 rounded-full shadow-lg", props.class)),
92
+ onClick: _cache[0] || (_cache[0] = ($event) => open.value = true)
93
+ }, [createVNode(unref(ActivityIcon)), createElementVNode("span", _hoisted_2, toDisplayString(snapshot.value.entries.length), 1)], 10, _hoisted_1)) : (openBlock(), createElementBlock("section", {
94
+ key: 1,
95
+ ref_key: "panelRef",
96
+ ref: panelRef,
97
+ tabindex: "-1",
98
+ "aria-label": title(),
62
99
  "data-slot": "data-provider-devtools",
63
- "data-open": open.value,
100
+ "data-open": true,
64
101
  class: normalizeClass(unref(cn)("fixed right-4 bottom-4 z-50 flex max-h-[70vh] w-96 max-w-[calc(100vw-2rem)] flex-col rounded-lg border bg-popover text-xs text-popover-foreground shadow-lg", props.class))
65
- }, [createElementVNode("header", {
66
- class: "flex items-center gap-2 border-b px-3 py-1.5 data-[open=false]:border-b-0",
67
- "data-open": open.value
68
- }, [
69
- createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("chelone.devtools.title", { _: "Data provider" })), 1),
70
- createElementVNode("span", _hoisted_4, toDisplayString(snapshot.value.entries.length), 1),
102
+ }, [createElementVNode("header", _hoisted_4, [
103
+ createElementVNode("span", _hoisted_5, toDisplayString(title()), 1),
104
+ createElementVNode("span", _hoisted_6, toDisplayString(snapshot.value.entries.length), 1),
71
105
  createVNode(button_default, {
72
106
  type: "button",
73
107
  variant: "ghost",
74
108
  size: "sm",
75
109
  class: "ml-auto h-6 px-2",
76
- onClick: _cache[0] || (_cache[0] = ($event) => props.log.clear())
110
+ onClick: _cache[1] || (_cache[1] = ($event) => props.log.clear())
77
111
  }, {
78
112
  default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("chelone.devtools.clear", { _: "Clear" })), 1)]),
79
113
  _: 1
@@ -83,18 +117,18 @@ var data_provider_devtools_vue_vue_type_script_setup_true_lang_default = /*@__PU
83
117
  variant: "ghost",
84
118
  size: "sm",
85
119
  class: "h-6 px-2",
86
- "aria-expanded": open.value,
87
- onClick: _cache[1] || (_cache[1] = ($event) => open.value = !open.value)
120
+ "aria-expanded": true,
121
+ onClick: _cache[2] || (_cache[2] = ($event) => open.value = false)
88
122
  }, {
89
- default: withCtx(() => [createTextVNode(toDisplayString(open.value ? unref(translate)("chelone.devtools.hide", { _: "Hide" }) : unref(translate)("chelone.devtools.show", { _: "Show" })), 1)]),
123
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("chelone.devtools.hide", { _: "Hide" })), 1)]),
90
124
  _: 1
91
- }, 8, ["aria-expanded"])
92
- ], 8, _hoisted_2), open.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [entries.value.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(unref(translate)("chelone.devtools.empty", { _: "No calls yet" })), 1)) : (openBlock(), createElementBlock("ul", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, (entry) => {
125
+ })
126
+ ]), entries.value.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(unref(translate)("chelone.devtools.empty", { _: "No calls yet" })), 1)) : (openBlock(), createElementBlock("ul", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, (entry) => {
93
127
  return openBlock(), createBlock(data_provider_devtools_entry_default, {
94
128
  key: entry.id,
95
129
  entry
96
130
  }, null, 8, ["entry"]);
97
- }), 128))]))], 64)) : createCommentVNode("", true)], 10, _hoisted_1);
131
+ }), 128))]))], 10, _hoisted_3));
98
132
  };
99
133
  }
100
134
  });
@@ -20,3 +20,5 @@ export declare const SendIcon: FunctionalComponent;
20
20
  export declare const SquareIcon: FunctionalComponent;
21
21
  /** The assistant close glyph (a cross). */
22
22
  export declare const XIcon: FunctionalComponent;
23
+ /** The data provider devtools trigger glyph (a pulse line). */
24
+ export declare const ActivityIcon: FunctionalComponent;
@@ -38,4 +38,6 @@ var SendIcon = glyph(["M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0
38
38
  var SquareIcon = glyph(["M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"]);
39
39
  /** The assistant close glyph (a cross). */
40
40
  var XIcon = glyph(["M18 6 6 18", "m6 6 12 12"]);
41
- export { HouseIcon, ListIcon, LogOutIcon, MessageCircleIcon, SendIcon, SquareIcon, XIcon };
41
+ /** The data provider devtools trigger glyph (a pulse line). */
42
+ var ActivityIcon = glyph(["M22 12h-4l-3 9L9 3l-3 9H2"]);
43
+ export { ActivityIcon, HouseIcon, ListIcon, LogOutIcon, MessageCircleIcon, SendIcon, SquareIcon, XIcon };
@@ -7,7 +7,7 @@ import { createBlock, createElementVNode, createVNode, defineComponent, openBloc
7
7
  // src/components/admin/layout/layout.vue?vue&type=script&setup=true&lang.ts
8
8
  var _hoisted_1 = {
9
9
  "data-slot": "layout-main",
10
- class: "ml-auto flex h-svh w-full max-w-full flex-1 flex-col"
10
+ class: "ml-auto flex h-svh w-full max-w-full min-w-0 flex-1 flex-col"
11
11
  };
12
12
  var _hoisted_2 = {
13
13
  id: "main-content",
@@ -21,6 +21,11 @@ export interface MenuItemLinkProps {
21
21
  class?: string;
22
22
  /** Click handler invoked alongside the default navigation (e.g. close the mobile drawer). */
23
23
  onClick?: () => void;
24
+ /**
25
+ * Keys that navigate to `to` from anywhere on the page, such as `"mod+1"` or
26
+ * `"alt+/"`, shown after the label. `mod` is Cmd or Ctrl.
27
+ */
28
+ keyboardShortcut?: string;
24
29
  }
25
30
  declare const _default: typeof __VLS_export;
26
31
  export default _default;
@@ -1,10 +1,12 @@
1
1
  import { useTranslate } from "../../../i18n/use-translate.js";
2
2
  import { useBasename } from "../../../router/adapter.js";
3
- import { useMatch } from "../../../router/nav-composables.js";
3
+ import { useMatch, useNavigate } from "../../../router/nav-composables.js";
4
4
  import { SidebarContextKey } from "../../ui/sidebar/sidebar-context.js";
5
5
  import sidebar_menu_button_default from "../../ui/sidebar/sidebar-menu-button.js";
6
6
  import { SidebarMenuItem } from "../../ui/sidebar/sidebar-parts.js";
7
- import { computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, inject, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
7
+ import keyboard_shortcut_default from "../common/keyboard-shortcut.js";
8
+ import { computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, inject, normalizeClass, onBeforeUnmount, onMounted, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
9
+ import { shouldHandleHotkey } from "@chelone/core";
8
10
  import { RouterLink } from "vue-router";
9
11
  // src/components/admin/layout/menu-item-link.vue?vue&type=script&setup=true&lang.ts
10
12
  var menu_item_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
@@ -14,7 +16,8 @@ var menu_item_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
14
16
  label: {},
15
17
  icon: {},
16
18
  class: {},
17
- onClick: { type: Function }
19
+ onClick: { type: Function },
20
+ keyboardShortcut: {}
18
21
  },
19
22
  setup(__props) {
20
23
  /**
@@ -27,10 +30,11 @@ var menu_item_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
27
30
  * building block for `<DashboardMenuItem>` / `<ResourceMenuItem>` and for custom
28
31
  * `<Menu>` children.
29
32
  *
30
- * Vue divergences from the React twin: the keyboard-shortcut binding and the
31
- * collapsed-rail `<Tooltip>` wrapper are NOT ported yet (those React
32
- * sub-components have no Vue twin in this wave) — a later surface-parity wave.
33
- * Navigation uses vue-router's `<RouterLink>` (the framework link), and `onClick`
33
+ * Vue divergences from the React twin: the collapsed-rail `<Tooltip>` wrapper
34
+ * is NOT ported yet (that React sub-component has no Vue twin in this wave) — a
35
+ * later surface-parity wave. `keyboardShortcut` reads core's hotkey grammar
36
+ * (`mod`, `shift`, `alt`), so `ctrl` and `cmd` are not aliases here, and
37
+ * `keyboardShortcutRepresentation` has no slot yet. Navigation uses vue-router's `<RouterLink>` (the framework link), and `onClick`
34
38
  * is a prop invoked on click rather than a synthetic-event handler.
35
39
  */
36
40
  const props = __props;
@@ -43,6 +47,16 @@ var menu_item_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
43
47
  });
44
48
  const isActive = computed(() => match.value != null);
45
49
  const text = computed(() => translate(props.label, { _: props.label }));
50
+ const navigate = useNavigate();
51
+ function onShortcut(event) {
52
+ if (!props.keyboardShortcut) return;
53
+ const target = event.target instanceof HTMLElement ? event.target : null;
54
+ if (!shouldHandleHotkey(event, props.keyboardShortcut, target)) return;
55
+ event.preventDefault();
56
+ navigate(props.to);
57
+ }
58
+ onMounted(() => window.addEventListener("keydown", onShortcut));
59
+ onBeforeUnmount(() => window.removeEventListener("keydown", onShortcut));
46
60
  function onClick() {
47
61
  props.onClick?.();
48
62
  if (sidebar?.openMobile.value) sidebar.setOpenMobile(false);
@@ -59,7 +73,12 @@ var menu_item_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
59
73
  default: withCtx(() => [
60
74
  __props.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon), { key: 0 })) : createCommentVNode("", true),
61
75
  renderSlot(_ctx.$slots, "icon"),
62
- createElementVNode("span", null, toDisplayString(text.value), 1)
76
+ createElementVNode("span", null, toDisplayString(text.value), 1),
77
+ __props.keyboardShortcut ? (openBlock(), createBlock(keyboard_shortcut_default, {
78
+ key: 1,
79
+ "keyboard-shortcut": __props.keyboardShortcut,
80
+ class: "ml-auto"
81
+ }, null, 8, ["keyboard-shortcut"])) : createCommentVNode("", true)
63
82
  ]),
64
83
  _: 3
65
84
  }, 8, [
@@ -1,7 +1,7 @@
1
1
  import { useTranslate } from "../../../i18n/use-translate.js";
2
2
  import button_default from "../../ui/button.js";
3
3
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeStyle, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderSlot, shallowRef, toDisplayString, unref, useTemplateRef, watch, withCtx } from "vue";
4
- import { placeTourCard, tourSpotlightPath } from "@chelone/core";
4
+ import { REMEASURE_MS, placeTourCard, tourSpotlightPath } from "@chelone/core";
5
5
  // src/components/admin/layout/onboarding-tour-overlay.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = { "data-slot": "onboarding-tour" };
7
7
  var _hoisted_2 = ["data-side", "aria-labelledby"];
@@ -9,7 +9,6 @@ var _hoisted_3 = { class: "text-sm text-muted-foreground" };
9
9
  var _hoisted_4 = { class: "mt-4 flex items-center gap-2" };
10
10
  var _hoisted_5 = { class: "mr-auto text-xs text-muted-foreground" };
11
11
  var nextTitleId = 0;
12
- var REMEASURE_MS = 250;
13
12
  function findTarget(selector) {
14
13
  try {
15
14
  return document.querySelector(selector);
@@ -14,4 +14,11 @@ export interface ResourceMenuItemGroupProps {
14
14
  }
15
15
  declare const _default: typeof __VLS_export;
16
16
  export default _default;
17
- declare const __VLS_export: import("vue").DefineComponent<ResourceMenuItemGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ResourceMenuItemGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ResourceMenuItemGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ResourceMenuItemGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
18
+ default?: (props: {}) => any;
19
+ }>;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -1,7 +1,7 @@
1
1
  import { useResourceRegistry } from "../../../admin/resource-registry.js";
2
2
  import { SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarMenu } from "../../ui/sidebar/sidebar-parts.js";
3
3
  import resource_menu_item_default from "./resource-menu-item.js";
4
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
4
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
5
5
  // src/components/admin/layout/resource-menu-item-group.vue?vue&type=script&setup=true&lang.ts
6
6
  var resource_menu_item_group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
7
7
  __name: "resource-menu-item-group",
@@ -23,13 +23,14 @@ var resource_menu_item_group_vue_vue_type_script_setup_true_lang_default = /*@__
23
23
  * `options.group` bag yet, so there is no auto-grouping and a labeled group
24
24
  * renders a plain `<SidebarGroupLabel>` rather than a collapsible section (the
25
25
  * React twin's `<Collapsible>` has no Vue twin in this wave). The `label`/
26
- * `resources` props still let an author build explicit sections by hand.
26
+ * `resources` props still let an author build explicit sections by hand. The
27
+ * default slot adds entries after the resources, inside the group.
27
28
  */
28
29
  const props = __props;
29
30
  const registry = useResourceRegistry();
30
31
  const names = computed(() => props.resources ?? Object.keys(registry.definitions).filter((name) => registry.definitions[name]?.list != null));
31
32
  return (_ctx, _cache) => {
32
- return names.value.length > 0 ? (openBlock(), createBlock(unref(SidebarGroup), {
33
+ return names.value.length > 0 || _ctx.$slots.default ? (openBlock(), createBlock(unref(SidebarGroup), {
33
34
  key: 0,
34
35
  class: normalizeClass(props.class)
35
36
  }, {
@@ -43,12 +44,12 @@ var resource_menu_item_group_vue_vue_type_script_setup_true_lang_default = /*@__
43
44
  key: name,
44
45
  name
45
46
  }, null, 8, ["name"]);
46
- }), 128))]),
47
- _: 1
47
+ }), 128)), renderSlot(_ctx.$slots, "default")]),
48
+ _: 3
48
49
  }, 8, ["class"])]),
49
- _: 1
50
+ _: 3
50
51
  })]),
51
- _: 1
52
+ _: 3
52
53
  }, 8, ["class"])) : createCommentVNode("", true);
53
54
  };
54
55
  }
@@ -1,11 +1,12 @@
1
1
  import { ThemeContextKey, resolveTheme } from "./theme-context.js";
2
2
  import { defineComponent, provide, ref, renderSlot, watchEffect } from "vue";
3
+ import { DEFAULT_THEME_STORAGE_KEY } from "@chelone/core";
3
4
  // src/components/admin/layout/theme-provider.vue?vue&type=script&setup=true&lang.ts
4
5
  var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
5
6
  __name: "theme-provider",
6
7
  props: {
7
8
  defaultTheme: { default: "system" },
8
- storageKey: { default: "chelone-theme" }
9
+ storageKey: { default: DEFAULT_THEME_STORAGE_KEY }
9
10
  },
10
11
  setup(__props) {
11
12
  /**
@@ -4,4 +4,4 @@
4
4
  * sibling so `title-portal.vue` stays component-only. Matches the React twin's
5
5
  * `TITLE_PORTAL_ID` so the two adapters share the same portal contract.
6
6
  */
7
- export declare const TITLE_PORTAL_ID = "chelone-title-portal";
7
+ export { TITLE_PORTAL_ID } from "@chelone/core";
@@ -1,9 +1 @@
1
- // src/components/admin/layout/title-portal-id.ts
2
- /**
3
- * The DOM id of the app-bar title portal target. `<TitlePortal>` reserves the
4
- * element with this id; a page `<Title>` teleports into it. Kept in a `.ts`
5
- * sibling so `title-portal.vue` stays component-only. Matches the React twin's
6
- * `TITLE_PORTAL_ID` so the two adapters share the same portal contract.
7
- */
8
- var TITLE_PORTAL_ID = "chelone-title-portal";
9
- export { TITLE_PORTAL_ID };
1
+ export { TITLE_PORTAL_ID } from "@chelone/core";
@@ -11,7 +11,10 @@ var top_toolbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
11
11
  */
12
12
  const props = __props;
13
13
  return (_ctx, _cache) => {
14
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("flex items-center justify-end gap-2 mb-2", props.class)) }, [renderSlot(_ctx.$slots, "default")], 2);
14
+ return openBlock(), createElementBlock("div", {
15
+ "data-slot": "top-toolbar",
16
+ class: normalizeClass(unref(cn)("flex items-center justify-end gap-2 mb-2", props.class))
17
+ }, [renderSlot(_ctx.$slots, "default")], 2);
15
18
  };
16
19
  }
17
20
  });
@@ -3,10 +3,10 @@
3
3
  * `<DualApprovalButton>` and a Reject that opens a reason form. It owns the
4
4
  * form and the rejection write, and publishes its record as the ambient one.
5
5
  */
6
- import { type LooseRecord } from "@chelone/core";
6
+ import { type LooseRecord, type ResourceRecord } from "@chelone/core";
7
7
  import { type VNode } from "vue";
8
8
  import type { ApprovalQueueProps } from "./approval-queue.vue.js";
9
- declare const __VLS_export: <TRecord extends LooseRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
9
+ declare const __VLS_export: <TRecord extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
10
  props: import("vue").PublicProps & __VLS_PrettifyLocal<Omit<ApprovalQueueProps<TRecord>, "class"> & {
11
11
  record: TRecord;
12
12
  }> & (typeof globalThis extends {
@@ -12,7 +12,7 @@ import textarea_default from "../../ui/textarea.js";
12
12
  import dual_approval_button_default from "../buttons/dual-approval-button.js";
13
13
  import { useMenuAccess } from "../layout/use-menu-access.js";
14
14
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, renderSlot, toDisplayString, toRef, unref, useId, withCtx, withModifiers } from "vue";
15
- import { buildRejectionUpdate, getAtPath } from "@chelone/core";
15
+ import { buildRejectionUpdate, getAtPath, isLooseRecord } from "@chelone/core";
16
16
  import { useIsMutating } from "@tanstack/vue-query";
17
17
  // src/components/admin/list/approval-queue-row.vue?vue&type=script&setup=true&lang.ts
18
18
  var _hoisted_1 = { class: "flex flex-wrap items-center gap-3" };
@@ -100,7 +100,7 @@ var approval_queue_row_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
100
100
  }
101
101
  async function confirm() {
102
102
  const data = rejection.value;
103
- if (!data) return;
103
+ if (!data || !isLooseRecord(props.record)) return;
104
104
  const request = update.mutateAsync({
105
105
  id: props.record.id,
106
106
  data,
@@ -16,9 +16,9 @@
16
16
  * </List>
17
17
  */
18
18
  import { type VNode } from "vue";
19
- import type { LooseRecord, MutationMode, SourceProp } from "@chelone/core";
19
+ import type { LooseRecord, ResourceRecord, MutationMode, SourceProp } from "@chelone/core";
20
20
  /** Props for {@link ApprovalQueue}. */
21
- export interface ApprovalQueueProps<TRecord extends LooseRecord = LooseRecord> {
21
+ export interface ApprovalQueueProps<TRecord extends ResourceRecord = LooseRecord> {
22
22
  /** The field shown as the row title; the record representation when it is null or undefined. */
23
23
  titleSource?: SourceProp<TRecord>;
24
24
  /** The field shown as a second line when its value is not empty. */
@@ -47,7 +47,7 @@ export interface ApprovalQueueProps<TRecord extends LooseRecord = LooseRecord> {
47
47
  }
48
48
  declare const _default: typeof __VLS_export;
49
49
  export default _default;
50
- declare const __VLS_export: <TRecord extends LooseRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
50
+ declare const __VLS_export: <TRecord extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
51
51
  props: import("vue").PublicProps & __VLS_PrettifyLocal<ApprovalQueueProps<TRecord>> & (typeof globalThis extends {
52
52
  __VLS_PROPS_FALLBACK: infer P;
53
53
  } ? P : {});
@@ -1,29 +1,37 @@
1
1
  import { type VNode } from "vue";
2
2
  import type { CalendarEventSlotProps } from "./calendar-month-view.vue.js";
3
- import type { CalendarEvent, CalendarLabels, CalendarRange, LooseRecord } from "@chelone/core";
3
+ import type { CalendarEvent, CalendarLabels, CalendarRange, LooseRecord, ResourceRecord } from "@chelone/core";
4
4
  /** Props for {@link CalendarAgendaView}. */
5
- export interface CalendarAgendaViewProps {
5
+ export interface CalendarAgendaViewProps<TRecord extends ResourceRecord = LooseRecord> {
6
6
  range: CalendarRange;
7
7
  labels: CalendarLabels;
8
8
  /** The label of the list. */
9
9
  label: string;
10
- events: CalendarEvent<LooseRecord>[];
10
+ events: CalendarEvent<TRecord>[];
11
11
  /** The link an event is, when it navigates. */
12
- hrefFor: (record: LooseRecord) => string | undefined;
12
+ hrefFor: (record: TRecord) => string | undefined;
13
13
  /** Whether activating the event does anything: it is inert otherwise. */
14
- isSelectable: (record: LooseRecord) => boolean;
14
+ isSelectable: (record: TRecord) => boolean;
15
15
  }
16
16
  declare const _default: typeof __VLS_export;
17
17
  export default _default;
18
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CalendarAgendaViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- selectEvent: (record: LooseRecord) => any;
20
- }, string, import("vue").PublicProps, Readonly<CalendarAgendaViewProps> & Readonly<{
21
- onSelectEvent?: ((record: LooseRecord) => any) | undefined;
22
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
23
- event?(props: CalendarEventSlotProps): VNode[];
24
- }>;
25
- type __VLS_WithSlots<T, S> = T & {
26
- new (): {
27
- $slots: S;
18
+ declare const __VLS_export: <TRecord extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
19
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<CalendarAgendaViewProps<TRecord> & {
20
+ onSelectEvent?: ((record: TRecord) => any) | undefined;
21
+ }> & (typeof globalThis extends {
22
+ __VLS_PROPS_FALLBACK: infer P;
23
+ } ? P : {});
24
+ expose: (exposed: {}) => void;
25
+ attrs: any;
26
+ slots: {
27
+ event?(props: CalendarEventSlotProps<TRecord>): VNode[];
28
28
  };
29
+ emit: (evt: "selectEvent", record: TRecord) => void;
30
+ }>) => import("vue").VNode & {
31
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
29
32
  };
33
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
34
+ [K in keyof T]: T[K];
35
+ } : {
36
+ [K in keyof T as K]: T[K];
37
+ }) & {};
@@ -1,7 +1,7 @@
1
- import type { CalendarEvent, LooseRecord } from "@chelone/core";
1
+ import type { CalendarEvent, LooseRecord, ResourceRecord } from "@chelone/core";
2
2
  /** Props for {@link CalendarEventButton}. */
3
- export interface CalendarEventProps {
4
- event: CalendarEvent<LooseRecord>;
3
+ export interface CalendarEventProps<TRecord extends ResourceRecord = LooseRecord> {
4
+ event: CalendarEvent<TRecord>;
5
5
  /** The link the event is, when it navigates. */
6
6
  href?: string;
7
7
  /** Whether activating the event does anything: it is inert otherwise. */
@@ -9,8 +9,21 @@ export interface CalendarEventProps {
9
9
  }
10
10
  declare const _default: typeof __VLS_export;
11
11
  export default _default;
12
- declare const __VLS_export: import("vue").DefineComponent<CalendarEventProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- select: (record: LooseRecord) => any;
14
- }, string, import("vue").PublicProps, Readonly<CalendarEventProps> & Readonly<{
15
- onSelect?: ((record: LooseRecord) => any) | undefined;
16
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: <TRecord extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
13
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<CalendarEventProps<TRecord> & {
14
+ onSelect?: ((record: TRecord) => any) | undefined;
15
+ }> & (typeof globalThis extends {
16
+ __VLS_PROPS_FALLBACK: infer P;
17
+ } ? P : {});
18
+ expose: (exposed: {}) => void;
19
+ attrs: any;
20
+ slots: {};
21
+ emit: (evt: "select", record: TRecord) => void;
22
+ }>) => import("vue").VNode & {
23
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
24
+ };
25
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
26
+ [K in keyof T]: T[K];
27
+ } : {
28
+ [K in keyof T as K]: T[K];
29
+ }) & {};