@webx-ui/module-admin 0.12.2 → 0.13.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/BackupNote.d.ts +2 -0
- package/dist/admin.d.ts +3 -0
- package/dist/createAdmin.d.ts +3 -0
- package/dist/http.d.ts +4 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +860 -723
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +39 -0
- package/dist/types.d.ts +23 -0
- package/package.json +4 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
package/dist/admin.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { App, ComputedRef, InjectionKey } from 'vue';
|
|
|
2
2
|
import { Patch, ScreenNode, TypeRegistry } from '@webx-ui/schema';
|
|
3
3
|
import { Http } from './http';
|
|
4
4
|
import { I18n } from './i18n';
|
|
5
|
+
import { ThemeController } from './theme';
|
|
5
6
|
import { AdminModule, AdminStatus, AdminUser, Manifest, NavEntry, NavGroup, PickedImage } from './types';
|
|
6
7
|
export interface AdminContext {
|
|
7
8
|
/** The panel's own backend. */
|
|
@@ -85,5 +86,7 @@ export declare function createAdminContext(options: {
|
|
|
85
86
|
loadDictionary?: (locale: string) => Promise<void>;
|
|
86
87
|
types?: TypeRegistry;
|
|
87
88
|
screens?: Record<string, Patch>;
|
|
89
|
+
/** Told who is signed in, so the theme they chose follows them to this machine. */
|
|
90
|
+
theme?: ThemeController;
|
|
88
91
|
}): AdminContext;
|
|
89
92
|
export declare function provideAdmin(app: App, admin: AdminContext): void;
|
package/dist/createAdmin.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Router, RouteRecordRaw } from 'vue-router';
|
|
|
3
3
|
import { AdminContext } from './admin';
|
|
4
4
|
import { Http } from './http';
|
|
5
5
|
import { I18n } from './i18n';
|
|
6
|
+
import { ThemeController } from './theme';
|
|
6
7
|
import { Patch, TypeRegistry } from '@webx-ui/schema';
|
|
7
8
|
import { AdminModule } from './types';
|
|
8
9
|
export interface CreateAdminOptions {
|
|
@@ -66,6 +67,8 @@ export interface Admin {
|
|
|
66
67
|
router: Router;
|
|
67
68
|
context: AdminContext;
|
|
68
69
|
i18n: I18n;
|
|
70
|
+
/** Light, dark or the machine's — applied before anything is drawn. */
|
|
71
|
+
theme: ThemeController;
|
|
69
72
|
mount(): Promise<void>;
|
|
70
73
|
}
|
|
71
74
|
/**
|
package/dist/http.d.ts
CHANGED
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
export interface HttpOptions {
|
|
9
9
|
/** Prefixed to every relative path, e.g. `/api/cms`. */
|
|
10
10
|
baseUrl?: string;
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Where to fetch the CSRF cookie from before an unsafe request. The default is the panel's
|
|
13
|
+
* own route; a panel served under another `api_path` passes its own, as `createAdmin` does.
|
|
14
|
+
*/
|
|
12
15
|
csrfUrl?: string;
|
|
13
16
|
/** Called whenever the server answers 401, however deep in the app the call was. */
|
|
14
17
|
onUnauthenticated?: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { createAdmin, type Admin, type AdminPlugin, type CreateAdminOptions } from './createAdmin';
|
|
2
2
|
export { createAdminContext, provideAdmin, useAdmin, adminKey, type AdminContext, type AdminState, } from './admin';
|
|
3
3
|
export { createI18n, provideI18n, useI18n, useTranslate, i18nKey, type Dictionary, type I18n, type I18nState, type LocaleDescriptor, type Messages, type Translate, } from './i18n';
|
|
4
|
+
export { createTheme, provideTheme, useTheme, themeKey, type CreateThemeOptions, type Theme, type ThemeController, type ThemePreference, type ThemeState, } from './theme';
|
|
4
5
|
export { adminMessages } from './messages';
|
|
5
6
|
export { renderMarkdown } from './markdown';
|
|
6
7
|
export { createDates, useDates, type DateLike, type Dates } from './dates';
|
|
@@ -24,4 +25,5 @@ export { default as WxRenameButton } from './RenameButton';
|
|
|
24
25
|
export { default as WxHelpButton } from './HelpButton';
|
|
25
26
|
export { default as WxDate } from './DateText';
|
|
26
27
|
export { default as WxNotes } from './NotesFeed';
|
|
28
|
+
export { default as WxBackupNote } from './BackupNote';
|
|
27
29
|
export { default as WxRichTextField } from './RichTextField';
|