nuxt-ui-tools 1.0.1 → 1.2.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 (258) hide show
  1. package/dist/module.d.mts +3 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +37 -0
  4. package/dist/runtime/dashboard/components/block/dashboard-block-state.d.vue.ts +12 -0
  5. package/dist/runtime/dashboard/components/block/dashboard-block-state.vue +59 -0
  6. package/dist/runtime/dashboard/components/block/dashboard-block-state.vue.d.ts +12 -0
  7. package/dist/runtime/dashboard/components/block/dashboard-data-table.d.vue.ts +9 -0
  8. package/dist/runtime/dashboard/components/block/dashboard-data-table.vue +47 -0
  9. package/dist/runtime/dashboard/components/block/dashboard-data-table.vue.d.ts +9 -0
  10. package/dist/runtime/dashboard/components/block/dashboard-ring.d.vue.ts +34 -0
  11. package/dist/runtime/dashboard/components/block/dashboard-ring.vue +91 -0
  12. package/dist/runtime/dashboard/components/block/dashboard-ring.vue.d.ts +34 -0
  13. package/dist/runtime/dashboard/components/block/dashboard-row-actions.d.vue.ts +13 -0
  14. package/dist/runtime/dashboard/components/block/dashboard-row-actions.vue +49 -0
  15. package/dist/runtime/dashboard/components/block/dashboard-row-actions.vue.d.ts +13 -0
  16. package/dist/runtime/dashboard/components/block/dashboard-skeleton.d.vue.ts +34 -0
  17. package/dist/runtime/dashboard/components/block/dashboard-skeleton.vue +315 -0
  18. package/dist/runtime/dashboard/components/block/dashboard-skeleton.vue.d.ts +34 -0
  19. package/dist/runtime/dashboard/components/charts/renderer.d.ts +43 -0
  20. package/dist/runtime/dashboard/components/charts/renderer.js +34 -0
  21. package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.d.vue.ts +18 -0
  22. package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.vue +45 -0
  23. package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.vue.d.ts +18 -0
  24. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.d.vue.ts +14 -0
  25. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.vue +190 -0
  26. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.vue.d.ts +14 -0
  27. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.d.vue.ts +13 -0
  28. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.vue +72 -0
  29. package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.vue.d.ts +13 -0
  30. package/dist/runtime/dashboard/components/charts/unovis/xy-layers.d.ts +43 -0
  31. package/dist/runtime/dashboard/components/charts/unovis/xy-layers.js +60 -0
  32. package/dist/runtime/dashboard/components/dashboard-alerts.d.vue.ts +49 -0
  33. package/dist/runtime/dashboard/components/dashboard-alerts.vue +226 -0
  34. package/dist/runtime/dashboard/components/dashboard-alerts.vue.d.ts +49 -0
  35. package/dist/runtime/dashboard/components/dashboard-bar-chart.d.vue.ts +53 -0
  36. package/dist/runtime/dashboard/components/dashboard-bar-chart.vue +131 -0
  37. package/dist/runtime/dashboard/components/dashboard-bar-chart.vue.d.ts +53 -0
  38. package/dist/runtime/dashboard/components/dashboard-bars.d.vue.ts +49 -0
  39. package/dist/runtime/dashboard/components/dashboard-bars.vue +187 -0
  40. package/dist/runtime/dashboard/components/dashboard-bars.vue.d.ts +49 -0
  41. package/dist/runtime/dashboard/components/dashboard-card.d.vue.ts +47 -0
  42. package/dist/runtime/dashboard/components/dashboard-card.vue +316 -0
  43. package/dist/runtime/dashboard/components/dashboard-card.vue.d.ts +47 -0
  44. package/dist/runtime/dashboard/components/dashboard-combo-chart.d.vue.ts +52 -0
  45. package/dist/runtime/dashboard/components/dashboard-combo-chart.vue +128 -0
  46. package/dist/runtime/dashboard/components/dashboard-combo-chart.vue.d.ts +52 -0
  47. package/dist/runtime/dashboard/components/dashboard-donut-chart.d.vue.ts +48 -0
  48. package/dist/runtime/dashboard/components/dashboard-donut-chart.vue +216 -0
  49. package/dist/runtime/dashboard/components/dashboard-donut-chart.vue.d.ts +48 -0
  50. package/dist/runtime/dashboard/components/dashboard-feed.d.vue.ts +49 -0
  51. package/dist/runtime/dashboard/components/dashboard-feed.vue +239 -0
  52. package/dist/runtime/dashboard/components/dashboard-feed.vue.d.ts +49 -0
  53. package/dist/runtime/dashboard/components/dashboard-funnel.d.vue.ts +34 -0
  54. package/dist/runtime/dashboard/components/dashboard-funnel.vue +157 -0
  55. package/dist/runtime/dashboard/components/dashboard-funnel.vue.d.ts +34 -0
  56. package/dist/runtime/dashboard/components/dashboard-gauge.d.vue.ts +55 -0
  57. package/dist/runtime/dashboard/components/dashboard-gauge.vue +177 -0
  58. package/dist/runtime/dashboard/components/dashboard-gauge.vue.d.ts +55 -0
  59. package/dist/runtime/dashboard/components/dashboard-grid.d.vue.ts +38 -0
  60. package/dist/runtime/dashboard/components/dashboard-grid.vue +49 -0
  61. package/dist/runtime/dashboard/components/dashboard-grid.vue.d.ts +38 -0
  62. package/dist/runtime/dashboard/components/dashboard-legend.d.vue.ts +8 -0
  63. package/dist/runtime/dashboard/components/dashboard-legend.vue +37 -0
  64. package/dist/runtime/dashboard/components/dashboard-legend.vue.d.ts +8 -0
  65. package/dist/runtime/dashboard/components/dashboard-line-chart.d.vue.ts +46 -0
  66. package/dist/runtime/dashboard/components/dashboard-line-chart.vue +129 -0
  67. package/dist/runtime/dashboard/components/dashboard-line-chart.vue.d.ts +46 -0
  68. package/dist/runtime/dashboard/components/dashboard-list.d.vue.ts +63 -0
  69. package/dist/runtime/dashboard/components/dashboard-list.vue +239 -0
  70. package/dist/runtime/dashboard/components/dashboard-list.vue.d.ts +63 -0
  71. package/dist/runtime/dashboard/components/dashboard-paired-bars.d.vue.ts +43 -0
  72. package/dist/runtime/dashboard/components/dashboard-paired-bars.vue +194 -0
  73. package/dist/runtime/dashboard/components/dashboard-paired-bars.vue.d.ts +43 -0
  74. package/dist/runtime/dashboard/components/dashboard-refresh.d.vue.ts +29 -0
  75. package/dist/runtime/dashboard/components/dashboard-refresh.vue +86 -0
  76. package/dist/runtime/dashboard/components/dashboard-refresh.vue.d.ts +29 -0
  77. package/dist/runtime/dashboard/components/dashboard-relative-time.d.vue.ts +12 -0
  78. package/dist/runtime/dashboard/components/dashboard-relative-time.vue +23 -0
  79. package/dist/runtime/dashboard/components/dashboard-relative-time.vue.d.ts +12 -0
  80. package/dist/runtime/dashboard/components/dashboard-stack-bar.d.vue.ts +36 -0
  81. package/dist/runtime/dashboard/components/dashboard-stack-bar.vue +162 -0
  82. package/dist/runtime/dashboard/components/dashboard-stack-bar.vue.d.ts +36 -0
  83. package/dist/runtime/dashboard/components/dashboard-stat.d.vue.ts +69 -0
  84. package/dist/runtime/dashboard/components/dashboard-stat.vue +279 -0
  85. package/dist/runtime/dashboard/components/dashboard-stat.vue.d.ts +69 -0
  86. package/dist/runtime/dashboard/components/dashboard-stats.d.vue.ts +38 -0
  87. package/dist/runtime/dashboard/components/dashboard-stats.vue +202 -0
  88. package/dist/runtime/dashboard/components/dashboard-stats.vue.d.ts +38 -0
  89. package/dist/runtime/dashboard/components/dashboard-table.d.vue.ts +52 -0
  90. package/dist/runtime/dashboard/components/dashboard-table.vue +305 -0
  91. package/dist/runtime/dashboard/components/dashboard-table.vue.d.ts +52 -0
  92. package/dist/runtime/dashboard/components/dashboard-tabs.d.vue.ts +35 -0
  93. package/dist/runtime/dashboard/components/dashboard-tabs.vue +55 -0
  94. package/dist/runtime/dashboard/components/dashboard-tabs.vue.d.ts +35 -0
  95. package/dist/runtime/dashboard/components/dashboard-total.d.vue.ts +10 -0
  96. package/dist/runtime/dashboard/components/dashboard-total.vue +32 -0
  97. package/dist/runtime/dashboard/components/dashboard-total.vue.d.ts +10 -0
  98. package/dist/runtime/dashboard/components/dashboard-widget.d.vue.ts +46 -0
  99. package/dist/runtime/dashboard/components/dashboard-widget.vue +84 -0
  100. package/dist/runtime/dashboard/components/dashboard-widget.vue.d.ts +46 -0
  101. package/dist/runtime/dashboard/composables/use-dashboard-api.d.ts +15 -0
  102. package/dist/runtime/dashboard/composables/use-dashboard-api.js +91 -0
  103. package/dist/runtime/dashboard/composables/use-dashboard-block.d.ts +22 -0
  104. package/dist/runtime/dashboard/composables/use-dashboard-block.js +35 -0
  105. package/dist/runtime/dashboard/composables/use-dashboard-chart.d.ts +36 -0
  106. package/dist/runtime/dashboard/composables/use-dashboard-chart.js +118 -0
  107. package/dist/runtime/dashboard/composables/use-dashboard-derived.d.ts +12 -0
  108. package/dist/runtime/dashboard/composables/use-dashboard-derived.js +47 -0
  109. package/dist/runtime/dashboard/composables/use-dashboard-format.d.ts +6 -0
  110. package/dist/runtime/dashboard/composables/use-dashboard-format.js +12 -0
  111. package/dist/runtime/dashboard/composables/use-dashboard-options.d.ts +8 -0
  112. package/dist/runtime/dashboard/composables/use-dashboard-options.js +63 -0
  113. package/dist/runtime/dashboard/composables/use-dashboard-param-scope.d.ts +30 -0
  114. package/dist/runtime/dashboard/composables/use-dashboard-param-scope.js +71 -0
  115. package/dist/runtime/dashboard/composables/use-dashboard-remote-options.d.ts +12 -0
  116. package/dist/runtime/dashboard/composables/use-dashboard-remote-options.js +117 -0
  117. package/dist/runtime/dashboard/composables/use-dashboard-resource.d.ts +35 -0
  118. package/dist/runtime/dashboard/composables/use-dashboard-resource.js +80 -0
  119. package/dist/runtime/dashboard/composables/use-dashboard-scope.d.ts +46 -0
  120. package/dist/runtime/dashboard/composables/use-dashboard-scope.js +127 -0
  121. package/dist/runtime/dashboard/composables/use-dashboard-time.d.ts +13 -0
  122. package/dist/runtime/dashboard/composables/use-dashboard-time.js +40 -0
  123. package/dist/runtime/dashboard/composables/use-dashboard-ui.d.ts +22 -0
  124. package/dist/runtime/dashboard/composables/use-dashboard-ui.js +19 -0
  125. package/dist/runtime/dashboard/composables/use-dashboard-views.d.ts +46 -0
  126. package/dist/runtime/dashboard/composables/use-dashboard-views.js +49 -0
  127. package/dist/runtime/dashboard/composables/use-dashboard.d.ts +24 -0
  128. package/dist/runtime/dashboard/composables/use-dashboard.js +42 -0
  129. package/dist/runtime/dashboard/constants/query.d.ts +16 -0
  130. package/dist/runtime/dashboard/constants/query.js +15 -0
  131. package/dist/runtime/dashboard/index.d.ts +4 -0
  132. package/dist/runtime/dashboard/index.js +3 -0
  133. package/dist/runtime/dashboard/schema/index.d.ts +57 -0
  134. package/dist/runtime/dashboard/schema/index.js +3 -0
  135. package/dist/runtime/dashboard/types/blocks.d.ts +251 -0
  136. package/dist/runtime/dashboard/types/blocks.js +0 -0
  137. package/dist/runtime/dashboard/types/charts.d.ts +60 -0
  138. package/dist/runtime/dashboard/types/charts.js +0 -0
  139. package/dist/runtime/dashboard/types/index.d.ts +7 -0
  140. package/dist/runtime/dashboard/types/index.js +0 -0
  141. package/dist/runtime/dashboard/types/options.d.ts +46 -0
  142. package/dist/runtime/dashboard/types/options.js +0 -0
  143. package/dist/runtime/dashboard/types/params.d.ts +115 -0
  144. package/dist/runtime/dashboard/types/params.js +0 -0
  145. package/dist/runtime/dashboard/types/resource.d.ts +106 -0
  146. package/dist/runtime/dashboard/types/resource.js +0 -0
  147. package/dist/runtime/dashboard/types/runtime.d.ts +44 -0
  148. package/dist/runtime/dashboard/types/runtime.js +0 -0
  149. package/dist/runtime/dashboard/types/schema.d.ts +171 -0
  150. package/dist/runtime/dashboard/types/schema.js +0 -0
  151. package/dist/runtime/dashboard/types/ui.d.ts +201 -0
  152. package/dist/runtime/dashboard/types/ui.js +0 -0
  153. package/dist/runtime/dashboard/utils/builders/dashboard-params.d.ts +85 -0
  154. package/dist/runtime/dashboard/utils/builders/dashboard-params.js +87 -0
  155. package/dist/runtime/dashboard/utils/chart-frame.d.ts +5 -0
  156. package/dist/runtime/dashboard/utils/chart-frame.js +27 -0
  157. package/dist/runtime/dashboard/utils/charts.d.ts +61 -0
  158. package/dist/runtime/dashboard/utils/charts.js +142 -0
  159. package/dist/runtime/dashboard/utils/comparison.d.ts +15 -0
  160. package/dist/runtime/dashboard/utils/comparison.js +19 -0
  161. package/dist/runtime/dashboard/utils/export.d.ts +13 -0
  162. package/dist/runtime/dashboard/utils/export.js +45 -0
  163. package/dist/runtime/dashboard/utils/options.d.ts +5 -0
  164. package/dist/runtime/dashboard/utils/options.js +18 -0
  165. package/dist/runtime/dashboard/utils/params/codecs.d.ts +14 -0
  166. package/dist/runtime/dashboard/utils/params/codecs.js +69 -0
  167. package/dist/runtime/dashboard/utils/resource.d.ts +16 -0
  168. package/dist/runtime/dashboard/utils/resource.js +39 -0
  169. package/dist/runtime/dashboard/utils/schema.d.ts +9 -0
  170. package/dist/runtime/dashboard/utils/schema.js +31 -0
  171. package/dist/runtime/dashboard/utils/sparkline.d.ts +21 -0
  172. package/dist/runtime/dashboard/utils/sparkline.js +53 -0
  173. package/dist/runtime/dashboard/utils/state.d.ts +28 -0
  174. package/dist/runtime/dashboard/utils/state.js +32 -0
  175. package/dist/runtime/dashboard/utils/time.d.ts +17 -0
  176. package/dist/runtime/dashboard/utils/time.js +60 -0
  177. package/dist/runtime/dashboard/utils/tracker.d.ts +12 -0
  178. package/dist/runtime/dashboard/utils/tracker.js +31 -0
  179. package/dist/runtime/dashboard/utils/ui.d.ts +38 -0
  180. package/dist/runtime/dashboard/utils/ui.js +24 -0
  181. package/dist/runtime/dashboard/utils/visibility.d.ts +2 -0
  182. package/dist/runtime/dashboard/utils/visibility.js +25 -0
  183. package/dist/runtime/form/types/options.d.ts +15 -36
  184. package/dist/runtime/i18n/locales/en.js +65 -1
  185. package/dist/runtime/i18n/locales/fr.js +65 -1
  186. package/dist/runtime/i18n/types.d.ts +70 -0
  187. package/dist/runtime/shared/index.d.ts +2 -0
  188. package/dist/runtime/shared/styles/scrollbars.css +1 -1
  189. package/dist/runtime/shared/styles/tokens.css +1 -1
  190. package/dist/runtime/shared/types/query.d.ts +10 -0
  191. package/dist/runtime/shared/types/query.js +0 -0
  192. package/dist/runtime/shared/types/remote-options.d.ts +37 -0
  193. package/dist/runtime/shared/types/remote-options.js +0 -0
  194. package/dist/runtime/shared/utils/remote-options.d.ts +10 -0
  195. package/dist/runtime/shared/utils/remote-options.js +6 -0
  196. package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.d.vue.ts +2 -2
  197. package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.vue.d.ts +2 -2
  198. package/dist/runtime/spreadsheet/composables/use-spreadsheet-internals.d.ts +15 -15
  199. package/dist/runtime/spreadsheet/composables/use-spreadsheet-resolutions.d.ts +2 -2
  200. package/dist/runtime/spreadsheet/schema/normalize.d.ts +1 -1
  201. package/dist/runtime/spreadsheet/utils/references/sources.d.ts +1 -1
  202. package/dist/runtime/table/components/data-list/data-list-content.d.vue.ts +1 -1
  203. package/dist/runtime/table/components/data-list/data-list-content.vue.d.ts +1 -1
  204. package/dist/runtime/table/components/data-list/data-list-infinite-loader.d.vue.ts +1 -1
  205. package/dist/runtime/table/components/data-list/data-list-infinite-loader.vue.d.ts +1 -1
  206. package/dist/runtime/table/components/data-list/data-list-layout-switch.d.vue.ts +1 -1
  207. package/dist/runtime/table/components/data-list/data-list-layout-switch.vue.d.ts +1 -1
  208. package/dist/runtime/table/components/data-list/data-list-pagination.d.vue.ts +1 -1
  209. package/dist/runtime/table/components/data-list/data-list-pagination.vue.d.ts +1 -1
  210. package/dist/runtime/table/components/data-list/data-list-sort-menu.d.vue.ts +1 -1
  211. package/dist/runtime/table/components/data-list/data-list-sort-menu.vue.d.ts +1 -1
  212. package/dist/runtime/table/components/data-list/sort-menu-panel.d.vue.ts +2 -2
  213. package/dist/runtime/table/components/data-list/sort-menu-panel.vue.d.ts +2 -2
  214. package/dist/runtime/table/components/filters/shared/filter-match-mode-button.d.vue.ts +1 -1
  215. package/dist/runtime/table/components/filters/shared/filter-match-mode-button.vue.d.ts +1 -1
  216. package/dist/runtime/table/components/filters/shared/filter-option-list-end.d.vue.ts +11 -0
  217. package/dist/runtime/table/components/filters/shared/filter-option-list-end.vue +76 -0
  218. package/dist/runtime/table/components/filters/shared/filter-option-list-end.vue.d.ts +11 -0
  219. package/dist/runtime/table/components/filters/shared/filter-option-loading-list.d.vue.ts +3 -0
  220. package/dist/runtime/table/components/filters/shared/filter-option-loading-list.vue +2 -1
  221. package/dist/runtime/table/components/filters/shared/filter-option-loading-list.vue.d.ts +3 -0
  222. package/dist/runtime/table/components/filters/shared/filter-option-multiple-list.vue +1 -1
  223. package/dist/runtime/table/components/filters/shared/filter-option-picker-content.vue +13 -0
  224. package/dist/runtime/table/components/filters/shared/filter-option-single-list.d.vue.ts +2 -0
  225. package/dist/runtime/table/components/filters/shared/filter-option-single-list.vue +1 -1
  226. package/dist/runtime/table/components/filters/shared/filter-option-single-list.vue.d.ts +2 -0
  227. package/dist/runtime/table/components/filters/shared/filter-option-tree-content.d.vue.ts +3 -0
  228. package/dist/runtime/table/components/filters/shared/filter-option-tree-content.vue +2 -2
  229. package/dist/runtime/table/components/filters/shared/filter-option-tree-content.vue.d.ts +3 -0
  230. package/dist/runtime/table/components/filters/shared/filter-searchable-panel.vue +1 -0
  231. package/dist/runtime/table/components/layout/table-footer.d.vue.ts +1 -1
  232. package/dist/runtime/table/components/layout/table-footer.vue.d.ts +1 -1
  233. package/dist/runtime/table/components/table/table-cell-ellipsis.d.ts +1 -1
  234. package/dist/runtime/table/composables/use-option-filter-editor-state.d.ts +13 -1
  235. package/dist/runtime/table/composables/use-option-filter-editor-state.js +6 -2
  236. package/dist/runtime/table/composables/use-query-state.d.ts +3 -3
  237. package/dist/runtime/table/composables/use-table-columns.d.ts +3 -3
  238. package/dist/runtime/table/composables/use-table-filter-options.d.ts +11 -1
  239. package/dist/runtime/table/composables/use-table-filter-options.js +128 -17
  240. package/dist/runtime/table/composables/use-table-filter-selected-options.d.ts +20 -0
  241. package/dist/runtime/table/composables/use-table-filter-selected-options.js +99 -0
  242. package/dist/runtime/table/composables/use-table-filters.d.ts +5 -0
  243. package/dist/runtime/table/composables/use-table-filters.js +20 -1
  244. package/dist/runtime/table/composables/use-table-internals.d.ts +42 -27
  245. package/dist/runtime/table/composables/use-table-pagination.d.ts +2 -2
  246. package/dist/runtime/table/composables/use-table-remote-filter-options.d.ts +42 -0
  247. package/dist/runtime/table/composables/use-table-remote-filter-options.js +102 -0
  248. package/dist/runtime/table/composables/use-table-selection.d.ts +1 -1
  249. package/dist/runtime/table/composables/use-table-state.d.ts +3 -3
  250. package/dist/runtime/table/types/filters.d.ts +42 -0
  251. package/dist/runtime/table/types/source.d.ts +9 -5
  252. package/dist/runtime/table/utils/columns/menu.d.ts +1 -1
  253. package/dist/runtime/table/utils/columns/state.d.ts +1 -1
  254. package/dist/runtime/table/utils/data-list-ui.d.ts +1 -1
  255. package/dist/runtime/table/utils/filters/options.d.ts +2 -0
  256. package/dist/runtime/table/utils/filters/options.js +1 -1
  257. package/dist/runtime/table/utils/prefetch.js +21 -1
  258. package/package.json +28 -1
@@ -0,0 +1,53 @@
1
+ const WIDTH = 100;
2
+ const HEIGHT = 32;
3
+ const INSET = 2;
4
+ export function resolveDashboardSparkline(values) {
5
+ const finite = values.filter((value) => Number.isFinite(value));
6
+ if (finite.length === 0) return null;
7
+ const min = Math.min(...finite);
8
+ const max = Math.max(...finite);
9
+ const step = values.length > 1 ? WIDTH / (values.length - 1) : 0;
10
+ const y = (value) => max === min ? HEIGHT / 2 : INSET + (1 - (value - min) / (max - min)) * (HEIGHT - INSET * 2);
11
+ const runs = [];
12
+ let run = [];
13
+ values.forEach((value, index) => {
14
+ if (value === null || value === void 0 || !Number.isFinite(value)) {
15
+ if (run.length) runs.push(run);
16
+ run = [];
17
+ return;
18
+ }
19
+ run.push([values.length > 1 ? index * step : WIDTH / 2, y(value)]);
20
+ });
21
+ if (run.length) runs.push(run);
22
+ const line = runs.map(toPath).join("");
23
+ const area = runs.filter((points) => points.length > 1).map((points) => {
24
+ const first = points[0];
25
+ const last = points.at(-1);
26
+ if (!first || !last) return "";
27
+ return `${toPath(points)}L${last[0].toFixed(2)},${HEIGHT}L${first[0].toFixed(2)},${HEIGHT}Z`;
28
+ }).join("");
29
+ return { area, line };
30
+ }
31
+ export function resolveDashboardSparkBars(values) {
32
+ const finite = values.filter((value) => Number.isFinite(value));
33
+ if (finite.length === 0) return null;
34
+ const max = Math.max(0, ...finite);
35
+ const slot = WIDTH / Math.max(1, values.length);
36
+ const width = Math.max(1, slot * 0.62);
37
+ return values.flatMap((value, index) => {
38
+ if (value === null || value === void 0 || !Number.isFinite(value)) return [];
39
+ const height = max > 0 ? Math.max(1.5, Math.max(0, value) / max * (HEIGHT - INSET)) : 1.5;
40
+ return [
41
+ {
42
+ height: Number(height.toFixed(2)),
43
+ last: index === values.length - 1,
44
+ width: Number(width.toFixed(2)),
45
+ x: Number((index * slot + (slot - width) / 2).toFixed(2)),
46
+ y: Number((HEIGHT - height).toFixed(2))
47
+ }
48
+ ];
49
+ });
50
+ }
51
+ function toPath(points) {
52
+ return points.map(([x, y], index) => `${index ? "L" : "M"}${x.toFixed(2)},${y.toFixed(2)}`).join("");
53
+ }
@@ -0,0 +1,28 @@
1
+ import type { DashboardResourceState } from '../types/index.js';
2
+ /**
3
+ * Combines the states of several sources the way a dependent value experiences them: any error
4
+ * wins, then any pending source. Idle sources were not requested (gated by `requires`, or a
5
+ * deferred query nobody activated), so they do not hold the value back unless all are idle.
6
+ */
7
+ export declare function combineDashboardStates(states: readonly DashboardResourceState[]): DashboardResourceState;
8
+ /** Oldest defined timestamp of a set of sources: they are all at least this fresh. */
9
+ export declare function resolveDashboardUpdatedAt(values: readonly (number | undefined)[]): number | undefined;
10
+ /** Refreshes sources in parallel and reports every failure at once. */
11
+ export declare function refreshDashboardSources(sources: readonly {
12
+ refresh: () => Promise<void>;
13
+ }[]): Promise<void>;
14
+ /** URL segment of the current view. A root param cannot use it while the dashboard has views. */
15
+ export declare const DASHBOARD_VIEW_URL_KEY = "view";
16
+ /** URL segment of the auto-refresh interval. A root param cannot use it. */
17
+ export declare const DASHBOARD_REFRESH_URL_KEY = "refresh";
18
+ /** URL key of the auto-refresh interval: `refresh`, or `<urlPrefix>.refresh`. */
19
+ export declare function resolveDashboardRefreshKey(urlPrefix: string | undefined): string;
20
+ /** Joins the non-empty segments of a URL key with dots. */
21
+ export declare function joinDashboardUrlKey(...segments: readonly (string | undefined)[]): string;
22
+ /**
23
+ * URL key prefix of one scope, named after what it holds: none for the root (`year`), the view
24
+ * key for a view (`consumption.currency`). `urlPrefix` namespaces both when set.
25
+ */
26
+ export declare function resolveDashboardScopePrefix(urlPrefix: string | undefined, viewKey?: string): string;
27
+ /** URL key of the current view: `view`, or `<urlPrefix>.view`. */
28
+ export declare function resolveDashboardViewKey(urlPrefix: string | undefined): string;
@@ -0,0 +1,32 @@
1
+ export function combineDashboardStates(states) {
2
+ if (states.includes("error")) return "error";
3
+ if (states.includes("loading")) return "loading";
4
+ if (states.length > 0 && states.every((state) => state === "idle")) return "idle";
5
+ return "ready";
6
+ }
7
+ export function resolveDashboardUpdatedAt(values) {
8
+ let oldest;
9
+ for (const value of values) {
10
+ if (value !== void 0 && (oldest === void 0 || value < oldest)) oldest = value;
11
+ }
12
+ return oldest;
13
+ }
14
+ export async function refreshDashboardSources(sources) {
15
+ const results = await Promise.allSettled(sources.map((source) => source.refresh()));
16
+ const errors = results.flatMap((result) => result.status === "rejected" ? [result.reason] : []);
17
+ if (errors.length > 0) throw new AggregateError(errors, "Dashboard refresh failed");
18
+ }
19
+ export const DASHBOARD_VIEW_URL_KEY = "view";
20
+ export const DASHBOARD_REFRESH_URL_KEY = "refresh";
21
+ export function resolveDashboardRefreshKey(urlPrefix) {
22
+ return joinDashboardUrlKey(urlPrefix, DASHBOARD_REFRESH_URL_KEY);
23
+ }
24
+ export function joinDashboardUrlKey(...segments) {
25
+ return segments.filter(Boolean).join(".");
26
+ }
27
+ export function resolveDashboardScopePrefix(urlPrefix, viewKey) {
28
+ return joinDashboardUrlKey(urlPrefix, viewKey);
29
+ }
30
+ export function resolveDashboardViewKey(urlPrefix) {
31
+ return joinDashboardUrlKey(urlPrefix, DASHBOARD_VIEW_URL_KEY);
32
+ }
@@ -0,0 +1,17 @@
1
+ import type { DashboardTimeValue } from '../types/index.js';
2
+ /** Epoch milliseconds of a time value; `NaN` when it cannot be parsed. */
3
+ export declare function toDashboardTime(value: DashboardTimeValue): number;
4
+ /**
5
+ * Short relative time: `now`, `3 min ago`, `2 hr ago`, `yesterday`, `4 days ago`, then the date
6
+ * itself from a week on (with the year when it differs from `now`).
7
+ */
8
+ export declare function formatDashboardRelativeTime(time: number, now: number, locale: string): string;
9
+ /** Full date and time, for tooltips next to a relative time. */
10
+ export declare function formatDashboardDateTime(time: number, locale: string): string;
11
+ /**
12
+ * Day heading of a feed group: `Today`, `Yesterday`, then the date. Capitalized, since it starts a
13
+ * line.
14
+ */
15
+ export declare function formatDashboardDay(time: number, now: number, locale: string): string;
16
+ /** Local start of the day of a time, used as a stable group key. */
17
+ export declare function startOfDashboardDay(time: number): number;
@@ -0,0 +1,60 @@
1
+ import { isDate, isNumber } from "../../shared/utils/predicate.js";
2
+ const MINUTE = 6e4;
3
+ const HOUR = 60 * MINUTE;
4
+ const DAY = 24 * HOUR;
5
+ export function toDashboardTime(value) {
6
+ if (isNumber(value)) return value;
7
+ if (isDate(value)) return value.getTime();
8
+ return Date.parse(value);
9
+ }
10
+ const formatsByLocale = /* @__PURE__ */ new Map();
11
+ function resolveTimeFormats(locale) {
12
+ const cached = formatsByLocale.get(locale);
13
+ if (cached) return cached;
14
+ const formats = {
15
+ date: new Intl.DateTimeFormat(locale, { day: "numeric", month: "short" }),
16
+ dateWithYear: new Intl.DateTimeFormat(locale, {
17
+ day: "numeric",
18
+ month: "short",
19
+ year: "numeric"
20
+ }),
21
+ full: new Intl.DateTimeFormat(locale, { dateStyle: "long", timeStyle: "short" }),
22
+ relative: new Intl.RelativeTimeFormat(locale, { numeric: "auto", style: "short" })
23
+ };
24
+ formatsByLocale.set(locale, formats);
25
+ return formats;
26
+ }
27
+ export function formatDashboardRelativeTime(time, now, locale) {
28
+ if (!Number.isFinite(time)) return "";
29
+ const formats = resolveTimeFormats(locale);
30
+ const elapsed = now - time;
31
+ const distance = Math.abs(elapsed);
32
+ const sign = elapsed >= 0 ? -1 : 1;
33
+ if (distance < 45e3) return formats.relative.format(0, "second");
34
+ if (distance < 45 * MINUTE)
35
+ return formats.relative.format(sign * Math.round(distance / MINUTE), "minute");
36
+ if (distance < 22 * HOUR)
37
+ return formats.relative.format(sign * Math.round(distance / HOUR), "hour");
38
+ if (distance < 7 * DAY) return formats.relative.format(sign * dayDistance(time, now), "day");
39
+ const sameYear = new Date(time).getFullYear() === new Date(now).getFullYear();
40
+ return (sameYear ? formats.date : formats.dateWithYear).format(time);
41
+ }
42
+ export function formatDashboardDateTime(time, locale) {
43
+ return Number.isFinite(time) ? resolveTimeFormats(locale).full.format(time) : "";
44
+ }
45
+ export function formatDashboardDay(time, now, locale) {
46
+ if (!Number.isFinite(time)) return "";
47
+ const formats = resolveTimeFormats(locale);
48
+ const days = dayDistance(time, now);
49
+ const sameYear = new Date(time).getFullYear() === new Date(now).getFullYear();
50
+ const text = days < 2 ? formats.relative.format(-days, "day") : (sameYear ? formats.date : formats.dateWithYear).format(time);
51
+ return text.charAt(0).toLocaleUpperCase(locale) + text.slice(1);
52
+ }
53
+ export function startOfDashboardDay(time) {
54
+ const day = new Date(time);
55
+ day.setHours(0, 0, 0, 0);
56
+ return day.getTime();
57
+ }
58
+ function dayDistance(time, now) {
59
+ return Math.round(Math.abs(startOfDashboardDay(now) - startOfDashboardDay(time)) / DAY);
60
+ }
@@ -0,0 +1,12 @@
1
+ import type { DashboardSourceLike } from '../types/index.js';
2
+ /**
3
+ * Records which sources a derived value reads while it evaluates. One tracker is shared by the
4
+ * whole dashboard; evaluation is synchronous, so a single "current collector" slot is enough.
5
+ */
6
+ export declare function createDashboardReadTracker(): {
7
+ record(source: DashboardSourceLike): void;
8
+ run<TResult>(reads: Set<DashboardSourceLike>, evaluate: () => TResult): TResult;
9
+ };
10
+ export type DashboardReadTracker = ReturnType<typeof createDashboardReadTracker>;
11
+ /** The `data` object handed to `derive`: each property reads a source's data and records the read. */
12
+ export declare function createDashboardTrackedData(sources: ReadonlyMap<string, DashboardSourceLike>, tracker: DashboardReadTracker): object;
@@ -0,0 +1,31 @@
1
+ import { markRaw } from "vue";
2
+ export function createDashboardReadTracker() {
3
+ let current = null;
4
+ return {
5
+ record(source) {
6
+ current?.add(source);
7
+ },
8
+ run(reads, evaluate) {
9
+ const previous = current;
10
+ current = reads;
11
+ try {
12
+ return evaluate();
13
+ } finally {
14
+ current = previous;
15
+ }
16
+ }
17
+ };
18
+ }
19
+ export function createDashboardTrackedData(sources, tracker) {
20
+ const data = {};
21
+ for (const [key, source] of sources) {
22
+ Object.defineProperty(data, key, {
23
+ enumerable: true,
24
+ get() {
25
+ tracker.record(source);
26
+ return source.data;
27
+ }
28
+ });
29
+ }
30
+ return markRaw(data);
31
+ }
@@ -0,0 +1,38 @@
1
+ import type { AppConfig } from 'nuxt/schema';
2
+ import type { DashboardUiConfig } from '../types/index.js';
3
+ /**
4
+ * Resolves the classes of one block part: library defaults, then each override layer
5
+ * (app config, then the `ui` prop), merged with tailwind-merge so later layers win.
6
+ */
7
+ export declare function resolveDashboardClasses<TKey extends string>(defaults: Record<TKey, string>, ...layers: (Partial<Record<NoInfer<TKey>, string>> | undefined)[]): Record<TKey, string>;
8
+ /** Default classes of `UiDashboardTable`, also used by the card's "view as table" action. */
9
+ export declare const DASHBOARD_TABLE_CLASSES: {
10
+ bar: string;
11
+ head: string;
12
+ row: string;
13
+ table: string;
14
+ td: string;
15
+ th: string;
16
+ wrapper: string;
17
+ };
18
+ /**
19
+ * A row with a `select` listener: highlighted on hover and keyboard focus of its button. The row box
20
+ * never moves, so its divider stays aligned with the card content; the highlight is a pseudo-element
21
+ * reaching 8px past both edges, behind the content (`isolate` keeps it inside the row).
22
+ */
23
+ export declare const DASHBOARD_SELECTABLE_ROW = "relative isolate before:pointer-events-none before:absolute before:inset-y-0 before:-inset-x-2 before:-z-10 before:rounded-md before:transition-colors has-[>button:hover]:before:bg-elevated/60 has-[>button:focus-visible]:before:bg-elevated/60";
24
+ /**
25
+ * A row shown as selected (`selected` prop): the same tint as the hover, stronger, and an accent
26
+ * on its start edge, both drawn around the row box.
27
+ */
28
+ export declare const DASHBOARD_SELECTED_ROW = "relative isolate before:pointer-events-none before:absolute before:inset-y-0 before:-inset-x-2 before:-z-10 before:rounded-md before:bg-elevated after:pointer-events-none after:absolute after:inset-y-2 after:-start-2 after:w-0.5 after:rounded-full after:bg-primary";
29
+ /**
30
+ * Button stretched over a selectable row, and over its highlight. It is the row's only interactive
31
+ * element, so the row keeps its list semantics and its content stays plain text; controls inside
32
+ * the row sit above it.
33
+ */
34
+ export declare const DASHBOARD_ROW_BUTTON = "absolute inset-y-0 -inset-x-2 cursor-pointer rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset";
35
+ /** Button stretched over a table row. It stays inside the row: the table may scroll sideways. */
36
+ export declare const DASHBOARD_TABLE_ROW_BUTTON = "absolute inset-0 cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset";
37
+ /** Reads `appConfig.nuxtUiTools.dashboard`; apps that do not declare it get no overrides. */
38
+ export declare function resolveAppDashboardUi(config: Pick<AppConfig, 'nuxtUiTools'>): DashboardUiConfig;
@@ -0,0 +1,24 @@
1
+ import { twMerge } from "tailwind-merge";
2
+ export function resolveDashboardClasses(defaults, ...layers) {
3
+ const resolved = { ...defaults };
4
+ for (const key in defaults) {
5
+ resolved[key] = twMerge(defaults[key], ...layers.map((layer) => layer?.[key]));
6
+ }
7
+ return resolved;
8
+ }
9
+ export const DASHBOARD_TABLE_CLASSES = {
10
+ bar: "h-1.5 overflow-hidden rounded-full bg-[var(--nut-dash-track)]",
11
+ head: "sticky top-0 z-[1] bg-default",
12
+ row: "border-t border-[var(--nut-dash-grid)]",
13
+ table: "w-full border-collapse text-[13px]",
14
+ td: "px-2.5 py-2 text-muted first:ps-0 last:pe-0",
15
+ th: "px-2.5 pt-0.5 pb-2 text-xs font-medium whitespace-nowrap text-dimmed first:ps-0 last:pe-0",
16
+ wrapper: "min-w-0 overflow-auto"
17
+ };
18
+ export const DASHBOARD_SELECTABLE_ROW = "relative isolate before:pointer-events-none before:absolute before:inset-y-0 before:-inset-x-2 before:-z-10 before:rounded-md before:transition-colors has-[>button:hover]:before:bg-elevated/60 has-[>button:focus-visible]:before:bg-elevated/60";
19
+ export const DASHBOARD_SELECTED_ROW = "relative isolate before:pointer-events-none before:absolute before:inset-y-0 before:-inset-x-2 before:-z-10 before:rounded-md before:bg-elevated after:pointer-events-none after:absolute after:inset-y-2 after:-start-2 after:w-0.5 after:rounded-full after:bg-primary";
20
+ export const DASHBOARD_ROW_BUTTON = "absolute inset-y-0 -inset-x-2 cursor-pointer rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset";
21
+ export const DASHBOARD_TABLE_ROW_BUTTON = "absolute inset-0 cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset";
22
+ export function resolveAppDashboardUi(config) {
23
+ return config.nuxtUiTools?.dashboard ?? {};
24
+ }
@@ -0,0 +1,2 @@
1
+ /** Runs `callback` once, when `element` first nears the viewport. Returns a stop function. */
2
+ export declare function observeDashboardVisibility(element: Element, callback: () => void): () => void;
@@ -0,0 +1,25 @@
1
+ const callbacks = /* @__PURE__ */ new WeakMap();
2
+ let observer = null;
3
+ function getVisibilityObserver() {
4
+ observer ??= new IntersectionObserver(
5
+ (entries) => {
6
+ for (const entry of entries) {
7
+ if (!entry.isIntersecting) continue;
8
+ const callback = callbacks.get(entry.target);
9
+ unobserveDashboardVisibility(entry.target);
10
+ callback?.();
11
+ }
12
+ },
13
+ { rootMargin: "200px" }
14
+ );
15
+ return observer;
16
+ }
17
+ function unobserveDashboardVisibility(element) {
18
+ callbacks.delete(element);
19
+ observer?.unobserve(element);
20
+ }
21
+ export function observeDashboardVisibility(element, callback) {
22
+ callbacks.set(element, callback);
23
+ getVisibilityObserver().observe(element);
24
+ return () => unobserveDashboardVisibility(element);
25
+ }
@@ -1,3 +1,4 @@
1
+ import type { RemoteCursorOptionsPage, RemoteOptionsPage, RemoteOptionsPageRequest, RemoteOptionsPagination, RemoteOptionsResult, RemoteOptionsSearch } from '../../shared/types/remote-options.js';
1
2
  import type { FormValue } from './/index.js';
2
3
  import type { FormFieldCallback, FormFieldCallbackParams } from './callbacks.js';
3
4
  import type { FormQueryOptions } from './context.js';
@@ -67,30 +68,17 @@ export interface FormOptionConfig<TOption, TContext = NonNullable<unknown>, TDep
67
68
  /** Disable the field while its option source has no usable data yet. */
68
69
  disableOnLoading?: boolean;
69
70
  }
70
- /**
71
- * Page envelope returned by an index-paginated remote option source.
72
- */
73
- export interface FormRemoteOptionsPage<TOption> {
74
- options: readonly TOption[];
75
- hasMore: boolean;
76
- }
77
- /**
78
- * Page envelope returned by a cursor-paginated remote option source.
79
- */
80
- export interface FormRemoteCursorOptionsPage<TOption> {
81
- options: readonly TOption[];
82
- nextCursor: string | null;
83
- }
84
- export type FormRemoteOptionsResult<TOption> = FormRemoteOptionsPage<TOption> | FormRemoteCursorOptionsPage<TOption>;
71
+ /** @deprecated Use `RemoteOptionsPage` from `#ui-tools/shared`. Kept for public type compatibility. */
72
+ export type FormRemoteOptionsPage<TOption> = RemoteOptionsPage<TOption>;
73
+ /** @deprecated Use `RemoteCursorOptionsPage` from `#ui-tools/shared`. Kept for public type compatibility. */
74
+ export type FormRemoteCursorOptionsPage<TOption> = RemoteCursorOptionsPage<TOption>;
75
+ /** @deprecated Use `RemoteOptionsResult` from `#ui-tools/shared`. Kept for public type compatibility. */
76
+ export type FormRemoteOptionsResult<TOption> = RemoteOptionsResult<TOption>;
85
77
  export interface FormRemoteOptionsRequest<TContext = NonNullable<unknown>, TDeps = NonNullable<unknown>, TValue = FormValue, TOption = FormValue> extends FormFieldCallbackParams<TContext, TDeps, TValue, TOption> {
86
78
  /** Current debounced search term. Empty when the menu lists unfiltered options. */
87
79
  search: string;
88
80
  /** Requested page. `cursor` is set for cursor pagination and `index` for page pagination. */
89
- page: {
90
- index: number;
91
- cursor: string | null;
92
- size: number;
93
- };
81
+ page: RemoteOptionsPageRequest;
94
82
  /** Parent option whose direct children are requested. Undefined for root pages. */
95
83
  parent?: NoInfer<TOption>;
96
84
  }
@@ -99,30 +87,21 @@ export interface FormRemoteSelectedRequest<TContext = NonNullable<unknown>, TDep
99
87
  values: readonly FormOptionValue[];
100
88
  }
101
89
  export type FormRemoteSource<TResult> = FormQueryOptions<TResult> | Promise<TResult>;
102
- export interface FormRemotePagination {
103
- type: 'page' | 'cursor';
104
- /** Page size forwarded to the source. */
105
- size: number;
106
- /** Distance from the list end that triggers the next page: pixels, or `'viewport'` for three viewport heights. Defaults to `'viewport'`. */
107
- prefetchDistance?: number | 'viewport';
108
- }
109
- export interface FormRemoteSearch {
110
- /** Debounce applied to typed search terms, in milliseconds. Defaults to 250. */
111
- debounce?: number;
112
- /** Minimum term length before a search request runs. Defaults to 0. */
113
- minLength?: number;
114
- }
90
+ /** @deprecated Use `RemoteOptionsPagination` from `#ui-tools/shared`. Kept for public type compatibility. */
91
+ export type FormRemotePagination = RemoteOptionsPagination;
92
+ /** @deprecated Use `RemoteOptionsSearch` from `#ui-tools/shared`. Kept for public type compatibility. */
93
+ export type FormRemoteSearch = RemoteOptionsSearch;
115
94
  /**
116
95
  * Remote option configuration: server-side search, pagination, and selected-value hydration.
117
96
  */
118
97
  export interface FormRemoteOptionConfig<TOption, TContext = NonNullable<unknown>, TDeps = NonNullable<unknown>, TValue = FormValue> {
119
98
  mode: 'remote';
120
99
  /** Loads one page of options for the current search, page, and optional parent. */
121
- source: (request: FormRemoteOptionsRequest<TContext, TDeps, TValue, TOption>) => FormRemoteSource<FormRemoteOptionsResult<TOption>>;
100
+ source: (request: FormRemoteOptionsRequest<TContext, TDeps, TValue, TOption>) => FormRemoteSource<RemoteOptionsResult<TOption>>;
122
101
  /** Hydrates selected values that the loaded pages do not contain. */
123
102
  resolveSelected?: (request: FormRemoteSelectedRequest<TContext, TDeps, TValue, TOption>) => FormRemoteSource<readonly TOption[]>;
124
- pagination: FormRemotePagination;
125
- search?: FormRemoteSearch;
103
+ pagination: RemoteOptionsPagination;
104
+ search?: RemoteOptionsSearch;
126
105
  /** Dependency aliases whose changes reset the loaded pages and re-run selected hydration. */
127
106
  refreshOn?: readonly string[];
128
107
  /** Clears selected values the latest successful selected hydration did not return. Defaults to `false`. */
@@ -2,6 +2,68 @@ import { defineUiToolsLocale } from "#ui-tools/i18n/define-locale";
2
2
  export default defineUiToolsLocale({
3
3
  code: "en",
4
4
  messages: {
5
+ dashboard: {
6
+ alerts: {
7
+ empty: "Nothing needs attention",
8
+ severity: {
9
+ error: "Critical",
10
+ info: "Info",
11
+ success: "Resolved",
12
+ warning: "Warning"
13
+ }
14
+ },
15
+ compare: {
16
+ caption: "vs {value} previous period",
17
+ none: "No comparison",
18
+ previous: "Previous period",
19
+ series: "{label} (previous period)",
20
+ year: "Previous year"
21
+ },
22
+ freshness: {
23
+ prefix: "Updated",
24
+ updated: "Updated {time}"
25
+ },
26
+ funnel: {
27
+ base: "base 100%",
28
+ fromPrevious: "{value} of the previous step"
29
+ },
30
+ menu: {
31
+ download: "Download CSV",
32
+ expand: "Expand",
33
+ hideTable: "Hide table",
34
+ label: "Card actions",
35
+ showTable: "View as table"
36
+ },
37
+ refresh: {
38
+ auto: "Auto-refresh",
39
+ label: "Refresh",
40
+ off: "Off"
41
+ },
42
+ rowActions: "Actions for {label}",
43
+ stat: {
44
+ goal: "Goal {value}"
45
+ },
46
+ table: {
47
+ actions: "Actions",
48
+ category: "Category",
49
+ change: "Change",
50
+ description: "Details",
51
+ label: "Label",
52
+ severity: "Severity",
53
+ share: "Share",
54
+ time: "Time",
55
+ total: "Total",
56
+ value: "Value"
57
+ },
58
+ states: {
59
+ empty: "No data for this period",
60
+ error: "This data could not be loaded",
61
+ errorDescription: "The rest of the dashboard is unaffected. Try again in a moment.",
62
+ loading: "Loading\u2026",
63
+ refreshing: "Refreshing\u2026",
64
+ retry: "Retry"
65
+ }
66
+ },
5
67
  form: {
6
68
  actions: {
7
69
  cancelButton: "Cancel",
@@ -290,7 +352,9 @@ export default defineUiToolsLocale({
290
352
  lte: "at most"
291
353
  },
292
354
  options: {
293
- empty: "No matching options."
355
+ empty: "No matching options.",
356
+ loadError: "Options could not be loaded.",
357
+ retry: "Retry"
294
358
  },
295
359
  panel: {
296
360
  apply: "Apply",
@@ -2,6 +2,68 @@ import { defineUiToolsLocale } from "#ui-tools/i18n/define-locale";
2
2
  export default defineUiToolsLocale({
3
3
  code: "fr",
4
4
  messages: {
5
+ dashboard: {
6
+ alerts: {
7
+ empty: "Rien \xE0 signaler",
8
+ severity: {
9
+ error: "Critique",
10
+ info: "Information",
11
+ success: "R\xE9solu",
12
+ warning: "\xC0 surveiller"
13
+ }
14
+ },
15
+ compare: {
16
+ caption: "vs {value} sur la p\xE9riode pr\xE9c\xE9dente",
17
+ none: "Sans comparaison",
18
+ previous: "P\xE9riode pr\xE9c\xE9dente",
19
+ series: "{label} (p\xE9riode pr\xE9c\xE9dente)",
20
+ year: "Ann\xE9e pr\xE9c\xE9dente"
21
+ },
22
+ freshness: {
23
+ prefix: "Mis \xE0 jour",
24
+ updated: "Mis \xE0 jour {time}"
25
+ },
26
+ funnel: {
27
+ base: "base 100 %",
28
+ fromPrevious: "{value} de l\u2019\xE9tape pr\xE9c\xE9dente"
29
+ },
30
+ menu: {
31
+ download: "T\xE9l\xE9charger en CSV",
32
+ expand: "Agrandir",
33
+ hideTable: "Masquer le tableau",
34
+ label: "Actions de la carte",
35
+ showTable: "Afficher en tableau"
36
+ },
37
+ refresh: {
38
+ auto: "Actualisation automatique",
39
+ label: "Actualiser",
40
+ off: "D\xE9sactiv\xE9e"
41
+ },
42
+ rowActions: "Actions pour {label}",
43
+ stat: {
44
+ goal: "Objectif {value}"
45
+ },
46
+ table: {
47
+ actions: "Actions",
48
+ category: "Cat\xE9gorie",
49
+ change: "\xC9volution",
50
+ description: "D\xE9tail",
51
+ label: "Libell\xE9",
52
+ severity: "Niveau",
53
+ share: "Part",
54
+ time: "Date",
55
+ total: "Total",
56
+ value: "Valeur"
57
+ },
58
+ states: {
59
+ empty: "Aucune donn\xE9e sur la p\xE9riode",
60
+ error: "Impossible de charger ces donn\xE9es",
61
+ errorDescription: "Le reste du tableau de bord n\u2019est pas affect\xE9. R\xE9essayez dans un instant.",
62
+ loading: "Chargement\u2026",
63
+ refreshing: "Actualisation\u2026",
64
+ retry: "R\xE9essayer"
65
+ }
66
+ },
5
67
  form: {
6
68
  actions: {
7
69
  cancelButton: "Annuler",
@@ -290,7 +352,9 @@ export default defineUiToolsLocale({
290
352
  lte: "au plus"
291
353
  },
292
354
  options: {
293
- empty: "Aucune option correspondante."
355
+ empty: "Aucune option correspondante.",
356
+ loadError: "Impossible de charger les options.",
357
+ retry: "R\xE9essayer"
294
358
  },
295
359
  panel: {
296
360
  apply: "Appliquer",
@@ -78,6 +78,9 @@ export interface UiToolsTableMessages {
78
78
  };
79
79
  options: {
80
80
  empty: string;
81
+ /** Remote option pages failed to load. */
82
+ loadError: string;
83
+ retry: string;
81
84
  };
82
85
  booleans: {
83
86
  true: string;
@@ -362,7 +365,74 @@ export interface UiToolsFormMessages {
362
365
  };
363
366
  };
364
367
  }
368
+ export interface UiToolsDashboardMessages {
369
+ states: {
370
+ loading: string;
371
+ refreshing: string;
372
+ empty: string;
373
+ error: string;
374
+ errorDescription: string;
375
+ retry: string;
376
+ };
377
+ funnel: {
378
+ base: string;
379
+ fromPrevious: string;
380
+ };
381
+ menu: {
382
+ label: string;
383
+ showTable: string;
384
+ hideTable: string;
385
+ download: string;
386
+ expand: string;
387
+ };
388
+ table: {
389
+ category: string;
390
+ label: string;
391
+ value: string;
392
+ total: string;
393
+ share: string;
394
+ change: string;
395
+ severity: string;
396
+ time: string;
397
+ description: string;
398
+ actions: string;
399
+ };
400
+ freshness: {
401
+ updated: string;
402
+ /** Label before a relative time ("Updated" · 3 min ago). */
403
+ prefix: string;
404
+ };
405
+ stat: {
406
+ goal: string;
407
+ };
408
+ compare: {
409
+ previous: string;
410
+ year: string;
411
+ none: string;
412
+ /** Stat caption with `compare`: "vs {value} previous period". */
413
+ caption: string;
414
+ /** Legend label of a series' comparison: "{label} (previous period)". */
415
+ series: string;
416
+ };
417
+ refresh: {
418
+ label: string;
419
+ auto: string;
420
+ off: string;
421
+ };
422
+ /** Accessible name of a row's `⋮` menu. */
423
+ rowActions: string;
424
+ alerts: {
425
+ empty: string;
426
+ severity: {
427
+ error: string;
428
+ warning: string;
429
+ info: string;
430
+ success: string;
431
+ };
432
+ };
433
+ }
365
434
  export interface Messages {
435
+ dashboard: UiToolsDashboardMessages;
366
436
  form: UiToolsFormMessages;
367
437
  table: UiToolsTableMessages;
368
438
  spreadsheet: UiToolsSpreadsheetMessages;
@@ -8,3 +8,5 @@ export * from './utils/predicate.js';
8
8
  export * from './utils/responsive.js';
9
9
  export * from './utils/registry.js';
10
10
  export * from './utils/render.js';
11
+ export type * from './types/query';
12
+ export type * from './types/remote-options';