@dskripchenko/laravel-admin 1.25.2 → 1.27.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.
- package/dist/api/bootstrap.d.ts +18 -17
- package/dist/api/client.d.ts +12 -11
- package/dist/api/envelope.d.ts +3 -3
- package/dist/api/errors.d.ts +7 -7
- package/dist/components/ScreenPage.vue.d.ts +1 -1
- package/dist/components/auth/LoginForm.vue.d.ts +2 -2
- package/dist/components/auth/LoginPage.vue.d.ts +5 -5
- package/dist/components/auth/index.d.ts +1 -1
- package/dist/components/createComponentRegistry.d.ts +6 -5
- package/dist/components/dashboard/ChartWidget.vue.d.ts +2 -2
- package/dist/components/dashboard/GaugeWidget.vue.d.ts +2 -2
- package/dist/components/dashboard/HeatmapWidget.vue.d.ts +2 -2
- package/dist/components/dashboard/IframeWidget.vue.d.ts +4 -3
- package/dist/components/dashboard/RecentTableWidget.vue.d.ts +4 -3
- package/dist/components/dashboard/StatWidget.vue.d.ts +8 -7
- package/dist/components/dashboard/TableWidget.vue.d.ts +3 -2
- package/dist/components/dashboard/WidgetConfigDialog.vue.d.ts +4 -4
- package/dist/components/dashboard/WidgetRenderer.vue.d.ts +1 -1
- package/dist/components/dashboard/builtin.d.ts +5 -4
- package/dist/components/dashboard/index.d.ts +1 -1
- package/dist/components/dashboard/registry.d.ts +5 -5
- package/dist/components/fields/BuilderField.vue.d.ts +1 -1
- package/dist/components/fields/DateField.vue.d.ts +3 -3
- package/dist/components/fields/GeneratedField.vue.d.ts +3 -3
- package/dist/components/fields/SelectField.vue.d.ts +3 -2
- package/dist/components/fields/TagsField.vue.d.ts +6 -6
- package/dist/components/fields/TranslatableField.vue.d.ts +2 -2
- package/dist/components/fields/WysiwygField.vue.d.ts +2 -2
- package/dist/components/fields/wysiwyg/quill/QuillField.vue.d.ts +3 -3
- package/dist/components/fields/wysiwyg/quill/index.d.ts +3 -3
- package/dist/components/fields/wysiwyg/tinymce/TinymceField.vue.d.ts +6 -5
- package/dist/components/fields/wysiwyg/tinymce/index.d.ts +3 -3
- package/dist/components/import/ImportWizardPage.vue.d.ts +9 -9
- package/dist/components/infolist/BadgeEntry.vue.d.ts +4 -4
- package/dist/components/infolist/InfolistRenderer.vue.d.ts +1 -1
- package/dist/components/infolist/TextEntry.vue.d.ts +3 -3
- package/dist/components/infolist/builtin.d.ts +6 -6
- package/dist/components/infolist/index.d.ts +1 -1
- package/dist/components/infolist/recordContext.d.ts +3 -3
- package/dist/components/infolist/registry.d.ts +7 -7
- package/dist/components/layouts/ColumnsLayout.vue.d.ts +2 -2
- package/dist/components/layouts/RowsLayout.vue.d.ts +1 -1
- package/dist/components/layouts/TabsLayout.vue.d.ts +12 -11
- package/dist/components/notifications/index.d.ts +5 -5
- package/dist/components/profile/ProfilePage.vue.d.ts +3 -3
- package/dist/components/profile/TwoFactorSetup.vue.d.ts +1 -1
- package/dist/components/render/builtin.d.ts +2 -2
- package/dist/components/render/formState.d.ts +18 -15
- package/dist/components/render/index.d.ts +1 -1
- package/dist/components/render/registry.d.ts +9 -9
- package/dist/components/resource/AdminFilterToolbar.vue.d.ts +3 -3
- package/dist/components/resource/AuditTimeline.vue.d.ts +4 -4
- package/dist/components/resource/FilterEditor.d.ts +4 -3
- package/dist/components/resource/InlineEditCell.vue.d.ts +4 -4
- package/dist/components/resource/ResourceFormPage.vue.d.ts +4 -4
- package/dist/components/resource/ResourceIndexPage.vue.d.ts +5 -5
- package/dist/components/resource/ResourceViewPage.vue.d.ts +7 -7
- package/dist/components/resource/cellFormat.d.ts +14 -12
- package/dist/components/resource/index.d.ts +1 -1
- package/dist/components/resource/statusLabel.d.ts +14 -13
- package/dist/components/shell/AdminShell.vue.d.ts +7 -7
- package/dist/components/shell/AdminSidebar.vue.d.ts +7 -7
- package/dist/components/shell/AdminSidebarNode.vue.d.ts +2 -2
- package/dist/components/shell/AdminTopBar.vue.d.ts +2 -2
- package/dist/components/shell/BrandLogo.vue.d.ts +3 -3
- package/dist/components/shell/iconRegistry.d.ts +10 -9
- package/dist/components/shell/index.d.ts +2 -2
- package/dist/composables/useAppReady.d.ts +12 -11
- package/dist/composables/useBrand.d.ts +4 -3
- package/dist/createAdminApp.d.ts +34 -33
- package/dist/formState-DeRZBwWH.js.map +1 -1
- package/dist/formState-yUTD6wAR.cjs.map +1 -1
- package/dist/i18n-BCRWWhHE.cjs +2 -0
- package/dist/i18n-BCRWWhHE.cjs.map +1 -0
- package/dist/i18n-DXndsABq.js +55 -0
- package/dist/i18n-DXndsABq.js.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.mjs +13397 -13376
- package/dist/index.mjs.map +1 -1
- package/dist/quill.cjs.map +1 -1
- package/dist/quill.mjs.map +1 -1
- package/dist/router/builder.d.ts +15 -14
- package/dist/router/guards.d.ts +28 -27
- package/dist/router/index.d.ts +20 -18
- package/dist/stores/auth.d.ts +10 -10
- package/dist/stores/dashboard.d.ts +33 -32
- package/dist/stores/i18n.d.ts +5 -4
- package/dist/stores/index.d.ts +2 -2
- package/dist/stores/locale.d.ts +7 -6
- package/dist/stores/manifest.d.ts +64 -61
- package/dist/stores/menu.d.ts +58 -57
- package/dist/stores/navigation.d.ts +5 -5
- package/dist/stores/notifications.d.ts +5 -4
- package/dist/stores/registry.d.ts +7 -7
- package/dist/stores/resourceForm.d.ts +12 -10
- package/dist/stores/resourceIndex.d.ts +12 -10
- package/dist/stores/screen.d.ts +15 -12
- package/dist/stores/theme.d.ts +4 -3
- package/dist/stores/toast.d.ts +3 -2
- package/dist/style.css +1 -1
- package/dist/tinymce.cjs +1 -1
- package/dist/tinymce.cjs.map +1 -1
- package/dist/tinymce.mjs +1 -1
- package/dist/tinymce.mjs.map +1 -1
- package/dist/types/bootstrap.d.ts +9 -9
- package/package.json +1 -1
- package/dist/i18n-Brm4-uwE.cjs +0 -2
- package/dist/i18n-Brm4-uwE.cjs.map +0 -1
- package/dist/i18n-CoD-_QDg.js +0 -48
- package/dist/i18n-CoD-_QDg.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The public exports of the @dskripchenko/laravel-admin/tinymce subpath.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* A host wires it in like this:
|
|
5
5
|
*
|
|
6
6
|
* import { registerField } from '@dskripchenko/laravel-admin'
|
|
7
7
|
* import { TinymceField } from '@dskripchenko/laravel-admin/tinymce'
|
|
8
8
|
* registerField('wysiwyg', TinymceField)
|
|
9
9
|
*
|
|
10
|
-
* @tinymce/tinymce-vue
|
|
10
|
+
* @tinymce/tinymce-vue and tinymce are peer dependencies; the host installs them itself.
|
|
11
11
|
*/
|
|
12
12
|
export { default as TinymceField } from './TinymceField.vue';
|
|
@@ -5,9 +5,9 @@ interface ColumnHeader {
|
|
|
5
5
|
sample?: string;
|
|
6
6
|
}
|
|
7
7
|
interface Mapping {
|
|
8
|
-
/**
|
|
8
|
+
/** A header from the file. */
|
|
9
9
|
source: string;
|
|
10
|
-
/**
|
|
10
|
+
/** The resource's field name, or null to skip the column. */
|
|
11
11
|
target: string | null;
|
|
12
12
|
}
|
|
13
13
|
interface PreviewRow extends Record<string, unknown> {
|
|
@@ -20,22 +20,22 @@ interface ImportProgress {
|
|
|
20
20
|
total: number;
|
|
21
21
|
}
|
|
22
22
|
interface Props {
|
|
23
|
-
/**
|
|
23
|
+
/** The page's title. */
|
|
24
24
|
title?: string;
|
|
25
|
-
/**
|
|
25
|
+
/** The options of the target-field select on step 2. */
|
|
26
26
|
fieldOptions: Array<{
|
|
27
27
|
value: string;
|
|
28
28
|
label: string;
|
|
29
29
|
}>;
|
|
30
|
-
/**
|
|
30
|
+
/** The headers and the sample from the uploaded file; the host passes them after step 1. */
|
|
31
31
|
headers?: ColumnHeader[];
|
|
32
|
-
/**
|
|
32
|
+
/** The preview rows with their warnings; the host passes them after step 2 is submitted. */
|
|
33
33
|
preview?: PreviewRow[];
|
|
34
|
-
/**
|
|
34
|
+
/** The preview table's columns, passed by the host. */
|
|
35
35
|
previewColumns?: UidTableColumn[];
|
|
36
|
-
/**
|
|
36
|
+
/** The import's final summary. */
|
|
37
37
|
progress?: ImportProgress | null;
|
|
38
|
-
/**
|
|
38
|
+
/** The current step in the externally controlled mode; optional. */
|
|
39
39
|
step?: number;
|
|
40
40
|
}
|
|
41
41
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -3,13 +3,13 @@ interface Props {
|
|
|
3
3
|
name?: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
value?: string | null;
|
|
6
|
-
/**
|
|
6
|
+
/** Maps a value to a variant; without it, the default is used. */
|
|
7
7
|
map?: Record<string, BadgeVariant>;
|
|
8
|
-
/**
|
|
8
|
+
/** The backend's BadgeEntry::colors(): value → variant, an alias of map. */
|
|
9
9
|
colors?: Record<string, BadgeVariant>;
|
|
10
|
-
/**
|
|
10
|
+
/** Maps a value to the label shown — the localization: active → "Active". */
|
|
11
11
|
labels?: Record<string, string>;
|
|
12
|
-
/**
|
|
12
|
+
/** Forces a particular variant. */
|
|
13
13
|
variant?: BadgeVariant;
|
|
14
14
|
}
|
|
15
15
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -2,11 +2,11 @@ interface Props {
|
|
|
2
2
|
name?: string;
|
|
3
3
|
label?: string;
|
|
4
4
|
value?: string | number | null;
|
|
5
|
-
/**
|
|
5
|
+
/** What stands in for an empty value. */
|
|
6
6
|
placeholder?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** Use a monospaced font, for an id or a UUID, say. */
|
|
8
8
|
mono?: boolean;
|
|
9
|
-
/**
|
|
9
|
+
/** The preset formatter: datetime, date, money, boolean or bytes. */
|
|
10
10
|
preset?: string;
|
|
11
11
|
meta?: Record<string, unknown>;
|
|
12
12
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The default bundle, with the minimal set of built-in infolist entries.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* The view page (ResourceViewPage) uses the same type strings as the form page
|
|
5
|
+
* (ResourceFormPage): the backend's Field::fieldType() returns one name in
|
|
6
|
+
* both contexts. So the infolist mapping has to cover the same types
|
|
7
|
+
* registerBuiltinComponents does, falling back to TextEntry for every
|
|
8
|
+
* read-only rendering.
|
|
9
9
|
*/
|
|
10
10
|
export declare function registerBuiltinInfolistEntries(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The composable behind the read-only record context an infolist passes down.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The container — ResourceViewPage — calls `provideRecord(record)`, and the
|
|
5
|
+
* entry components call `useRecord()` to read the values.
|
|
6
6
|
*/
|
|
7
7
|
export declare function provideRecord(record: Record<string, unknown>): void;
|
|
8
8
|
export declare function useRecord(): Record<string, unknown>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The registry of the infolist entry components.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* { type: 'text', name: 'title', label: '
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* It mirrors the field registry, but for a read-only display. The manifest's
|
|
5
|
+
* nodes look like:
|
|
6
|
+
* { type: 'text', name: 'title', label: 'Title', value?: '...' }
|
|
7
|
+
* or come without an explicit `value`, in which case the entry takes
|
|
8
|
+
* `record[name]` from the provided `record`.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* A host registers its own entries through `registerInfolistEntry()` or a
|
|
11
11
|
* `registerInfolistEntries()` bundle.
|
|
12
12
|
*/
|
|
13
13
|
import type { Component } from 'vue';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { LayoutNode } from '../render/LayoutRenderer.vue';
|
|
2
2
|
interface Props {
|
|
3
3
|
items: LayoutNode[];
|
|
4
|
-
/**
|
|
4
|
+
/** The gap between the cells: CSS, a token or pixels. */
|
|
5
5
|
gap?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** How many columns the grid has; 12 by default. */
|
|
7
7
|
cols?: number;
|
|
8
8
|
}
|
|
9
9
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LayoutNode } from '../render/LayoutRenderer.vue';
|
|
2
2
|
interface Props {
|
|
3
3
|
items: LayoutNode[];
|
|
4
|
-
/** CSS
|
|
4
|
+
/** The CSS gap between the items, a token or pixels; --uid-space-md by default. */
|
|
5
5
|
gap?: string;
|
|
6
6
|
}
|
|
7
7
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import type { LayoutNode } from '../render/LayoutRenderer.vue';
|
|
2
2
|
export interface TabNode {
|
|
3
|
-
/**
|
|
3
|
+
/** The tab's unique key; without one, its index is used. */
|
|
4
4
|
key?: string;
|
|
5
|
-
/**
|
|
5
|
+
/** The tab's text. */
|
|
6
6
|
label: string;
|
|
7
7
|
icon?: string | null;
|
|
8
8
|
items: LayoutNode[];
|
|
9
9
|
}
|
|
10
10
|
interface Props {
|
|
11
11
|
items: TabNode[];
|
|
12
|
-
/**
|
|
12
|
+
/** The active tab — its key, or its index when there is no key. */
|
|
13
13
|
active?: string | number;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* The gap between the elements inside a tab.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* A tab panel used to lay its children out with NO stack: the fields ran
|
|
18
|
+
* together at a gap of zero. Inside `Rows` the very same fields breathed
|
|
19
|
+
* (`--uid-space-md`), while on a tab the next field's label stuck to the
|
|
20
|
+
* previous one's hint — it read as one continuous ribbon, with no telling
|
|
21
|
+
* where one field ended and the next began.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* The value is one step above the line rhythm: a tab is a set of sets, and
|
|
24
|
+
* the distance between them should be more noticeable than the distance
|
|
25
|
+
* inside a single field.
|
|
25
26
|
*/
|
|
26
27
|
gap?: string;
|
|
27
28
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The notifications: the topbar's drawer and the full-list page.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The drawer LIVES in `shell/NotificationsDrawer.vue` — that is the one
|
|
5
|
+
* AdminApp draws. For a long time a twin of it sat here under the same name:
|
|
6
|
+
* exported outwards, rendered nowhere. An edit to it went into the void, which
|
|
7
|
+
* is exactly what happened to the link to the full list added in 1.25.1.
|
|
8
8
|
*/
|
|
9
9
|
export { default as NotificationsDrawer } from '../shell/NotificationsDrawer.vue';
|
|
10
10
|
export { default as NotificationsPage } from './NotificationsPage.vue';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
/**
|
|
2
|
+
/** The page's title; "Profile" by default. */
|
|
3
3
|
title?: string;
|
|
4
|
-
/**
|
|
4
|
+
/** The subtitle; taken from the handoff by default. */
|
|
5
5
|
subtitle?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** Which section is active. */
|
|
7
7
|
section?: 'general' | 'security' | 'tokens' | 'sessions' | string;
|
|
8
8
|
}
|
|
9
9
|
declare var __VLS_49: {}, __VLS_60: string, __VLS_61: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The default bundle, with the minimal set of built-in components.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Usage:
|
|
5
5
|
*
|
|
6
6
|
* import { registerBuiltinComponents } from '@dskripchenko/laravel-admin'
|
|
7
7
|
* registerBuiltinComponents()
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The form-state composable: it exposes the state and the errors through
|
|
3
|
+
* provide/inject.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The container — a resource form, a settings page — calls
|
|
6
|
+
* `provideFormState()`, and the field components in the tree call
|
|
7
|
+
* `useFormState()` to read a value and change a field.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
* reactive
|
|
9
|
+
* The state is a reactive proxy that setField mutates by key; the errors are a
|
|
10
|
+
* separate reactive map of field name → string[] messages.
|
|
10
11
|
*/
|
|
11
12
|
export interface FormStateContext {
|
|
12
13
|
state: Record<string, unknown>;
|
|
13
14
|
errors: Record<string, string[]>;
|
|
14
|
-
/**
|
|
15
|
+
/** The form's context: FieldRenderer hides the fields with visibility[mode]=false. */
|
|
15
16
|
mode?: 'create' | 'update' | 'view';
|
|
16
17
|
setField: (name: string, value: unknown) => void;
|
|
17
18
|
getField: (name: string) => unknown;
|
|
@@ -20,19 +21,21 @@ export interface FormStateContext {
|
|
|
20
21
|
clearErrors: () => void;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
+
* Creates the form context and provides it to the descendants.
|
|
24
25
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* The `initial` object given is wrapped into `reactive()`, so the mutations are
|
|
27
|
+
* visible from outside too: the caller owns the state and may read it after a
|
|
28
|
+
* submit.
|
|
27
29
|
*
|
|
28
|
-
* @param initial
|
|
29
|
-
* @param initialErrors
|
|
30
|
-
* ValidationError
|
|
30
|
+
* @param initial The state's initial values.
|
|
31
|
+
* @param initialErrors The initial errors, for a re-render after a
|
|
32
|
+
* ValidationError.
|
|
31
33
|
*/
|
|
32
34
|
export declare function provideFormState(initial?: Record<string, unknown>, initialErrors?: Record<string, string[]>, mode?: 'create' | 'update' | 'view'): FormStateContext;
|
|
33
35
|
/**
|
|
34
|
-
*
|
|
36
|
+
* Returns the form context. It throws when called outside a
|
|
37
|
+
* `provideFormState()`.
|
|
35
38
|
*/
|
|
36
39
|
export declare function useFormState(): FormStateContext;
|
|
37
|
-
/**
|
|
40
|
+
/** The optional form: null when there is none. */
|
|
38
41
|
export declare function tryUseFormState(): FormStateContext | null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The registry of the Vue components behind the JSON-driven rendering.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `layout
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* It holds two maps: one for the `field` types — the inputs and controls — and
|
|
5
|
+
* one for the `layout` types, the containers. LayoutRenderer and FieldRenderer
|
|
6
|
+
* resolve a type through them, and a host project registers its own components
|
|
7
|
+
* with `registerField()` and `registerLayout()`.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* `clearRegistry()`
|
|
9
|
+
* It is a singleton, one registry per admin instance. In tests the pattern is
|
|
10
|
+
* `clearRegistry()` plus `registerField()` in a `beforeEach`.
|
|
11
11
|
*/
|
|
12
12
|
import type { Component } from 'vue';
|
|
13
13
|
export declare const registerField: (type: string, value: Component) => void;
|
|
@@ -18,10 +18,10 @@ export declare const registerLayout: (type: string, value: Component) => void;
|
|
|
18
18
|
export declare const getLayout: (type: string) => Component | null;
|
|
19
19
|
export declare const hasLayout: (type: string) => boolean;
|
|
20
20
|
export declare const listLayouts: () => string[];
|
|
21
|
-
/**
|
|
21
|
+
/** Clears both registries; used by the tests. */
|
|
22
22
|
export declare function clearRegistry(): void;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Registers several components at once.
|
|
25
25
|
*
|
|
26
26
|
* registerComponents({
|
|
27
27
|
* fields: { text: TextField, select: SelectField },
|
|
@@ -12,11 +12,11 @@ interface Props {
|
|
|
12
12
|
filters: FilterDef[];
|
|
13
13
|
values: Record<string, unknown>;
|
|
14
14
|
columns: ColumnDef[];
|
|
15
|
-
/**
|
|
15
|
+
/** The key of the group-by column, when one is chosen. */
|
|
16
16
|
groupBy?: string | null;
|
|
17
|
-
/**
|
|
17
|
+
/** The visibility map behind the column toggle; true means shown. */
|
|
18
18
|
columnVisibility?: Record<string, boolean>;
|
|
19
|
-
/**
|
|
19
|
+
/** Whether to show "Save" — the saved views; the host decides whether the feature is there. */
|
|
20
20
|
enableSavedViews?: boolean;
|
|
21
21
|
}
|
|
22
22
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
/**
|
|
3
|
-
* Eloquent morph
|
|
4
|
-
* null
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* The Eloquent morph class, or the model's FQCN. It may be an empty string
|
|
4
|
+
* or null, in which case the component makes no request and shows an empty
|
|
5
|
+
* state — that way the "change history" block stays visible on the view page
|
|
6
|
+
* even for a resource with no model class.
|
|
7
7
|
*/
|
|
8
8
|
subjectType: string | null;
|
|
9
9
|
subjectId: string | number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* FilterEditor — render
|
|
2
|
+
* FilterEditor — the render function behind one filter's editor.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* It is a module rather than an SFC because the component is purely
|
|
5
|
+
* render-based: it picks a control for the filter.type, with no template and
|
|
6
|
+
* no state.
|
|
6
7
|
*/
|
|
7
8
|
import { type PropType } from 'vue';
|
|
8
9
|
export interface FilterOption {
|
|
@@ -4,13 +4,13 @@ interface Props {
|
|
|
4
4
|
rowId: string | number;
|
|
5
5
|
column: string;
|
|
6
6
|
value: unknown;
|
|
7
|
-
/**
|
|
7
|
+
/** With false a double click does nothing: the cell is read-only. */
|
|
8
8
|
editable?: boolean;
|
|
9
|
-
/**
|
|
9
|
+
/** The kind of editing control. */
|
|
10
10
|
inputType?: InlineInputType;
|
|
11
|
-
/**
|
|
11
|
+
/** For inputType='select': the value → label map. */
|
|
12
12
|
options?: Record<string | number, string>;
|
|
13
|
-
/**
|
|
13
|
+
/** The per-row override map: a column present there with a false value is read-only. */
|
|
14
14
|
rowOverride?: Record<string, boolean>;
|
|
15
15
|
}
|
|
16
16
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
/**
|
|
2
|
+
/** The resource slug: articles, users and so on. */
|
|
3
3
|
slug: string;
|
|
4
|
-
/**
|
|
4
|
+
/** The record id. null/undefined means create mode, a number or string means edit. */
|
|
5
5
|
id?: string | number | null;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Overrides the router route name used to go back after a save or a delete.
|
|
8
|
+
* By default it is derived from the slug: `admin.resource.{slug}.index`.
|
|
9
9
|
*/
|
|
10
10
|
indexRouteName?: string | null;
|
|
11
11
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
/**
|
|
2
|
+
/** Resource slug: users, articles and so on. */
|
|
3
3
|
slug: string;
|
|
4
|
-
/**
|
|
4
|
+
/** Page title. Taken from the manifest when not given. */
|
|
5
5
|
title?: string | null;
|
|
6
|
-
/**
|
|
6
|
+
/** The line under the title, e.g. "Content analytics". */
|
|
7
7
|
subtitle?: string | null;
|
|
8
|
-
/**
|
|
8
|
+
/** Text of the primary “Create” button. */
|
|
9
9
|
createLabel?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** Router route name behind the “Create” action. */
|
|
11
11
|
createRouteName?: string | null;
|
|
12
12
|
}
|
|
13
13
|
declare var __VLS_5: {}, __VLS_79: {}, __VLS_149: {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
slug: string;
|
|
3
3
|
id: string | number;
|
|
4
|
-
/**
|
|
4
|
+
/** The name of the router route leading to the edit page. */
|
|
5
5
|
editRouteName?: string;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Overrides the router route name behind the back link and the return after
|
|
8
|
+
* a delete. By default it is derived from the slug as
|
|
9
|
+
* `admin.resource.{slug}.index`; a host with its own name passes it here.
|
|
10
10
|
*/
|
|
11
11
|
indexRouteName?: string | null;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Overrides the Eloquent morph class. By default it is resolved from
|
|
14
14
|
* `manifest.resources[slug].subject_type` (Resource::meta()).
|
|
15
15
|
*/
|
|
16
16
|
auditSubjectType?: string | null;
|
|
17
|
-
/**
|
|
17
|
+
/** The record's field the status badge is built from; `status` by default. */
|
|
18
18
|
statusField?: string;
|
|
19
|
-
/**
|
|
19
|
+
/** The prefix of the UID label next to the status: 'A-' gives 'A-1284'. */
|
|
20
20
|
uidPrefix?: string;
|
|
21
21
|
}
|
|
22
22
|
declare var __VLS_75: {
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Formats the cell values of ResourceIndexPage.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* - text → as
|
|
6
|
-
* - date → 'd.m.Y'
|
|
7
|
-
* - datetime → 'd.m.Y H:i:s'
|
|
8
|
-
* - money → '{value} {currency}'
|
|
9
|
-
* - boolean → trueLabel
|
|
10
|
-
* - badge →
|
|
11
|
-
*
|
|
12
|
-
* -
|
|
4
|
+
* The backend's TableColumn presets:
|
|
5
|
+
* - text → as it is, a string.
|
|
6
|
+
* - date → 'd.m.Y' by default.
|
|
7
|
+
* - datetime → 'd.m.Y H:i:s' by default.
|
|
8
|
+
* - money → '{value} {currency}', with decimals.
|
|
9
|
+
* - boolean → the trueLabel or falseLabel from the meta.
|
|
10
|
+
* - badge → the text; the styling happens in the UI, through a slot or
|
|
11
|
+
* a CSS class.
|
|
12
|
+
* - bytes → a human-readable size.
|
|
13
|
+
* - text → the fallback.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
* datetime
|
|
15
|
+
* Columns with no explicit preset are formatted automatically: a value that
|
|
16
|
+
* looks like an ISO datetime — the column ends in `_at`, or the string carries
|
|
17
|
+
* T...Z — gets the default datetime format.
|
|
16
18
|
*/
|
|
17
19
|
export type CellPreset = 'text' | 'date' | 'datetime' | 'money' | 'boolean' | 'badge' | 'bytes';
|
|
18
20
|
export interface CellMeta {
|