@dskripchenko/laravel-admin 1.36.0 → 1.38.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/.vite/manifest.json +2 -2
- package/dist/api/client.d.ts +6 -1
- package/dist/assets/{app-w16kkVES.css → app-BISopiIN.css} +1 -1
- package/dist/assets/app-DL-8fHEv.js +43 -0
- package/dist/components/dashboard/TableWidget.test.d.ts +1 -0
- package/dist/components/fields/BuilderField.vue.d.ts +1 -1
- package/dist/components/fields/CascaderField.vue.d.ts +1 -1
- package/dist/components/fields/CodeField.vue.d.ts +2 -2
- package/dist/components/fields/ColorField.vue.d.ts +2 -2
- package/dist/components/fields/ComboboxField.vue.d.ts +1 -1
- package/dist/components/fields/DateField.vue.d.ts +9 -2
- package/dist/components/fields/DateRangeField.vue.d.ts +1 -1
- package/dist/components/fields/MarkdownField.vue.d.ts +1 -1
- package/dist/components/fields/MorphSwitcherField.vue.d.ts +1 -1
- package/dist/components/fields/NumberField.vue.d.ts +1 -1
- package/dist/components/fields/RadioField.vue.d.ts +1 -1
- package/dist/components/fields/RatingField.vue.d.ts +1 -1
- package/dist/components/fields/ResourcePickerField.vue.d.ts +1 -1
- package/dist/components/fields/SelectField.vue.d.ts +1 -1
- package/dist/components/fields/SliderField.vue.d.ts +1 -1
- package/dist/components/fields/SlugField.test.d.ts +1 -0
- package/dist/components/fields/SlugField.vue.d.ts +26 -0
- package/dist/components/fields/SwitchField.vue.d.ts +24 -0
- package/dist/components/fields/TagsField.vue.d.ts +1 -1
- package/dist/components/fields/TextAreaField.vue.d.ts +1 -1
- package/dist/components/fields/TextField.vue.d.ts +1 -1
- package/dist/components/fields/TimeField.vue.d.ts +1 -1
- package/dist/components/fields/TreeSelectField.vue.d.ts +1 -1
- package/dist/components/fields/dateTimeSwitch.test.d.ts +1 -0
- package/dist/components/fields/support/dateTime.d.ts +23 -0
- package/dist/components/fields/support/markdown.d.ts +51 -12
- package/dist/components/fields/support/markdown.test.d.ts +1 -0
- package/dist/components/fields/support/slugify.d.ts +1 -0
- package/dist/components/layouts/CodeLayout.vue.d.ts +17 -0
- package/dist/components/layouts/MarkdownCodeLayout.test.d.ts +1 -0
- package/dist/components/layouts/MarkdownLayout.vue.d.ts +21 -0
- package/dist/components/profile/ProfilePage.vue.d.ts +3 -3
- package/dist/components/render/index.d.ts +5 -0
- package/dist/components/resource/cellFormat.d.ts +21 -2
- package/dist/components/shell/iconRegistry.test.d.ts +1 -0
- package/dist/index.cjs +23 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +15876 -15188
- package/dist/index.mjs.map +1 -1
- package/dist/router/guards.d.ts +8 -1
- package/dist/source-hash.txt +1 -1
- package/dist/stores/auth.d.ts +66 -3
- package/dist/stores/locale.d.ts +3 -1
- package/dist/stores/screen.d.ts +4 -1
- package/dist/stores/toast.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/types/bootstrap.d.ts +23 -0
- package/package.json +1 -1
- package/dist/assets/app-Ce9-9CTP.js +0 -29
package/dist/router/guards.d.ts
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* /login with ?redirect=...
|
|
7
7
|
* 2. When the user has a pendingChallenge (2FA), every protected route
|
|
8
8
|
* redirects to /login, where the challenge form lives.
|
|
9
|
-
* 3.
|
|
9
|
+
* 3. A user who must enable 2FA (twoFactorRequired) and has not is kept on
|
|
10
|
+
* the profile's security section.
|
|
11
|
+
* 4. When route.meta.permissions is set, hasAnyPermission() decides; none of
|
|
10
12
|
* them means /forbidden (or the route named 'admin.forbidden').
|
|
11
13
|
*
|
|
12
14
|
* The guards use useAuthStore but never touch the client directly: everything
|
|
@@ -32,6 +34,11 @@ export interface AuthGuardOptions {
|
|
|
32
34
|
* the login; 'redirect' by default.
|
|
33
35
|
*/
|
|
34
36
|
redirectQueryKey?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The profile route, where a user who must enable 2FA is kept until they do;
|
|
39
|
+
* 'admin.profile' by default.
|
|
40
|
+
*/
|
|
41
|
+
profileRouteName?: string;
|
|
35
42
|
}
|
|
36
43
|
/**
|
|
37
44
|
* Creates the beforeEach guard. Pinia must be the active instance by the time
|
package/dist/source-hash.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d28b9b62d39254387bed5ce83aa321dcc8ee3b37acac3485c83b560dac5a8632
|
package/dist/stores/auth.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 2. The UI shows the 2FA form. twoFactorChallenge(code) or
|
|
13
13
|
* twoFactorRecovery(recovery_code) completes the login.
|
|
14
14
|
*/
|
|
15
|
-
import type { AdminUser, AdminBootstrap } from '../types/bootstrap';
|
|
15
|
+
import type { AdminUser, AdminBootstrap, AdminDemo } from '../types/bootstrap';
|
|
16
16
|
export interface PendingChallenge {
|
|
17
17
|
challengeToken: string;
|
|
18
18
|
remember: boolean;
|
|
@@ -31,6 +31,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
31
31
|
locale: string | null;
|
|
32
32
|
theme: string | null;
|
|
33
33
|
twoFactorEnabled: boolean;
|
|
34
|
+
twoFactorRequired?: boolean | undefined;
|
|
34
35
|
} | null, AdminUser | {
|
|
35
36
|
id: number | string;
|
|
36
37
|
name: string;
|
|
@@ -39,6 +40,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
39
40
|
locale: string | null;
|
|
40
41
|
theme: string | null;
|
|
41
42
|
twoFactorEnabled: boolean;
|
|
43
|
+
twoFactorRequired?: boolean | undefined;
|
|
42
44
|
} | null>;
|
|
43
45
|
permissions: import("vue").Ref<string[], string[]>;
|
|
44
46
|
pendingChallenge: import("vue").Ref<{
|
|
@@ -48,8 +50,27 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
48
50
|
challengeToken: string;
|
|
49
51
|
remember: boolean;
|
|
50
52
|
} | null>;
|
|
53
|
+
demo: import("vue").Ref<{
|
|
54
|
+
readonly: boolean;
|
|
55
|
+
accounts: {
|
|
56
|
+
label: string;
|
|
57
|
+
email: string;
|
|
58
|
+
password: string;
|
|
59
|
+
description?: string | null | undefined;
|
|
60
|
+
}[];
|
|
61
|
+
} | null, AdminDemo | {
|
|
62
|
+
readonly: boolean;
|
|
63
|
+
accounts: {
|
|
64
|
+
label: string;
|
|
65
|
+
email: string;
|
|
66
|
+
password: string;
|
|
67
|
+
description?: string | null | undefined;
|
|
68
|
+
}[];
|
|
69
|
+
} | null>;
|
|
70
|
+
twoFactorAvailable: import("vue").Ref<boolean, boolean>;
|
|
51
71
|
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
52
72
|
isChallengePending: import("vue").ComputedRef<boolean>;
|
|
73
|
+
needsTwoFactorSetup: import("vue").ComputedRef<boolean>;
|
|
53
74
|
hydrate: (bootstrap: AdminBootstrap) => void;
|
|
54
75
|
hasPermission: (key: string) => boolean;
|
|
55
76
|
hasAnyPermission: (keys: string[]) => boolean;
|
|
@@ -61,7 +82,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
61
82
|
}>;
|
|
62
83
|
cancelChallenge: () => void;
|
|
63
84
|
logout: () => Promise<void>;
|
|
64
|
-
}, "user" | "permissions" | "pendingChallenge">, Pick<{
|
|
85
|
+
}, "user" | "permissions" | "pendingChallenge" | "demo" | "twoFactorAvailable">, Pick<{
|
|
65
86
|
user: import("vue").Ref<{
|
|
66
87
|
id: number | string;
|
|
67
88
|
name: string;
|
|
@@ -70,6 +91,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
70
91
|
locale: string | null;
|
|
71
92
|
theme: string | null;
|
|
72
93
|
twoFactorEnabled: boolean;
|
|
94
|
+
twoFactorRequired?: boolean | undefined;
|
|
73
95
|
} | null, AdminUser | {
|
|
74
96
|
id: number | string;
|
|
75
97
|
name: string;
|
|
@@ -78,6 +100,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
78
100
|
locale: string | null;
|
|
79
101
|
theme: string | null;
|
|
80
102
|
twoFactorEnabled: boolean;
|
|
103
|
+
twoFactorRequired?: boolean | undefined;
|
|
81
104
|
} | null>;
|
|
82
105
|
permissions: import("vue").Ref<string[], string[]>;
|
|
83
106
|
pendingChallenge: import("vue").Ref<{
|
|
@@ -87,8 +110,27 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
87
110
|
challengeToken: string;
|
|
88
111
|
remember: boolean;
|
|
89
112
|
} | null>;
|
|
113
|
+
demo: import("vue").Ref<{
|
|
114
|
+
readonly: boolean;
|
|
115
|
+
accounts: {
|
|
116
|
+
label: string;
|
|
117
|
+
email: string;
|
|
118
|
+
password: string;
|
|
119
|
+
description?: string | null | undefined;
|
|
120
|
+
}[];
|
|
121
|
+
} | null, AdminDemo | {
|
|
122
|
+
readonly: boolean;
|
|
123
|
+
accounts: {
|
|
124
|
+
label: string;
|
|
125
|
+
email: string;
|
|
126
|
+
password: string;
|
|
127
|
+
description?: string | null | undefined;
|
|
128
|
+
}[];
|
|
129
|
+
} | null>;
|
|
130
|
+
twoFactorAvailable: import("vue").Ref<boolean, boolean>;
|
|
90
131
|
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
91
132
|
isChallengePending: import("vue").ComputedRef<boolean>;
|
|
133
|
+
needsTwoFactorSetup: import("vue").ComputedRef<boolean>;
|
|
92
134
|
hydrate: (bootstrap: AdminBootstrap) => void;
|
|
93
135
|
hasPermission: (key: string) => boolean;
|
|
94
136
|
hasAnyPermission: (keys: string[]) => boolean;
|
|
@@ -100,7 +142,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
100
142
|
}>;
|
|
101
143
|
cancelChallenge: () => void;
|
|
102
144
|
logout: () => Promise<void>;
|
|
103
|
-
}, "isAuthenticated" | "isChallengePending">, Pick<{
|
|
145
|
+
}, "isAuthenticated" | "isChallengePending" | "needsTwoFactorSetup">, Pick<{
|
|
104
146
|
user: import("vue").Ref<{
|
|
105
147
|
id: number | string;
|
|
106
148
|
name: string;
|
|
@@ -109,6 +151,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
109
151
|
locale: string | null;
|
|
110
152
|
theme: string | null;
|
|
111
153
|
twoFactorEnabled: boolean;
|
|
154
|
+
twoFactorRequired?: boolean | undefined;
|
|
112
155
|
} | null, AdminUser | {
|
|
113
156
|
id: number | string;
|
|
114
157
|
name: string;
|
|
@@ -117,6 +160,7 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
117
160
|
locale: string | null;
|
|
118
161
|
theme: string | null;
|
|
119
162
|
twoFactorEnabled: boolean;
|
|
163
|
+
twoFactorRequired?: boolean | undefined;
|
|
120
164
|
} | null>;
|
|
121
165
|
permissions: import("vue").Ref<string[], string[]>;
|
|
122
166
|
pendingChallenge: import("vue").Ref<{
|
|
@@ -126,8 +170,27 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"admin-auth",
|
|
|
126
170
|
challengeToken: string;
|
|
127
171
|
remember: boolean;
|
|
128
172
|
} | null>;
|
|
173
|
+
demo: import("vue").Ref<{
|
|
174
|
+
readonly: boolean;
|
|
175
|
+
accounts: {
|
|
176
|
+
label: string;
|
|
177
|
+
email: string;
|
|
178
|
+
password: string;
|
|
179
|
+
description?: string | null | undefined;
|
|
180
|
+
}[];
|
|
181
|
+
} | null, AdminDemo | {
|
|
182
|
+
readonly: boolean;
|
|
183
|
+
accounts: {
|
|
184
|
+
label: string;
|
|
185
|
+
email: string;
|
|
186
|
+
password: string;
|
|
187
|
+
description?: string | null | undefined;
|
|
188
|
+
}[];
|
|
189
|
+
} | null>;
|
|
190
|
+
twoFactorAvailable: import("vue").Ref<boolean, boolean>;
|
|
129
191
|
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
130
192
|
isChallengePending: import("vue").ComputedRef<boolean>;
|
|
193
|
+
needsTwoFactorSetup: import("vue").ComputedRef<boolean>;
|
|
131
194
|
hydrate: (bootstrap: AdminBootstrap) => void;
|
|
132
195
|
hasPermission: (key: string) => boolean;
|
|
133
196
|
hasAnyPermission: (keys: string[]) => boolean;
|
package/dist/stores/locale.d.ts
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
* Changing it has three effects:
|
|
6
6
|
* - `<html lang="...">` is updated
|
|
7
7
|
* - AdminClient.setLocale() is called, so every later request carries the
|
|
8
|
-
*
|
|
8
|
+
* X-Admin-Locale the panel is rendering — from the bootstrap on, after a
|
|
9
|
+
* switch and after a logout — and the server's messages come back in the
|
|
10
|
+
* language of the screen
|
|
9
11
|
* - POST /system/setLocale persists it into user.locale and a cookie
|
|
10
12
|
*/
|
|
11
13
|
import type { AdminBootstrap } from '../types/bootstrap';
|
package/dist/stores/screen.d.ts
CHANGED
|
@@ -122,6 +122,7 @@ export declare const useScreenStore: import("pinia").StoreDefinition<"admin-scre
|
|
|
122
122
|
}[]>;
|
|
123
123
|
permissions: import("vue").Ref<string[], string[]>;
|
|
124
124
|
etag: import("vue").Ref<string | null, string | null>;
|
|
125
|
+
query: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
125
126
|
state: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
126
127
|
initial: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
127
128
|
errors: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
|
|
@@ -143,7 +144,7 @@ export declare const useScreenStore: import("pinia").StoreDefinition<"admin-scre
|
|
|
143
144
|
setField: (name: string, value: unknown) => void;
|
|
144
145
|
setErrors: (next: Record<string, string[]>) => void;
|
|
145
146
|
clearErrors: () => void;
|
|
146
|
-
}, "errors" | "state" | "name" | "loading" | "error" | "permissions" | "slug" | "description" | "layout" | "initial" | "commandBar" | "etag" | "running" | "lastMessage" | "lastMessageLink">, Pick<{
|
|
147
|
+
}, "errors" | "query" | "state" | "name" | "loading" | "error" | "permissions" | "slug" | "description" | "layout" | "initial" | "commandBar" | "etag" | "running" | "lastMessage" | "lastMessageLink">, Pick<{
|
|
147
148
|
slug: import("vue").Ref<string | null, string | null>;
|
|
148
149
|
name: import("vue").Ref<string, string>;
|
|
149
150
|
description: import("vue").Ref<string | null, string | null>;
|
|
@@ -193,6 +194,7 @@ export declare const useScreenStore: import("pinia").StoreDefinition<"admin-scre
|
|
|
193
194
|
}[]>;
|
|
194
195
|
permissions: import("vue").Ref<string[], string[]>;
|
|
195
196
|
etag: import("vue").Ref<string | null, string | null>;
|
|
197
|
+
query: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
196
198
|
state: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
197
199
|
initial: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
198
200
|
errors: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
|
|
@@ -264,6 +266,7 @@ export declare const useScreenStore: import("pinia").StoreDefinition<"admin-scre
|
|
|
264
266
|
}[]>;
|
|
265
267
|
permissions: import("vue").Ref<string[], string[]>;
|
|
266
268
|
etag: import("vue").Ref<string | null, string | null>;
|
|
269
|
+
query: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
267
270
|
state: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
268
271
|
initial: import("vue").Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
269
272
|
errors: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
|
package/dist/stores/toast.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ interface Options {
|
|
|
3
3
|
/** The duration in milliseconds; 0 means it never closes by itself. */
|
|
4
4
|
duration?: number;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Holds error toasts back for a moment. Called after a refusal that was
|
|
8
|
+
* already explained to the user by its own toast (demo mode, the 2FA
|
|
9
|
+
* requirement), so that the caller's generic "could not save" does not pile
|
|
10
|
+
* on top of it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function suppressErrorToasts(ms?: number): void;
|
|
6
13
|
export declare const adminToast: {
|
|
7
14
|
success(message: string, opts?: Options): void;
|
|
8
15
|
error(message: string, opts?: Options): void;
|