@antelopejs/dms 0.25.4 → 0.25.6-next.1105.g9b73018
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.
- package/CHANGELOG.md +16 -0
- package/E2E.md +1 -1
- package/README.md +1 -1
- package/dist/implementations/dms-builder/engine/dms-database.js.map +1 -1
- package/dist/implementations/dms-builder/engine/driver-probe.d.ts +1 -1
- package/dist/mcp/tool.d.ts +1 -1
- package/frontend-vue/.prettierignore +1 -0
- package/frontend-vue/build/backend-boundary.ts +80 -80
- package/frontend-vue/layers/dms-auth/server/backend-answers.ts +12 -9
- package/frontend-vue/layers/dms-auth/server/oauth.ts +6 -6
- package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +1 -2
- package/frontend-vue/layers/dms-core/app/build/utils/siteLayoutResync.ts +92 -0
- package/frontend-vue/layers/dms-core/app/composables/page/useSiteLayout.ts +2 -33
- package/frontend-vue/layers/dms-core/app/composables/period/types.ts +1 -4
- package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +1 -3
- package/frontend-vue/layers/dms-core/app/composables/useFormValidation.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/composed-text.ts +1 -4
- package/frontend-vue/layers/dms-core/app/types/confirm-dialog.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/data-type.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/json.ts +1 -3
- package/frontend-vue/layers/dms-core/app/types/module-store.ts +3 -17
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +3 -2
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +11 -8
- package/frontend-vue/layers/dms-layout/app/build/components/layout/StageCard.vue +1 -5
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +3 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +3 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-permissions.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityOverview.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/build/utils/module-store-install.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/composables/notification/useNotifications.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/build/components/blocks/BlockActions.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSectionEditing.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/blocks/useRefreshTriggers.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentErrors.ts +1 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentRealtime.ts +4 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentValidation.ts +4 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplayContext.ts +35 -37
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/recordLink.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +1 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/components/blocks/BannerBlock.vue +3 -4
- package/frontend-vue/layers/dms-ui/app/components/blocks/KeyValueListBlock.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/blocks/StatGroupBlock.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/code-snippet/CodeSnippet.vue +2 -3
- package/frontend-vue/layers/dms-ui/app/components/form/FormBlock.vue +5 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCalendar.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCode.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +1 -6
- package/frontend-vue/layers/dms-ui/app/composables/confirm/types.ts +5 -4
- package/frontend-vue/layers/dms-ui/app/composables/containers/types.ts +5 -8
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +4 -2
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +5 -10
- package/frontend-vue/layers/dms-ui/app/types/modal.ts +1 -9
- package/frontend-vue/layers/dms-ui/app/types/quick-actions.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/utils/mockupAssistant.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/utils/semanticTint.ts +1 -6
- package/frontend-vue/package.json +6 -6
- package/frontend-vue/scripts/check-api-error-presentation.mjs +3 -3
- package/frontend-vue/scripts/check-page-invariants.mjs +6 -9
- package/frontend-vue/scripts/dms-components-script.mjs +7 -7
- package/package.json +8 -9
|
@@ -14,17 +14,16 @@ import { headerButtonProps } from "./headerButton";
|
|
|
14
14
|
const props = defineProps<{ header: PreviewHeader }>();
|
|
15
15
|
|
|
16
16
|
const DEFAULT_ICON = "i-ph-file";
|
|
17
|
-
const ACTIONS_CLASS =
|
|
17
|
+
const ACTIONS_CLASS =
|
|
18
|
+
"flex w-full flex-wrap items-center gap-2 md:ms-auto md:w-auto";
|
|
18
19
|
|
|
19
20
|
const marker = { [PREVIEW_HEADER_ATTRIBUTE]: "" };
|
|
20
21
|
|
|
21
22
|
const actions = computed(() =>
|
|
22
|
-
(props.header.actions ?? []).map(
|
|
23
|
-
(action)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
),
|
|
23
|
+
(props.header.actions ?? []).map((action): ButtonProps => ({
|
|
24
|
+
...headerButtonProps(action),
|
|
25
|
+
label: action.label,
|
|
26
|
+
})),
|
|
28
27
|
);
|
|
29
28
|
</script>
|
|
30
29
|
|
|
@@ -38,7 +37,11 @@ const actions = computed(() =>
|
|
|
38
37
|
>
|
|
39
38
|
<template #actions>
|
|
40
39
|
<div v-if="actions.length" :class="ACTIONS_CLASS">
|
|
41
|
-
<UButton
|
|
40
|
+
<UButton
|
|
41
|
+
v-for="(button, index) in actions"
|
|
42
|
+
:key="index"
|
|
43
|
+
v-bind="button"
|
|
44
|
+
/>
|
|
42
45
|
</div>
|
|
43
46
|
</template>
|
|
44
47
|
</PageHeader>
|
|
@@ -8,11 +8,7 @@ export type StageCardWidth = "default" | "wide" | "xwide";
|
|
|
8
8
|
|
|
9
9
|
/** Color of the icon well above the title. */
|
|
10
10
|
export type StageCardTone =
|
|
11
|
-
| "
|
|
12
|
-
| "success"
|
|
13
|
-
| "warning"
|
|
14
|
-
| "error"
|
|
15
|
-
| "neutral";
|
|
11
|
+
"primary" | "success" | "warning" | "error" | "neutral";
|
|
16
12
|
|
|
17
13
|
interface StageCardProps {
|
|
18
14
|
as?: string;
|
package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue
CHANGED
|
@@ -232,7 +232,9 @@ const goToNotifications = () => {
|
|
|
232
232
|
<div class="text-muted mt-1 text-[10px]">
|
|
233
233
|
<time
|
|
234
234
|
:datetime="notification.createdAt"
|
|
235
|
-
:title="
|
|
235
|
+
:title="
|
|
236
|
+
formatNotificationFullTime(notification.createdAt, locale)
|
|
237
|
+
"
|
|
236
238
|
>
|
|
237
239
|
{{ formatRelativeTime(notification.createdAt, t, locale) }}
|
|
238
240
|
</time>
|
|
@@ -75,9 +75,9 @@ const actionLabelUi = {
|
|
|
75
75
|
}}
|
|
76
76
|
</template>
|
|
77
77
|
<template #meta>
|
|
78
|
-
<time :datetime="props.notification.createdAt" :title="fullTime">
|
|
79
|
-
props.time
|
|
80
|
-
|
|
78
|
+
<time :datetime="props.notification.createdAt" :title="fullTime">
|
|
79
|
+
{{ props.time }}
|
|
80
|
+
</time>
|
|
81
81
|
<span
|
|
82
82
|
v-if="props.source"
|
|
83
83
|
:class="[SOURCE_TAG_CLASS, props.source.isModule && MODULE_TAG_CLASS]"
|
package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-permissions.ts
CHANGED
|
@@ -353,7 +353,7 @@ function removeDependents(
|
|
|
353
353
|
const dependsOnRemoved = (id: string) =>
|
|
354
354
|
!removed.has(id) &&
|
|
355
355
|
dependenciesOf(index, id).some((dependency) => removed.has(dependency));
|
|
356
|
-
for (let next = [...selection].find(dependsOnRemoved); next;
|
|
356
|
+
for (let next = [...selection].find(dependsOnRemoved); next;) {
|
|
357
357
|
dependents.push(next);
|
|
358
358
|
for (const descendant of index.subtrees.get(next) ?? [next]) {
|
|
359
359
|
removed.add(descendant);
|
|
@@ -51,9 +51,7 @@ export interface TotpSetup {
|
|
|
51
51
|
|
|
52
52
|
/** Something on the Security page that needs the user's attention. */
|
|
53
53
|
export type SecurityAttention =
|
|
54
|
-
| "
|
|
55
|
-
| "backup_codes_unsaved"
|
|
56
|
-
| "backup_codes_low";
|
|
54
|
+
"two_factor_off" | "backup_codes_unsaved" | "backup_codes_low";
|
|
57
55
|
|
|
58
56
|
/** Strongest first, as the server ranks the attention tones. */
|
|
59
57
|
const ATTENTION_TONE_ORDER: Tone[] = [
|
|
@@ -32,9 +32,7 @@ export interface DependencyDraft {
|
|
|
32
32
|
|
|
33
33
|
/** Why a draft cannot be sent, by field: i18n keys under the dialog's errors. */
|
|
34
34
|
export type DependencyDraftError =
|
|
35
|
-
| "
|
|
36
|
-
| "package_invalid"
|
|
37
|
-
| "config_invalid";
|
|
35
|
+
"package_required" | "package_invalid" | "config_invalid";
|
|
38
36
|
|
|
39
37
|
export interface DependencyDraftErrors {
|
|
40
38
|
package?: DependencyDraftError;
|
|
@@ -5,11 +5,7 @@ import { unreadToneWith } from "../../build/components/pages/settings/notificati
|
|
|
5
5
|
|
|
6
6
|
/** Icon well colour a sender may set on a notification. */
|
|
7
7
|
export type NotificationTone =
|
|
8
|
-
| "
|
|
9
|
-
| "primary"
|
|
10
|
-
| "success"
|
|
11
|
-
| "warning"
|
|
12
|
-
| "error";
|
|
8
|
+
"neutral" | "primary" | "success" | "warning" | "error";
|
|
13
9
|
|
|
14
10
|
export interface UserNotification {
|
|
15
11
|
_id: string;
|
package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue
CHANGED
|
@@ -64,11 +64,13 @@ const navigation = computed(() =>
|
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
function sync(): void {
|
|
67
|
-
bridge.post(
|
|
67
|
+
bridge.post(
|
|
68
|
+
mockupPageRender(
|
|
68
69
|
props.page,
|
|
69
70
|
mockupDataTree(props.page, props.realData),
|
|
70
71
|
navigation.value,
|
|
71
|
-
)
|
|
72
|
+
),
|
|
73
|
+
);
|
|
72
74
|
bridge.post(previewInspectMessage(true));
|
|
73
75
|
bridge.post(previewMinHeightMessage(OVERVIEW_MIN_HEIGHT));
|
|
74
76
|
}
|
|
@@ -11,8 +11,10 @@ export type { BlockAction } from "#dms-core/app/entries/types/block-action";
|
|
|
11
11
|
* A button running a target (interface-dms `BannerButtonAction`): the block
|
|
12
12
|
* that offers it runs it on `press`, with its confirmation.
|
|
13
13
|
*/
|
|
14
|
-
export interface BlockButtonAction
|
|
15
|
-
|
|
14
|
+
export interface BlockButtonAction extends Pick<
|
|
15
|
+
CustomButton,
|
|
16
|
+
"label" | "icon" | "target" | "confirm"
|
|
17
|
+
> {
|
|
16
18
|
variant?: ButtonProps["variant"];
|
|
17
19
|
color?: Tone;
|
|
18
20
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { computed, ref, type Ref } from "vue";
|
|
2
2
|
import type { MockupDataMode, MockupPageState } from "../../utils/mockup";
|
|
3
|
-
import {
|
|
4
|
-
mockupPreviewPath,
|
|
5
|
-
readsRealData,
|
|
6
|
-
} from "../../utils/mockupRealData";
|
|
3
|
+
import { mockupPreviewPath, readsRealData } from "../../utils/mockupRealData";
|
|
7
4
|
|
|
8
5
|
/**
|
|
9
6
|
* Whether the page on screen reads its live routes, and the preview frame's
|
package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSectionEditing.ts
CHANGED
|
@@ -17,8 +17,7 @@ export interface EditedSection {
|
|
|
17
17
|
|
|
18
18
|
/** What is being dragged: a page, or a category's section. */
|
|
19
19
|
export type SectionDrag =
|
|
20
|
-
|
|
21
|
-
| { kind: "section"; category: string };
|
|
20
|
+
{ kind: "page"; page: string } | { kind: "section"; category: string };
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Where a drop lands, drawn as a line: before the page `index` of the section
|
|
@@ -147,8 +147,7 @@ function parseSource(value: JsonValue | undefined): SpecSource | undefined {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
type WriteAnswer =
|
|
150
|
-
|
|
151
|
-
| { ok: false; issue: MockupIssue };
|
|
150
|
+
{ ok: true; digest: string } | { ok: false; issue: MockupIssue };
|
|
152
151
|
|
|
153
152
|
function parseWriteAnswer(
|
|
154
153
|
value: JsonValue | undefined,
|
|
@@ -23,8 +23,7 @@ import { type LiveGate, useLiveGate } from "../live/currentPageLive";
|
|
|
23
23
|
export function useRefreshTriggers(
|
|
24
24
|
realtimeTopic: string | string[] | undefined,
|
|
25
25
|
onRefresh:
|
|
26
|
-
| (() =>
|
|
27
|
-
| (() => Parameters<typeof waitForPageBlocksRefresh>[1]),
|
|
26
|
+
(() => void) | (() => Parameters<typeof waitForPageBlocksRefresh>[1]),
|
|
28
27
|
): LiveGate {
|
|
29
28
|
let pageRefresh: Event | undefined;
|
|
30
29
|
const gate = useLiveGate(() => {
|
|
@@ -85,9 +85,7 @@ export function watchFormComponentServerErrors(source: {
|
|
|
85
85
|
state: ReturnType<typeof useForm>["state"];
|
|
86
86
|
serverErrors: Map<string, KeptServerError>;
|
|
87
87
|
target: () =>
|
|
88
|
-
|
|
89
|
-
| null
|
|
90
|
-
| undefined;
|
|
88
|
+
Pick<UnwrapRef<Form<FormSchema>>, "clear" | "loading"> | null | undefined;
|
|
91
89
|
}) {
|
|
92
90
|
watch(
|
|
93
91
|
source.state,
|
|
@@ -40,11 +40,10 @@ export const isRowEvent = (event: unknown): event is RowEvent =>
|
|
|
40
40
|
isRowEventPayload(event.payload) &&
|
|
41
41
|
(isNullish(event.actorId) || isString(event.actorId));
|
|
42
42
|
|
|
43
|
-
interface FormRealtimeSource
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
> {
|
|
43
|
+
interface FormRealtimeSource extends Pick<
|
|
44
|
+
ReturnType<typeof useForm>,
|
|
45
|
+
"resolvedFetchUrl" | "state" | "fetchData" | "submitSucceeded"
|
|
46
|
+
> {
|
|
48
47
|
markFormClean: () => void;
|
|
49
48
|
}
|
|
50
49
|
|
|
@@ -15,11 +15,10 @@ import { validateFormState } from "./formValidation";
|
|
|
15
15
|
import { FORM_CONTROL_ERRORS_KEY } from "./formControlErrors";
|
|
16
16
|
import type { KeptServerError } from "./serverFieldErrors";
|
|
17
17
|
|
|
18
|
-
interface FormValidationSource
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
> {
|
|
18
|
+
interface FormValidationSource extends Pick<
|
|
19
|
+
ReturnType<typeof useForm>,
|
|
20
|
+
"validationSchema" | "allFields" | "state"
|
|
21
|
+
> {
|
|
23
22
|
isFieldRequired: (field: FormField) => boolean;
|
|
24
23
|
processApiMessage: ReturnType<typeof useTranslation>["processApiMessage"];
|
|
25
24
|
locale: () => string;
|
|
@@ -32,8 +32,7 @@ export interface FormValidationIssue {
|
|
|
32
32
|
type StateValue = Parameters<typeof isBlankValue>[0];
|
|
33
33
|
|
|
34
34
|
export type FormValidationResult =
|
|
35
|
-
|
|
36
|
-
| { issues: FormValidationIssue[] };
|
|
35
|
+
{ value: Record<string, StateValue> } | { issues: FormValidationIssue[] };
|
|
37
36
|
|
|
38
37
|
export interface FormValidationContext {
|
|
39
38
|
fields: readonly FormValidationField[];
|
|
@@ -38,8 +38,7 @@ export interface PeriodComparisonChoice {
|
|
|
38
38
|
|
|
39
39
|
/** What a selector keeps in the URL and in the user's preferences. */
|
|
40
40
|
export interface PeriodSelection
|
|
41
|
-
extends PeriodRangeChoice,
|
|
42
|
-
PeriodComparisonChoice {}
|
|
41
|
+
extends PeriodRangeChoice, PeriodComparisonChoice {}
|
|
43
42
|
|
|
44
43
|
/** The menus a selection has to fit in. */
|
|
45
44
|
export interface PeriodChoices {
|
package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplayContext.ts
CHANGED
|
@@ -114,43 +114,41 @@ export function useTableViewDisplayContext<T extends Data>(
|
|
|
114
114
|
if (displayTable.value !== table) displayTable.value = table;
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
const displayContext = computed(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}),
|
|
153
|
-
);
|
|
117
|
+
const displayContext = computed((): TableViewDisplayContext<T> => ({
|
|
118
|
+
items: shownResults.value ?? EMPTY_ITEMS,
|
|
119
|
+
columns: props.columns,
|
|
120
|
+
loading: isListLoading.value,
|
|
121
|
+
firstPageLoading: isFirstPageLoading.value,
|
|
122
|
+
selection: { ids: selectedIds.value, ...displaySelection },
|
|
123
|
+
pagination: {
|
|
124
|
+
pageIndex: paginationState.value.pageIndex,
|
|
125
|
+
pageSize: paginationState.value.pageSize,
|
|
126
|
+
total: data.value?.total ?? 0,
|
|
127
|
+
...displayPagination,
|
|
128
|
+
mode: paginationMode,
|
|
129
|
+
hasMore: hasMoreRows.value,
|
|
130
|
+
loadMore: loadMoreRows,
|
|
131
|
+
},
|
|
132
|
+
actions: {
|
|
133
|
+
canAdd: isActionEnabled(tableProps.value.rowActions?.add),
|
|
134
|
+
canEdit: isActionEnabled(tableProps.value.rowActions?.edit),
|
|
135
|
+
canDelete: isActionEnabled(tableProps.value.rowActions?.delete),
|
|
136
|
+
canDetails: isActionEnabled(tableProps.value.rowActions?.details),
|
|
137
|
+
...displayRowActions,
|
|
138
|
+
},
|
|
139
|
+
presenceByRow: presenceByRowFiltered.value,
|
|
140
|
+
rowIdKey,
|
|
141
|
+
labelKey,
|
|
142
|
+
location,
|
|
143
|
+
query: baseQuery.value,
|
|
144
|
+
componentId,
|
|
145
|
+
pageId,
|
|
146
|
+
options: optionsForDisplay(activeDisplayId.value),
|
|
147
|
+
refresh: refreshByUser,
|
|
148
|
+
setShownRows: setSelfManagedRows,
|
|
149
|
+
reorder: reorderState.value,
|
|
150
|
+
table: displayTable.value,
|
|
151
|
+
}));
|
|
154
152
|
|
|
155
153
|
const contextForSlot = (table: Table<T>): TableViewDisplayContext<T> => {
|
|
156
154
|
captureDisplayTable(table);
|
|
@@ -35,10 +35,7 @@ export interface TableLiveHoldSignals {
|
|
|
35
35
|
|
|
36
36
|
/** Why a table holds its rows by itself, its page staying live. */
|
|
37
37
|
export type TableLiveHoldReason =
|
|
38
|
-
| "
|
|
39
|
-
| "searching"
|
|
40
|
-
| "sorted"
|
|
41
|
-
| "scrolled";
|
|
38
|
+
"rowOpen" | "searching" | "sorted" | "scrolled";
|
|
42
39
|
|
|
43
40
|
/**
|
|
44
41
|
* A table holds by itself for a reason it names, or because the user has its
|
|
@@ -140,10 +140,7 @@ export async function resolveDeepLinkedRow<T>(
|
|
|
140
140
|
* (a refusal, the network) without claiming it is gone.
|
|
141
141
|
*/
|
|
142
142
|
export type DeepLinkOutcome =
|
|
143
|
-
| "
|
|
144
|
-
| "missingPanel"
|
|
145
|
-
| "notify"
|
|
146
|
-
| "notifyFailed";
|
|
143
|
+
"open" | "missingPanel" | "notify" | "notifyFailed";
|
|
147
144
|
|
|
148
145
|
export function deepLinkOutcome(
|
|
149
146
|
found: DeepLinkedRow<unknown>,
|
|
@@ -52,9 +52,7 @@ const meta = computed(() => {
|
|
|
52
52
|
const { pages, source } = props.mockup;
|
|
53
53
|
const parts = [t("dms.mockup.card_pages", { count: pages }, pages)];
|
|
54
54
|
if (source) {
|
|
55
|
-
parts.push(
|
|
56
|
-
t("dms.mockup.card_source", { source: t(SOURCE_KEYS[source]) }),
|
|
57
|
-
);
|
|
55
|
+
parts.push(t("dms.mockup.card_source", { source: t(SOURCE_KEYS[source]) }));
|
|
58
56
|
}
|
|
59
57
|
return parts.join(META_SEPARATOR);
|
|
60
58
|
});
|
|
@@ -103,7 +103,7 @@ function menuEntryOf(
|
|
|
103
103
|
): string | undefined {
|
|
104
104
|
const byId = new Map(pages.map((page) => [page.id, page]));
|
|
105
105
|
const seen = new Set<string>();
|
|
106
|
-
for (let at = id; at !== undefined && !seen.has(at);
|
|
106
|
+
for (let at = id; at !== undefined && !seen.has(at);) {
|
|
107
107
|
const page = byId.get(at);
|
|
108
108
|
if (!page) return undefined;
|
|
109
109
|
if (page.menu !== false) return page.id;
|
|
@@ -35,11 +35,7 @@ export interface MockupCombo {
|
|
|
35
35
|
* reaches the page.
|
|
36
36
|
*/
|
|
37
37
|
export type MockupView =
|
|
38
|
-
| "
|
|
39
|
-
| "version"
|
|
40
|
-
| "overview"
|
|
41
|
-
| "overview_version"
|
|
42
|
-
| "preview";
|
|
38
|
+
"current" | "version" | "overview" | "overview_version" | "preview";
|
|
43
39
|
|
|
44
40
|
const PAGE_VIEWS: readonly MockupView[] = ["current", "version"];
|
|
45
41
|
const OVERVIEW_VIEWS: readonly MockupView[] = ["overview", "overview_version"];
|
|
@@ -45,8 +45,7 @@ interface ResolvedBanner extends BannerContent {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
interface BannerBlockProps
|
|
48
|
-
extends Partial<DefaultComponentProps>,
|
|
49
|
-
BannerContent {
|
|
48
|
+
extends Partial<DefaultComponentProps>, BannerContent {
|
|
50
49
|
/** Route answering a `BannerContent`, or `null` / `{}` / 204 to hide. */
|
|
51
50
|
fetchUrl?: string;
|
|
52
51
|
fetchUrlMethod?: string;
|
|
@@ -137,8 +136,8 @@ const isDismissed = computed(
|
|
|
137
136
|
isClosed.value ||
|
|
138
137
|
Boolean(
|
|
139
138
|
banner.value.dismissible &&
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
storageKey.value &&
|
|
140
|
+
dismissed.value.includes(storageKey.value),
|
|
142
141
|
),
|
|
143
142
|
);
|
|
144
143
|
const isVisible = computed(
|
|
@@ -14,8 +14,10 @@ import type { DefaultComponentProps } from "../../../../dms-core/app/types/compo
|
|
|
14
14
|
import type { BlockText } from "../../../../dms-core/app/types/composed-text";
|
|
15
15
|
import { isComposedText } from "../../../../dms-core/app/utils/composedText";
|
|
16
16
|
|
|
17
|
-
interface KeyValueListBlockItem
|
|
18
|
-
|
|
17
|
+
interface KeyValueListBlockItem extends Omit<
|
|
18
|
+
KeyValueItem,
|
|
19
|
+
"label" | "value" | "detail"
|
|
20
|
+
> {
|
|
19
21
|
label: BlockText;
|
|
20
22
|
value?: BlockText | number | null;
|
|
21
23
|
detail?: BlockText;
|
|
@@ -13,8 +13,10 @@ import { useComposedText } from "../../../../dms-core/app/composables/translatio
|
|
|
13
13
|
import type { DefaultComponentProps } from "../../../../dms-core/app/types/component";
|
|
14
14
|
import type { BlockText } from "../../../../dms-core/app/types/composed-text";
|
|
15
15
|
|
|
16
|
-
interface StatGroupBlockItem
|
|
17
|
-
|
|
16
|
+
interface StatGroupBlockItem extends Omit<
|
|
17
|
+
StatGroupItem,
|
|
18
|
+
"eyebrow" | "value" | "detail"
|
|
19
|
+
> {
|
|
18
20
|
eyebrow: BlockText;
|
|
19
21
|
value: BlockText | number;
|
|
20
22
|
detail?: BlockText;
|
|
@@ -93,9 +93,8 @@ const sizeStyle = computed(() => {
|
|
|
93
93
|
async function loadHighlighter(): Promise<void> {
|
|
94
94
|
const requested = language.value;
|
|
95
95
|
highlight.value = null;
|
|
96
|
-
const { loadCodeHighlighter } =
|
|
97
|
-
"../../build/utils/codeHighlight"
|
|
98
|
-
);
|
|
96
|
+
const { loadCodeHighlighter } =
|
|
97
|
+
await import("../../build/utils/codeHighlight");
|
|
99
98
|
const highlighter = await loadCodeHighlighter(requested);
|
|
100
99
|
if (language.value === requested) highlight.value = highlighter;
|
|
101
100
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { ComponentPublicInstance, UnwrapRef } from "vue";
|
|
3
|
+
import type { Form, FormSchema } from "@nuxt/ui";
|
|
2
4
|
import { pageLink } from "../../build/composables/page/pageUrlValues";
|
|
3
5
|
import type { FormProps } from "../../composables/form/types/props";
|
|
4
6
|
import type { FormField } from "../../composables/form/types/field";
|
|
@@ -67,7 +69,9 @@ import DmsFormSections from "../../build/components/form/FormSections.vue";
|
|
|
67
69
|
import { isHiddenOnCreate } from "../../build/composables/form/createFormFields";
|
|
68
70
|
|
|
69
71
|
const props = defineProps<FormProps>();
|
|
70
|
-
const form = useTemplateRef
|
|
72
|
+
const form = useTemplateRef<
|
|
73
|
+
ComponentPublicInstance & UnwrapRef<Form<FormSchema>>
|
|
74
|
+
>("form");
|
|
71
75
|
|
|
72
76
|
const inFormContainer = inject("dmsFormContainer", false);
|
|
73
77
|
|
|
@@ -23,8 +23,10 @@ import {
|
|
|
23
23
|
FIELD_TRIGGER_UI,
|
|
24
24
|
} from "../../../build/utils/fieldTrigger";
|
|
25
25
|
|
|
26
|
-
export interface DatePickerProps<
|
|
27
|
-
extends
|
|
26
|
+
export interface DatePickerProps<
|
|
27
|
+
R extends boolean,
|
|
28
|
+
M extends boolean,
|
|
29
|
+
> extends Omit<CalendarProps<R, M>, "modelValue"> {
|
|
28
30
|
/** Id of the trigger, the control a field label points to. */
|
|
29
31
|
id?: string;
|
|
30
32
|
/** Earliest day that can be picked (ISO date). */
|
|
@@ -18,8 +18,10 @@ import {
|
|
|
18
18
|
type ZonedDateTime,
|
|
19
19
|
} from "@internationalized/date";
|
|
20
20
|
|
|
21
|
-
export interface DmsCalendarProps<
|
|
22
|
-
extends
|
|
21
|
+
export interface DmsCalendarProps<
|
|
22
|
+
R extends boolean,
|
|
23
|
+
M extends boolean,
|
|
24
|
+
> extends CalendarProps<R, M> {
|
|
23
25
|
/** Earliest day that can be picked (ISO date). */
|
|
24
26
|
minDate?: string;
|
|
25
27
|
/** Latest day that can be picked (ISO date). */
|
|
@@ -178,8 +178,7 @@ onBeforeUnmount(() => {
|
|
|
178
178
|
v-if="!isReady"
|
|
179
179
|
class="text-highlighted min-h-(--dms-code-min-height) overflow-auto px-3 py-2 font-mono text-[12.5px] whitespace-pre-wrap"
|
|
180
180
|
:class="fill && 'flex-1 contain-size'"
|
|
181
|
-
>{{ model }}</pre
|
|
182
|
-
>
|
|
181
|
+
>{{ model }}</pre>
|
|
183
182
|
<!-- Important: CodeMirror's unlayered `.cm-content { min-height: 100% }`
|
|
184
183
|
outranks a utility, and `min-lines` would never apply. -->
|
|
185
184
|
<div
|
|
@@ -16,12 +16,7 @@ import type { Tone } from "#dms-core/app/types/tone";
|
|
|
16
16
|
* identifier or a figure in the mono font.
|
|
17
17
|
*/
|
|
18
18
|
export type KeyValueType =
|
|
19
|
-
| "
|
|
20
|
-
| "status"
|
|
21
|
-
| "money"
|
|
22
|
-
| "date"
|
|
23
|
-
| "link"
|
|
24
|
-
| "mono";
|
|
19
|
+
"text" | "status" | "money" | "date" | "link" | "mono";
|
|
25
20
|
|
|
26
21
|
export interface KeyValueItem {
|
|
27
22
|
/** Stable key; the position is used without one. */
|
|
@@ -28,8 +28,10 @@ export type ConfirmValues = Record<
|
|
|
28
28
|
* whose texts are already resolved, plus what only a caller in the browser
|
|
29
29
|
* can give (render functions, handlers).
|
|
30
30
|
*/
|
|
31
|
-
export interface ConfirmOptions
|
|
32
|
-
|
|
31
|
+
export interface ConfirmOptions extends Omit<
|
|
32
|
+
ConfirmDialog,
|
|
33
|
+
"params" | "icon" | "secondaryAction"
|
|
34
|
+
> {
|
|
33
35
|
/**
|
|
34
36
|
* A button next to cancel and confirm that leaves the dialog open (a
|
|
35
37
|
* download before removing): its `run` is awaited, the button loading,
|
|
@@ -107,8 +109,7 @@ export interface ConfirmNotice {
|
|
|
107
109
|
|
|
108
110
|
/** What a confirmation handler settles with: nothing, `true`, `false` or a {@link ConfirmPartialOutcome}. */
|
|
109
111
|
export type ConfirmHandlerResult =
|
|
110
|
-
|
|
111
|
-
| Promise<void>;
|
|
112
|
+
Promise<boolean | ConfirmPartialOutcome | undefined> | Promise<void>;
|
|
112
113
|
|
|
113
114
|
/**
|
|
114
115
|
* Resolved by `onConfirm` when the action ran only part of the way (a bulk
|
|
@@ -10,12 +10,7 @@ export type DrawerDirection = "top" | "bottom" | "left" | "right";
|
|
|
10
10
|
|
|
11
11
|
/** Tint of the optional header icon well of a container. */
|
|
12
12
|
export type ContainerColor =
|
|
13
|
-
| "
|
|
14
|
-
| "neutral"
|
|
15
|
-
| "success"
|
|
16
|
-
| "info"
|
|
17
|
-
| "warning"
|
|
18
|
-
| "error";
|
|
13
|
+
"primary" | "neutral" | "success" | "info" | "warning" | "error";
|
|
19
14
|
|
|
20
15
|
/**
|
|
21
16
|
* Options shared by every themed container opened through a public composable.
|
|
@@ -148,8 +143,10 @@ export type ContainerPatch = Partial<
|
|
|
148
143
|
export type DrawerPatch = ContainerPatch & Pick<DrawerOptions, "rowHeader">;
|
|
149
144
|
|
|
150
145
|
/** The handle of a drawer opened with {@link useDrawer}. */
|
|
151
|
-
export interface DrawerInstance<Result = unknown>
|
|
152
|
-
|
|
146
|
+
export interface DrawerInstance<Result = unknown> extends Omit<
|
|
147
|
+
ContainerInstance<Result>,
|
|
148
|
+
"patch"
|
|
149
|
+
> {
|
|
153
150
|
/** Updates the open drawer: its texts, its body, its row header. */
|
|
154
151
|
patch: (options: DrawerPatch) => void;
|
|
155
152
|
}
|
|
@@ -34,8 +34,10 @@ export interface SidePanelTargetOptions {
|
|
|
34
34
|
* `DrawerTargetOptions`): the row options of a side panel, for a drawer
|
|
35
35
|
* opened on a row, and its size.
|
|
36
36
|
*/
|
|
37
|
-
export interface DrawerTargetOptions
|
|
38
|
-
|
|
37
|
+
export interface DrawerTargetOptions extends Omit<
|
|
38
|
+
SidePanelTargetOptions,
|
|
39
|
+
"title"
|
|
40
|
+
> {
|
|
39
41
|
/** Width of a `left` / `right` drawer: a modal's at that size; 600px without one. */
|
|
40
42
|
size?: ModalSize;
|
|
41
43
|
/**
|