@webx-ui/module-admin 0.28.0 → 0.29.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/README.md +4 -0
- package/dist/RenameButton.d.ts +2 -2
- package/dist/SiteLink.d.ts +34 -0
- package/dist/admin.d.ts +9 -0
- package/dist/createAdmin.d.ts +6 -0
- package/dist/index.js +2190 -2098
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +5 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,6 +35,10 @@ createAdmin({
|
|
|
35
35
|
reads the manifest address out of the `webx-manifest` meta tag beside it. Both are overridable
|
|
36
36
|
for a panel served some other way.
|
|
37
37
|
|
|
38
|
+
The name in the head of the sidebar, an arrow on the rail and an entry of the account menu lead
|
|
39
|
+
to the site, in a new tab: to the home page in its main language the server names, to the
|
|
40
|
+
address in `siteLink` when the project gives one, and nowhere at all with `siteLink: false`.
|
|
41
|
+
|
|
38
42
|
Mounting does not wait for the server. The manifest needs a signed-in session, so a visit that
|
|
39
43
|
starts at the sign-in screen would otherwise stare at a blank page waiting for a request it is
|
|
40
44
|
bound to lose.
|
package/dist/RenameButton.d.ts
CHANGED
|
@@ -106,10 +106,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
106
106
|
status: import('@webx-ui/core').InputStatus;
|
|
107
107
|
id: string;
|
|
108
108
|
readonly: boolean;
|
|
109
|
+
localized: boolean;
|
|
109
110
|
autocomplete: string;
|
|
110
111
|
maxlength: number;
|
|
111
112
|
showCount: boolean;
|
|
112
|
-
localized: boolean;
|
|
113
113
|
tokens: import('@webx-ui/core').TokenOption[];
|
|
114
114
|
tokensTitle: string;
|
|
115
115
|
tokensLabel: string;
|
|
@@ -143,10 +143,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
143
143
|
status: import('@webx-ui/core').InputStatus;
|
|
144
144
|
id: string;
|
|
145
145
|
readonly: boolean;
|
|
146
|
+
localized: boolean;
|
|
146
147
|
autocomplete: string;
|
|
147
148
|
maxlength: number;
|
|
148
149
|
showCount: boolean;
|
|
149
|
-
localized: boolean;
|
|
150
150
|
tokens: import('@webx-ui/core').TokenOption[];
|
|
151
151
|
tokensTitle: string;
|
|
152
152
|
tokensLabel: string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The name of the site in the panel's head, made into the way to the site: the name itself is
|
|
3
|
+
* the link, and the small arrow after it says the link leaves the panel.
|
|
4
|
+
*
|
|
5
|
+
* A new tab, because the panel is where the work is — somebody who glances at the site wants
|
|
6
|
+
* to come back to the screen they left, not to a sign-in and a menu.
|
|
7
|
+
*
|
|
8
|
+
* The arrow sits right after the name rather than at the far end of the row: the name is cut
|
|
9
|
+
* short with an ellipsis before the arrow is, so a long one never pushes it out.
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
href: string;
|
|
13
|
+
/** What the link is called aloud: the site's name, then what following it does. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** The words of the tooltip. */
|
|
16
|
+
hint: string;
|
|
17
|
+
};
|
|
18
|
+
declare function __VLS_template(): {
|
|
19
|
+
attrs: Partial<{}>;
|
|
20
|
+
slots: {
|
|
21
|
+
default?(_: {}): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {};
|
|
24
|
+
rootEl: HTMLAnchorElement;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLAnchorElement>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
package/dist/admin.d.ts
CHANGED
|
@@ -40,6 +40,13 @@ export interface AdminContext {
|
|
|
40
40
|
* fetched once for the session. Optional on the context so a hand-made one in a test needs none.
|
|
41
41
|
*/
|
|
42
42
|
readonly blockLabels?: () => Promise<BlockLabels | null>;
|
|
43
|
+
/**
|
|
44
|
+
* The site this panel runs, as the way out of the panel: its home page in the site's main
|
|
45
|
+
* language. `null` when the project hid the link with `createAdmin({ siteLink: false })`, or
|
|
46
|
+
* when the server is too old to say. The header, the rail and the account menu all read it
|
|
47
|
+
* here, so an address given once moves all three.
|
|
48
|
+
*/
|
|
49
|
+
readonly siteUrl: ComputedRef<string | null>;
|
|
43
50
|
/** Ask the server what the panel is and who is signed in again. */
|
|
44
51
|
reload(): Promise<void>;
|
|
45
52
|
/**
|
|
@@ -96,6 +103,8 @@ export declare function createAdminContext(options: {
|
|
|
96
103
|
loadDictionary?: (locale: string) => Promise<void>;
|
|
97
104
|
types?: TypeRegistry;
|
|
98
105
|
screens?: Record<string, Patch>;
|
|
106
|
+
/** The project's say over the way to the site: an address of its own, or `false` for none. */
|
|
107
|
+
siteLink?: string | false;
|
|
99
108
|
/** Told who is signed in, so the theme they chose follows them to this machine. */
|
|
100
109
|
theme?: ThemeController;
|
|
101
110
|
}): AdminContext;
|
package/dist/createAdmin.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ export interface CreateAdminOptions {
|
|
|
29
29
|
* arrives; given here for the first paint, before it has.
|
|
30
30
|
*/
|
|
31
31
|
basePath?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The way from the panel to the site: the name in the sidebar's head, the arrow beside it and
|
|
34
|
+
* an entry of the account menu. By default the home page the server names, in the site's main
|
|
35
|
+
* language; an address here goes there instead, and `false` leaves the link out everywhere.
|
|
36
|
+
*/
|
|
37
|
+
siteLink?: string | false;
|
|
32
38
|
/** Replaces the panel's name in the header — a logo, usually. */
|
|
33
39
|
brand?: Component;
|
|
34
40
|
/** The corner of the header: who is signed in, and the way out. */
|