@antelopejs/dms 0.14.0 → 0.15.1

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 (86) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +1 -1
  3. package/bin/control/journey.mjs +5 -0
  4. package/bin/control/session.mjs +1 -0
  5. package/bin/control/stack.mjs +1 -0
  6. package/dist/config/internal/state.d.ts +7 -0
  7. package/dist/config/internal/state.js +9 -0
  8. package/dist/config/internal/state.js.map +1 -1
  9. package/dist/config/startup-config.d.ts +1 -0
  10. package/dist/config/startup-config.js +11 -0
  11. package/dist/config/startup-config.js.map +1 -1
  12. package/dist/db/index.d.ts +1 -0
  13. package/dist/db/index.js +1 -0
  14. package/dist/db/index.js.map +1 -1
  15. package/dist/db/models/index.d.ts +1 -0
  16. package/dist/db/models/index.js +1 -0
  17. package/dist/db/models/index.js.map +1 -1
  18. package/dist/db/models/setupToken.model.d.ts +29 -0
  19. package/dist/db/models/setupToken.model.js +62 -0
  20. package/dist/db/models/setupToken.model.js.map +1 -0
  21. package/dist/db/setup-token.d.ts +2 -0
  22. package/dist/db/setup-token.js +28 -0
  23. package/dist/db/setup-token.js.map +1 -0
  24. package/dist/db/tables/index.d.ts +1 -0
  25. package/dist/db/tables/index.js +1 -0
  26. package/dist/db/tables/index.js.map +1 -1
  27. package/dist/db/tables/setupToken.table.d.ts +7 -0
  28. package/dist/db/tables/setupToken.table.js +34 -0
  29. package/dist/db/tables/setupToken.table.js.map +1 -0
  30. package/dist/implementations/dms/page/payloads.js +6 -10
  31. package/dist/implementations/dms/page/payloads.js.map +1 -1
  32. package/dist/implementations/dms/page/public-layout.d.ts +2 -0
  33. package/dist/implementations/dms/page/public-layout.js +45 -0
  34. package/dist/implementations/dms/page/public-layout.js.map +1 -0
  35. package/dist/index.d.ts +0 -1
  36. package/dist/index.js +6 -2
  37. package/dist/index.js.map +1 -1
  38. package/dist/pages/settings/users/current-password.js +1 -1
  39. package/dist/pages/settings/users/current-password.js.map +1 -1
  40. package/dist/routes/auth/login.d.ts +1 -1
  41. package/dist/routes/auth/login.js +7 -2
  42. package/dist/routes/auth/login.js.map +1 -1
  43. package/dist/routes/auth/password-hash-upgrade.d.ts +2 -0
  44. package/dist/routes/auth/password-hash-upgrade.js +22 -0
  45. package/dist/routes/auth/password-hash-upgrade.js.map +1 -0
  46. package/dist/routes/authentication.d.ts +2 -0
  47. package/dist/routes/authentication.js +2 -0
  48. package/dist/routes/authentication.js.map +1 -1
  49. package/dist/routes/onboarding.d.ts +3 -1
  50. package/dist/routes/onboarding.js +20 -3
  51. package/dist/routes/onboarding.js.map +1 -1
  52. package/dist/utils/ensure-default-tenant.d.ts +2 -1
  53. package/dist/utils/ensure-default-tenant.js +126 -8
  54. package/dist/utils/ensure-default-tenant.js.map +1 -1
  55. package/dist/validation/onboarding/register-admin.schema.d.ts +5 -0
  56. package/dist/validation/onboarding/register-admin.schema.js +3 -0
  57. package/dist/validation/onboarding/register-admin.schema.js.map +1 -1
  58. package/frontend-vue/layers/dms-core/app/utils/formatter.ts +15 -1
  59. package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +1 -0
  60. package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +1 -0
  61. package/frontend-vue/layers/dms-core/shared/types/app-config.ts +5 -0
  62. package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -0
  63. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +9 -9
  64. package/frontend-vue/layers/dms-layout/app/components/layout/AppLogo.vue +1 -0
  65. package/frontend-vue/layers/dms-layout/app/composables/page/useInstalledModules.ts +78 -0
  66. package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +5 -24
  67. package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +2 -1
  68. package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +2 -1
  69. package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/register.vue +21 -1
  70. package/frontend-vue/layers/dms-onboarding/app/custom-pages/onboarding.vue +14 -0
  71. package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-en-GB.json +2 -0
  72. package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-fr-FR.json +2 -0
  73. package/frontend-vue/layers/dms-ui/app/build/composables/blocks/blockDataState.ts +86 -0
  74. package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexAxes.ts +22 -3
  75. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewCounts.ts +30 -11
  76. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewTabs.ts +2 -2
  77. package/frontend-vue/layers/dms-ui/app/components/RecursiveComponent.vue +6 -0
  78. package/frontend-vue/layers/dms-ui/app/components/chart/Chart.vue +17 -1
  79. package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +22 -2
  80. package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +14 -0
  81. package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +14 -1
  82. package/frontend-vue/layers/dms-ui/app/components/top-list/TopListCard.vue +17 -1
  83. package/frontend-vue/layers/dms-ui/app/composables/chart/apexCategoryLabels.ts +12 -10
  84. package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.ts +11 -2
  85. package/frontend-vue/layers/dms-ui/app/entries/composables/blocks/blockDataState.ts +1 -0
  86. package/package.json +3 -3
@@ -1,5 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from "vue";
3
+ import {
4
+ resolveBlockState,
5
+ useBlockStateAttributes,
6
+ } from "../../build/composables/blocks/blockDataState";
3
7
  import DmsStatCell from "../../build/components/stat/StatCell.vue";
4
8
  import DmsEyebrow from "../section-header/Eyebrow.vue";
5
9
 
@@ -129,6 +133,14 @@ const previousText = computed(() => {
129
133
  return t("dms.chart.versus_value", { value: formatted });
130
134
  });
131
135
 
136
+ const blockAttributes = useBlockStateAttributes("KpiCard", () =>
137
+ resolveBlockState({
138
+ loading: isLoading.value,
139
+ failed: Boolean(error.value),
140
+ hasContent: value.value !== undefined,
141
+ }),
142
+ );
143
+
132
144
  const isFirstLoad = computed(() => isLoading.value && data.value === null);
133
145
 
134
146
  const hasError = computed(
@@ -181,6 +193,7 @@ const isStat = computed(() => props.variant === "stat");
181
193
  <template>
182
194
  <DmsStatCell
183
195
  v-if="isStat"
196
+ v-bind="blockAttributes"
184
197
  :eyebrow="processI18n(title)"
185
198
  :icon="resolvedIcon"
186
199
  :loading="isFirstLoad"
@@ -245,6 +258,7 @@ const isStat = computed(() => props.variant === "stat");
245
258
 
246
259
  <DmsCard
247
260
  v-else
261
+ v-bind="blockAttributes"
248
262
  :padded="false"
249
263
  class="flex min-h-[132px] flex-col gap-1.5 px-4 py-4 sm:px-[18px]"
250
264
  :aria-busy="isFirstLoad"
@@ -18,6 +18,10 @@ import ExpandedRowDetail from "../../build/components/table-view/ExpandedRowDeta
18
18
  import LiveHoldBanner from "../../build/components/table-view/LiveHoldBanner.vue";
19
19
  import TableViews from "../../build/components/table/Views.vue";
20
20
  import { useTableViewSetup } from "../../build/composables/table-view/tableViewSetup";
21
+ import {
22
+ resolveBlockState,
23
+ useBlockStateAttributes,
24
+ } from "../../build/composables/blocks/blockDataState";
21
25
 
22
26
  interface TableViewProps<T extends Data> extends TableViewConfig<T> {
23
27
  /** Expandable rows: caret column + detail band (backend `expandable`). */
@@ -143,18 +147,27 @@ const {
143
147
  handleRowEdit,
144
148
  contextForSlot,
145
149
  } = useTableViewSetup<T>(props);
150
+
151
+ const blockAttributes = useBlockStateAttributes("TableView", () =>
152
+ resolveBlockState({
153
+ loading: isListLoading.value,
154
+ failed: Boolean(listLoadError.value || listNotFound.value),
155
+ hasContent: (shownResults.value?.length ?? 0) > 0,
156
+ }),
157
+ );
146
158
  </script>
147
159
 
148
160
  <template>
149
161
  <DmsBlockStatus
150
162
  v-if="listNotFound"
163
+ v-bind="blockAttributes"
151
164
  state="not-found"
152
165
  :not-found="listNotFound"
153
166
  />
154
167
  <UTable
155
168
  v-else
156
169
  ref="tableRoot"
157
- v-bind="tableProps"
170
+ v-bind="{ ...tableProps, ...blockAttributes }"
158
171
  v-model:pagination="paginationState"
159
172
  v-model:global-filter="globalFilter"
160
173
  v-model:sorting="sorting"
@@ -1,5 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, nextTick, onMounted, ref, watch } from "vue";
3
+ import {
4
+ resolveBlockState,
5
+ useBlockStateAttributes,
6
+ } from "../../build/composables/blocks/blockDataState";
3
7
  import DmsEmptyState from "../empty-state/EmptyState.vue";
4
8
  import DmsSectionHeader from "../section-header/SectionHeader.vue";
5
9
  import DmsBlockActions, {
@@ -219,6 +223,14 @@ const badgeLabel = computed<string | null>(() => {
219
223
  const comparison = usePeriodComparisonDisplay(props.periodScope);
220
224
  const showRowDelta = computed(() => props.showDelta && !comparison.isOff.value);
221
225
 
226
+ const blockAttributes = useBlockStateAttributes("TopListCard", () =>
227
+ resolveBlockState({
228
+ loading: isLoading.value,
229
+ failed: Boolean(error.value),
230
+ hasContent: items.value.length > 0,
231
+ }),
232
+ );
233
+
222
234
  const isFirstLoad = computed(() => isLoading.value && data.value === null);
223
235
 
224
236
  const isRefreshing = computed(() => isLoading.value && data.value !== null);
@@ -268,7 +280,11 @@ const gridStyle = computed(() => ({
268
280
  </script>
269
281
 
270
282
  <template>
271
- <DmsCard :padded="false" class="flex min-w-0 flex-col overflow-hidden">
283
+ <DmsCard
284
+ v-bind="blockAttributes"
285
+ :padded="false"
286
+ class="flex min-w-0 flex-col overflow-hidden"
287
+ >
272
288
  <DmsSectionHeader
273
289
  size="card"
274
290
  class="border-default border-b py-3.5 pr-4 pl-[18px]"
@@ -1,5 +1,4 @@
1
1
  import { isNumber } from "../../../../dms-core/app/utils/type-check";
2
- import type { ChartXAxisFormatter } from "./types";
3
2
 
4
3
  /**
5
4
  * Width of one character of the axis font (11px, monospace) in pixels, with a
@@ -38,19 +37,22 @@ export function categoryLabelStep(
38
37
  }
39
38
 
40
39
  /**
41
- * A heatmap gives every column a label and ApexCharts does not thin them
42
- * (`hideOverlappingLabels` only acts on other charts), so on a phone they run
43
- * into each other ("07:0009:00"). This formatter keeps one label every few
44
- * columns, from the plot's width, and leaves the tooltip's (no column index)
45
- * whole.
40
+ * A category x-axis gives every point a label and ApexCharts does not thin
41
+ * them (`hideOverlappingLabels` only acts on numeric and datetime axes), so a
42
+ * long series or a narrow plot runs them into each other ("Aug 4, 2026Aug 8,
43
+ * 2026"). This formatter keeps one label every few columns, from the plot's
44
+ * width, and leaves the tooltip's (no column index) whole.
46
45
  */
47
46
  export function thinnedCategoryFormatter(
48
- format: ChartXAxisFormatter | undefined,
47
+ format: ApexLabelFormatter | undefined,
49
48
  ): ApexLabelFormatter {
50
- const write = (value: string, timestamp?: number): string =>
51
- format ? format(value, timestamp) : String(value ?? "");
49
+ const write = (
50
+ value: string,
51
+ timestamp?: number,
52
+ opts?: ApexLabelFormatterOpts,
53
+ ): string => (format ? format(value, timestamp, opts) : String(value ?? ""));
52
54
  return (value, timestamp, opts) => {
53
- const label = write(value, timestamp);
55
+ const label = write(value, timestamp, opts);
54
56
  const index = opts?.i;
55
57
  const globals = opts?.w?.globals;
56
58
  if (!isNumber(index) || !globals) return label;
@@ -16,7 +16,12 @@ import {
16
16
  import { APEX_TYPE_CONFIGS } from "./apexTypeConfigs";
17
17
  import { buildAnnotations } from "./apexAnnotations";
18
18
  import { buildPlotOptions, ringFitsSliceLabels } from "./apexPlotOptions";
19
- import { buildXAxis, buildYAxis } from "../../build/composables/chart/apexAxes";
19
+ import {
20
+ buildXAxis,
21
+ buildYAxis,
22
+ thinsOwnXLabels,
23
+ } from "../../build/composables/chart/apexAxes";
24
+ import { thinnedCategoryFormatter } from "./apexCategoryLabels";
20
25
  import {
21
26
  applyHeatmapThemeMode,
22
27
  applyValueBasedColorScale,
@@ -271,10 +276,14 @@ function applyDatetimeBuckets(
271
276
  if (!buckets) return;
272
277
  const xaxis = options.xaxis;
273
278
  const { format: _datetimeFormat, ...labels } = xaxis.labels;
279
+ const bucketLabels = bucketAxisFormatter(buckets, input);
280
+ const bucketFormatter = thinsOwnXLabels(input, true)
281
+ ? thinnedCategoryFormatter(bucketLabels)
282
+ : bucketLabels;
274
283
  options.xaxis = {
275
284
  ...xaxis,
276
285
  type: "category",
277
- labels: { ...labels, formatter: bucketAxisFormatter(buckets, input) },
286
+ labels: { ...labels, formatter: bucketFormatter },
278
287
  };
279
288
  const tooltip = options.tooltip;
280
289
  options.tooltip = {
@@ -0,0 +1 @@
1
+ export * from "../../../build/composables/blocks/blockDataState";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "AntelopeJS DMS. Plug in your PostgreSQL, MongoDB or RethinkDB database and your coding agent builds a back office and analytics dashboard as typed TypeScript. Real-time updates on the data the DMS manages.",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -74,8 +74,8 @@
74
74
  "@antelopejs/interface-core": ">=0.2.6 <1.0.0",
75
75
  "@antelopejs/interface-data-api": ">=0.5.0 <1.0.0",
76
76
  "@antelopejs/interface-database": ">=0.1.11 <1.0.0",
77
- "@antelopejs/interface-database-decorators": ">=0.1.10 <1.0.0",
78
- "@antelopejs/interface-dms": ">=0.10.2 <0.11.0",
77
+ "@antelopejs/interface-database-decorators": ">=0.1.12 <1.0.0",
78
+ "@antelopejs/interface-dms": ">=0.10.4 <0.11.0",
79
79
  "@antelopejs/interface-email": ">=0.0.6 <1.0.0",
80
80
  "@antelopejs/interface-file-storage": ">=0.1.4 <1.0.0",
81
81
  "archiver": "^7.0.1",