@dskripchenko/laravel-admin 1.26.0 → 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.map +1 -1
- package/dist/i18n-DXndsABq.js.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.mjs +3789 -3774
- 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.map +1 -1
- package/dist/tinymce.mjs.map +1 -1
- package/dist/types/bootstrap.d.ts +9 -9
- package/package.json +1 -1
package/dist/api/bootstrap.d.ts
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Loads the bootstrap payload into the SPA.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* - 'inline'
|
|
6
|
-
*
|
|
7
|
-
* - 'xhr'
|
|
4
|
+
* Both strategies work:
|
|
5
|
+
* - 'inline' reads window.__ADMIN_BOOTSTRAP__, injected by shell.blade when
|
|
6
|
+
* the strategy is inline.
|
|
7
|
+
* - 'xhr' fetches /api/admin/system/bootstrap.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* When neither yields anything it throws, and the SPA is expected to catch
|
|
10
|
+
* that and show a full-screen error.
|
|
11
11
|
*/
|
|
12
12
|
import type { AdminBootstrap } from '../types/bootstrap';
|
|
13
13
|
import type { AdminClient } from './client';
|
|
14
14
|
export interface LoadBootstrapOptions {
|
|
15
|
-
/**
|
|
15
|
+
/** When a client is given, the xhr fallback goes through it. */
|
|
16
16
|
client?: AdminClient;
|
|
17
|
-
/**
|
|
17
|
+
/** Overrides the xhr's URL; '/system/bootstrap' by default. */
|
|
18
18
|
xhrUrl?: string;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Returns the bootstrap, or null when it could not be loaded.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
* 1. window.__ADMIN_BOOTSTRAP__
|
|
25
|
-
* 2. xhr fetch
|
|
26
|
-
* 3. null — caller
|
|
23
|
+
* In order:
|
|
24
|
+
* 1. window.__ADMIN_BOOTSTRAP__, the inline strategy.
|
|
25
|
+
* 2. an xhr fetch, when a client was given.
|
|
26
|
+
* 3. null — and the caller decides what to do, such as showing an error
|
|
27
|
+
* screen.
|
|
27
28
|
*/
|
|
28
29
|
export declare function loadBootstrap(opts?: LoadBootstrapOptions): Promise<AdminBootstrap | null>;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* Reads the bootstrap off window; in a browser context alone.
|
|
31
32
|
*/
|
|
32
33
|
export declare function readInlineBootstrap(): AdminBootstrap | null;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Reads the CSRF token from the meta tag Blade injects with `csrf_token()`.
|
|
35
36
|
*
|
|
36
|
-
*
|
|
37
|
+
* It is the fallback for when bootstrap.csrf is missing.
|
|
37
38
|
*/
|
|
38
39
|
export declare function readCsrfFromMeta(): string | null;
|
package/dist/api/client.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The axios client of the admin API.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* - baseURL
|
|
6
|
-
* - X-XSRF-TOKEN
|
|
7
|
-
* - X-CSRF-TOKEN
|
|
8
|
-
* - X-Admin-Locale
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
4
|
+
* What it does:
|
|
5
|
+
* - takes its baseURL from bootstrap.apiUrl, unless one is passed explicitly.
|
|
6
|
+
* - adds X-XSRF-TOKEN automatically from the cookie (Laravel's Sanctum/web).
|
|
7
|
+
* - falls back to X-CSRF-TOKEN from meta[name=csrf-token], injected by Blade.
|
|
8
|
+
* - sets X-Admin-Locale whenever there is a current locale.
|
|
9
|
+
* - unwraps the envelope in a response interceptor and throws an ApiError.
|
|
10
|
+
* - calls the onUnauthenticated callback on a 401, leaving the redirect to
|
|
11
|
+
* the login to the consumer.
|
|
11
12
|
*/
|
|
12
13
|
import { type AxiosInstance, type AxiosRequestConfig } from 'axios';
|
|
13
14
|
export interface ClientOptions {
|
|
14
15
|
baseURL: string;
|
|
15
16
|
csrfToken?: string;
|
|
16
17
|
locale?: string;
|
|
17
|
-
/**
|
|
18
|
+
/** Called on a 401; usually a push to /admin/login. */
|
|
18
19
|
onUnauthenticated?: () => void;
|
|
19
20
|
}
|
|
20
21
|
export interface AdminClient {
|
|
21
|
-
/**
|
|
22
|
+
/** The raw axios instance, for the odd special case. */
|
|
22
23
|
raw: AxiosInstance;
|
|
23
24
|
get<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
24
25
|
post<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
|
|
@@ -26,7 +27,7 @@ export interface AdminClient {
|
|
|
26
27
|
patch<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
|
|
27
28
|
delete<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
28
29
|
setLocale(locale: string): void;
|
|
29
|
-
/**
|
|
30
|
+
/** Removes the pinned X-Admin-Locale, leaving the locale to the server. */
|
|
30
31
|
clearLocale(): void;
|
|
31
32
|
}
|
|
32
33
|
export declare function createAdminClient(opts: ClientOptions): AdminClient;
|
package/dist/api/envelope.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The response contract of laravel-api: every body is `{success, payload}`.
|
|
3
3
|
*
|
|
4
4
|
* Success: `{success: true, payload: {...}}`
|
|
5
5
|
* Error: `{success: false, payload: {errorKey, message, ...}}`
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* The helpers here exist to narrow the types on the consumer's side.
|
|
8
8
|
*/
|
|
9
9
|
export interface SuccessEnvelope<T = unknown> {
|
|
10
10
|
success: true;
|
|
@@ -15,7 +15,7 @@ export interface ErrorEnvelope {
|
|
|
15
15
|
payload: {
|
|
16
16
|
errorKey: string;
|
|
17
17
|
message: string;
|
|
18
|
-
/**
|
|
18
|
+
/** The per-field errors: `errors` is laravel-api's shape, `messages` is the admin's. */
|
|
19
19
|
messages?: Record<string, string[]>;
|
|
20
20
|
errors?: Record<string, string[]>;
|
|
21
21
|
[key: string]: unknown;
|
package/dist/api/errors.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The admin API's own error classes.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Every API error is thrown as an ApiError or one of its subclasses, so a
|
|
5
|
+
* consumer can use `instanceof ValidationError` to handle a particular case.
|
|
6
6
|
*/
|
|
7
7
|
import type { ErrorEnvelope } from './envelope';
|
|
8
8
|
export declare class ApiError extends Error {
|
|
@@ -24,17 +24,17 @@ export declare class ValidationError extends ApiError {
|
|
|
24
24
|
/** Field-keyed map of error messages. */
|
|
25
25
|
readonly fields: Record<string, string[]>;
|
|
26
26
|
constructor(payload: ErrorEnvelope['payload']);
|
|
27
|
-
/**
|
|
27
|
+
/** The field's first message — handy for a toast. */
|
|
28
28
|
firstFieldMessage(): string | null;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* A network failure — the server was never reached. It is a class of its own
|
|
32
|
+
* so that the UI can say "No connection" rather than "500 Server Error".
|
|
33
33
|
*/
|
|
34
34
|
export declare class NetworkError extends Error {
|
|
35
35
|
constructor(message?: string);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Turns an HTTP status and an envelope into the right ApiError subclass.
|
|
39
39
|
*/
|
|
40
40
|
export declare function toApiError(status: number, payload: ErrorEnvelope['payload']): ApiError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
/**
|
|
2
|
+
/** The screen's slug; when null it comes from route.params.slug. */
|
|
3
3
|
slug?: string | null;
|
|
4
4
|
}
|
|
5
5
|
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
|
interface Props {
|
|
2
|
-
/**
|
|
2
|
+
/** The "Forgot your password?" URL; when set, a link appears to the right of remember. */
|
|
3
3
|
forgotUrl?: string | null;
|
|
4
|
-
/**
|
|
4
|
+
/** The SSO link's text, or null to hide it. */
|
|
5
5
|
ssoLinkLabel?: string | null;
|
|
6
6
|
ssoUrl?: string | null;
|
|
7
7
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
brandName?: string;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* host
|
|
4
|
+
* A custom mark; when set it is rendered instead of BrandLogo. Useful to a
|
|
5
|
+
* host with a brand of its own.
|
|
6
6
|
*/
|
|
7
7
|
brandMark?: string | null;
|
|
8
8
|
brandLogo?: string | null;
|
|
9
9
|
homeRouteName?: string;
|
|
10
10
|
redirectQueryKey?: string;
|
|
11
|
-
/**
|
|
11
|
+
/** The "Forgot your password?" URL, passed on to LoginForm. */
|
|
12
12
|
forgotUrl?: string | null;
|
|
13
|
-
/** SSO
|
|
13
|
+
/** The SSO link — a label and a url — passed on to LoginForm. */
|
|
14
14
|
ssoLinkLabel?: string | null;
|
|
15
15
|
ssoUrl?: string | null;
|
|
16
|
-
/**
|
|
16
|
+
/** Whether to show the theme and locale toggles in the corner. */
|
|
17
17
|
showCornerActions?: boolean;
|
|
18
18
|
}
|
|
19
19
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* infolist entries
|
|
2
|
+
* The generic factory of the component registries: fields, layouts, widgets,
|
|
3
|
+
* infolist entries and the rest.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Every component registry in the admin is essentially the same thing — a
|
|
6
|
+
* keyed Map<string, Component> plus register, get, has, list, clear and
|
|
7
|
+
* registerBundle. This factory captures the pattern once, and the individual
|
|
8
|
+
* modules merely rename the exports.
|
|
8
9
|
*
|
|
9
10
|
* const reg = createComponentRegistry<Component>()
|
|
10
11
|
* export const registerWidget = reg.register
|
|
@@ -5,8 +5,8 @@ interface ChartDataset {
|
|
|
5
5
|
}
|
|
6
6
|
interface ChartData {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* The backend's ChartWidget::data() returns `chartType`. The older wrapper
|
|
9
|
+
* read `type`, which stays as a fallback for compatibility.
|
|
10
10
|
*/
|
|
11
11
|
chartType?: string;
|
|
12
12
|
type?: string;
|
|
@@ -8,8 +8,8 @@ interface Props {
|
|
|
8
8
|
size?: number;
|
|
9
9
|
ranges?: GaugeRange[];
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* The backend's GaugeWidget::data() returns `thresholds`, which matches
|
|
12
|
+
* UidGauge.ranges ({from, to, color}) structurally. Both names are accepted.
|
|
13
13
|
*/
|
|
14
14
|
thresholds?: GaugeRange[];
|
|
15
15
|
unit?: string;
|
|
@@ -3,9 +3,9 @@ interface Props {
|
|
|
3
3
|
rows?: string[];
|
|
4
4
|
cols?: string[];
|
|
5
5
|
matrix?: number[][];
|
|
6
|
-
/**
|
|
6
|
+
/** How the value is formatted in the hover label. */
|
|
7
7
|
formatValue?: (v: number, row: string, col: string) => string;
|
|
8
|
-
/** CSS
|
|
8
|
+
/** The cell's CSS colour; the accent token by default. */
|
|
9
9
|
color?: string;
|
|
10
10
|
}
|
|
11
11
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The backend's IframeWidget::data() gives {src, height, sandbox}. Validating
|
|
3
|
+
* the src against the allowed hosts is the host's business; the sandbox
|
|
4
|
+
* attribute is passed through as it is, and the backend's default is
|
|
5
|
+
* allow-scripts allow-same-origin.
|
|
5
6
|
*/
|
|
6
7
|
interface Props {
|
|
7
8
|
title?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type UidTableColumn } from '@dskripchenko/ui';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* The backend's RecentListWidget::data() returns the columns as
|
|
4
|
+
* `[{column, label}]` while UidTable expects `{key, label}`, so they are
|
|
5
|
+
* converted here.
|
|
5
6
|
*/
|
|
6
7
|
interface BackendColumn {
|
|
7
8
|
column?: string;
|
|
@@ -14,7 +15,7 @@ interface Props {
|
|
|
14
15
|
columns?: Array<BackendColumn | UidTableColumn>;
|
|
15
16
|
rows?: Record<string, unknown>[];
|
|
16
17
|
emptyText?: string;
|
|
17
|
-
/**
|
|
18
|
+
/** The resource slug from RecentListWidget::linkTo(); a click on a row opens that record. */
|
|
18
19
|
linkTo?: string | null;
|
|
19
20
|
}
|
|
20
21
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
type SemanticTone = 'neutral' | 'positive' | 'negative' | 'warning' | 'info';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* change: {delta, direction}, color, icon}]`.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* The backend's StatsOverviewWidget::data() returns an array of
|
|
4
|
+
* `stats: [{label, value, change: {delta, direction}, color, icon}]`. This
|
|
5
|
+
* StatWidget takes the first stat and renders a UidStat; several stats in one
|
|
6
|
+
* widget are not supported yet, and a host that needs them declares several
|
|
7
|
+
* StatWidgets.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* It also works with the older scalar values, where the widget sent `value`
|
|
10
|
+
* directly, but stats[0] wins.
|
|
10
11
|
*/
|
|
11
12
|
interface StatChange {
|
|
12
13
|
delta?: number;
|
|
@@ -25,7 +26,7 @@ interface Props {
|
|
|
25
26
|
title?: string;
|
|
26
27
|
/** Backend payload from StatsOverviewWidget. */
|
|
27
28
|
stats?: StatItem[];
|
|
28
|
-
/**
|
|
29
|
+
/** The older scalar value, for a host that passes it outside the array. */
|
|
29
30
|
value?: number | string;
|
|
30
31
|
prefix?: string;
|
|
31
32
|
suffix?: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type CellMeta } from '../resource/cellFormat';
|
|
2
2
|
/**
|
|
3
3
|
* Backend TableWidget::data() — {rows, columns[TableColumn::toArray]}:
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* the columns come in the resource format ({name, label, preset, meta…}), so
|
|
5
|
+
* the cells are formatted by the same formatCell as a resource list uses —
|
|
6
|
+
* dates, money, booleans.
|
|
6
7
|
*/
|
|
7
8
|
interface BackendColumn {
|
|
8
9
|
name: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { WidgetLayoutItem } from '../../stores/dashboard';
|
|
2
2
|
interface Props {
|
|
3
3
|
open: boolean;
|
|
4
|
-
/** 'add'
|
|
4
|
+
/** 'add' picks a type; 'configure' edits an existing widget. */
|
|
5
5
|
mode?: 'add' | 'configure';
|
|
6
|
-
/**
|
|
6
|
+
/** The initial state of the configure mode: slug, type, size and config. */
|
|
7
7
|
item?: WidgetLayoutItem | null;
|
|
8
|
-
/**
|
|
8
|
+
/** The widget's title when the dialog opened; in configure mode it comes from the manifest. */
|
|
9
9
|
initialTitle?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** The dashboard's hidden widgets, offered for restoring. */
|
|
11
11
|
restorable?: Array<{
|
|
12
12
|
slug: string;
|
|
13
13
|
title: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The default bundle, with the minimal set of built-in widget types.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Registers the built-in widget components and the backend's aliases. The
|
|
6
|
+
* names on the left match what the backend's Widget::widgetType() returns —
|
|
7
|
+
* `stats`, `chart`, `recent_list` and so on — and on the right stands the Vue
|
|
8
|
+
* component.
|
|
8
9
|
*/
|
|
9
10
|
export declare function registerBuiltinWidgets(): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The registry of the dashboard widget components.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* A dashboard's manifest nodes look like this:
|
|
5
5
|
* {
|
|
6
6
|
* slug: 'main',
|
|
7
|
-
* label: '
|
|
7
|
+
* label: 'Main',
|
|
8
8
|
* widgets: [
|
|
9
|
-
* { type: 'stat', name: 'total', title: '
|
|
9
|
+
* { type: 'stat', name: 'total', title: 'Total', value: 1284,
|
|
10
10
|
* span: 3, trend: 12 },
|
|
11
11
|
* { type: 'bar-chart', span: 8, ... },
|
|
12
12
|
* { type: 'recent-table', span: 8, columns: [...], rows: [...] },
|
|
13
13
|
* ]
|
|
14
14
|
* }
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* A host registers its own widgets through `registerWidget()` or a
|
|
17
17
|
* `registerWidgets()` bundle.
|
|
18
18
|
*/
|
|
19
19
|
import type { Component } from 'vue';
|
|
@@ -10,7 +10,7 @@ interface Props {
|
|
|
10
10
|
label?: string | null;
|
|
11
11
|
help?: string | null;
|
|
12
12
|
required?: boolean;
|
|
13
|
-
/** name =>
|
|
13
|
+
/** name => the block's definition; see Builder::block. */
|
|
14
14
|
blocks?: Record<string, BlockDef>;
|
|
15
15
|
maxBlocks?: number | null;
|
|
16
16
|
reorderable?: boolean;
|
|
@@ -4,9 +4,9 @@ interface Props {
|
|
|
4
4
|
help?: string | null;
|
|
5
5
|
required?: boolean;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* UidDatePicker
|
|
9
|
-
*
|
|
7
|
+
* The input's type: 'date' by default, or 'datetime-local' or 'time'.
|
|
8
|
+
* UidDatePicker handles the format through its own props inside; the prop
|
|
9
|
+
* stays for compatibility with the older API.
|
|
10
10
|
*/
|
|
11
11
|
inputType?: 'date' | 'datetime-local' | 'time';
|
|
12
12
|
min?: string | null;
|
|
@@ -5,11 +5,11 @@ interface Props {
|
|
|
5
5
|
required?: boolean;
|
|
6
6
|
placeholder?: string | null;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
/**
|
|
8
|
+
/** The generated string's length. */
|
|
9
9
|
length?: number;
|
|
10
|
-
/**
|
|
10
|
+
/** The alphabet it is drawn from. */
|
|
11
11
|
charset?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Whether to generate on mount when the value is empty. */
|
|
13
13
|
autogenerate?: boolean;
|
|
14
14
|
}
|
|
15
15
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -12,8 +12,9 @@ interface Props {
|
|
|
12
12
|
placeholder?: string | null;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
* Read-only
|
|
16
|
-
*
|
|
15
|
+
* Read-only: the backend may mark a Select with `->readonly()`. UidSelect
|
|
16
|
+
* does not tell readonly from disabled, so we map it to disabled, which
|
|
17
|
+
* looks the same.
|
|
17
18
|
*/
|
|
18
19
|
readonly?: boolean;
|
|
19
20
|
searchable?: boolean;
|
|
@@ -8,18 +8,18 @@ interface Props {
|
|
|
8
8
|
help?: string | null;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
placeholder?: string | null;
|
|
11
|
-
/**
|
|
11
|
+
/** A flat list of suggestions, kept for compatibility. */
|
|
12
12
|
suggestions?: string[];
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Grouped suggestions. When they are set, the dropdown is rendered with
|
|
15
|
+
* group headings; they take precedence over `suggestions`.
|
|
16
16
|
*/
|
|
17
17
|
suggestionsByGroup?: SuggestionGroup[];
|
|
18
|
-
/**
|
|
18
|
+
/** The maximum number of tags. */
|
|
19
19
|
maxItems?: number;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* An additional separator besides Enter, such as `,` or `;`. Typing one of
|
|
22
|
+
* these turns whatever precedes it into a chip.
|
|
23
23
|
*/
|
|
24
24
|
separator?: string;
|
|
25
25
|
disabled?: boolean;
|
|
@@ -4,9 +4,9 @@ interface Props {
|
|
|
4
4
|
help?: string | null;
|
|
5
5
|
required?: boolean;
|
|
6
6
|
placeholder?: string | null;
|
|
7
|
-
/**
|
|
7
|
+
/** Overrides the available locales; locale.available by default. */
|
|
8
8
|
locales?: string[];
|
|
9
|
-
/**
|
|
9
|
+
/** Use a textarea instead of an input, for the long fields: body, description. */
|
|
10
10
|
multiline?: boolean;
|
|
11
11
|
rows?: number;
|
|
12
12
|
disabled?: boolean;
|
|
@@ -6,9 +6,9 @@ interface Props {
|
|
|
6
6
|
required?: boolean;
|
|
7
7
|
placeholder?: string | null;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
-
/**
|
|
9
|
+
/** The editor area's minimum height. */
|
|
10
10
|
minHeight?: string;
|
|
11
|
-
/**
|
|
11
|
+
/** The maximum height; past it the area overflows. */
|
|
12
12
|
maxHeight?: string;
|
|
13
13
|
}
|
|
14
14
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -5,11 +5,11 @@ interface Props {
|
|
|
5
5
|
required?: boolean;
|
|
6
6
|
placeholder?: string | null;
|
|
7
7
|
/**
|
|
8
|
-
* Quill toolbar
|
|
9
|
-
*
|
|
8
|
+
* Quill's toolbar configuration. It takes `'essential' | 'minimal' | 'full'`
|
|
9
|
+
* or a raw array of groups.
|
|
10
10
|
*/
|
|
11
11
|
toolbar?: string | unknown[];
|
|
12
|
-
/** 'snow'
|
|
12
|
+
/** 'snow' — the default toolbar; 'bubble' — inline; 'core' — no UI at all. */
|
|
13
13
|
theme?: 'snow' | 'bubble' | 'core';
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The public exports of the @dskripchenko/laravel-admin/quill 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 { QuillField } from '@dskripchenko/laravel-admin/quill'
|
|
8
8
|
* registerField('wysiwyg', QuillField)
|
|
9
9
|
*
|
|
10
|
-
* @vueup/vue-quill
|
|
10
|
+
* @vueup/vue-quill and quill are peer dependencies; the host installs them itself.
|
|
11
11
|
*/
|
|
12
12
|
export { default as QuillField } from './QuillField.vue';
|
|
@@ -4,17 +4,18 @@ interface Props {
|
|
|
4
4
|
help?: string | null;
|
|
5
5
|
required?: boolean;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* The TinyMCE init configuration: height, plugins, toolbar, menubar,
|
|
8
|
+
* language and so on. It is merged with the host's defaults on the frontend.
|
|
9
9
|
*/
|
|
10
10
|
init?: Record<string, unknown>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* The licence key for TinyMCE 7 and later; null means the self-hosted GPL
|
|
13
|
+
* route.
|
|
13
14
|
*/
|
|
14
15
|
apiKey?: string | null;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* The handler behind image uploads; see images_upload_handler in TinyMCE's
|
|
18
|
+
* documentation. By default it uses the core admin's upload endpoint.
|
|
18
19
|
*/
|
|
19
20
|
imageUploadUrl?: string;
|
|
20
21
|
disabled?: boolean;
|