@webx-ui/module-admin 0.6.0 → 0.7.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/AdminLanding.d.ts +21 -0
- package/dist/NotesFeed.d.ts +30 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +760 -495
- package/dist/index.js.map +1 -1
- package/dist/notes.d.ts +34 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
package/dist/notes.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AdminContext } from './admin';
|
|
2
|
+
/** Who wrote a note. `name` is null once that account has been deleted. */
|
|
3
|
+
export interface NoteAuthor {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string | null;
|
|
6
|
+
}
|
|
7
|
+
/** One line somebody left on a record for whoever picks it up next. */
|
|
8
|
+
export interface EntityNote {
|
|
9
|
+
id: number;
|
|
10
|
+
body: string;
|
|
11
|
+
author: NoteAuthor | null;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the reader is the author — answered by the server, because who may edit a note is
|
|
14
|
+
* a rule, and a rule the browser works out for itself is the copy that drifts.
|
|
15
|
+
*/
|
|
16
|
+
is_mine: boolean;
|
|
17
|
+
created_at: string | null;
|
|
18
|
+
updated_at: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface NotesApi {
|
|
21
|
+
list(): Promise<EntityNote[]>;
|
|
22
|
+
add(body: string): Promise<EntityNote>;
|
|
23
|
+
save(id: number, body: string): Promise<EntityNote>;
|
|
24
|
+
remove(id: number): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The notes of one record.
|
|
28
|
+
*
|
|
29
|
+
* `type` is the alias the server registered the model under — never a class name — and the
|
|
30
|
+
* address is the panel's own, not the section's: the same feed hangs off a submission, an
|
|
31
|
+
* order and a client, and a second copy of it in each module is a second place for the rules
|
|
32
|
+
* about who may write one to be got wrong.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createNotesApi(admin: AdminContext, type: string, id: number | string): NotesApi;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wx-list-screen[data-v-7586ed04]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));min-width:0;container-type:inline-size}.wx-list-screen__head[data-v-7586ed04]{display:flex;align-items:center;justify-content:space-between;gap:var(--wx-space-12);flex-wrap:wrap}.wx-list-screen__title[data-v-7586ed04]{min-width:0}.wx-list-screen__actions[data-v-7586ed04]{display:flex;align-items:center;gap:var(--wx-space-8);flex-wrap:wrap}@container (max-width: 480px){.wx-list-screen__head[data-v-7586ed04]>*{flex:1 1 100%}.wx-list-screen__actions[data-v-7586ed04]>*{flex:1 1 auto}}.wx-list-screen.is-fill[data-v-7586ed04]{min-height:0}.wx-list-screen.is-fill[data-v-7586ed04]>:last-child{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs,.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__layout,.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__panels{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__panel,.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__panel>*{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__bar{flex:0 0 auto}.wx-admin[data-v-ebc6adf3]{--wx-admin-header-height: 52px;min-height:100dvh;background:var(--wx-bg-body)}.wx-admin--drawer[data-v-ebc6adf3]{--wx-gap: var(--wx-space-8)}.wx-admin--rail[data-v-ebc6adf3]{--wx-gap: var(--wx-space-12)}.wx-admin--sidebar[data-v-ebc6adf3]{--wx-gap: var(--wx-space-16)}.wx-admin__frame[data-v-ebc6adf3]{padding:var(--wx-gap);gap:var(--wx-gap)}.wx-admin__header[data-v-ebc6adf3]{--wx-header-top: var(--wx-gap)}.wx-admin__aside[data-v-ebc6adf3]{--wx-aside-top: var(--wx-gap);--wx-aside-height: calc(100dvh - var(--wx-gap) * 2)}.wx-admin__brand[data-v-ebc6adf3]{display:flex;align-items:center;gap:var(--wx-space-8);box-sizing:border-box;min-height:48px;padding:var(--wx-space-8);border-bottom:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__brand[data-v-ebc6adf3]{justify-content:center;padding-inline:var(--wx-space-4)}.wx-admin__brand--stacked[data-v-ebc6adf3]{flex-direction:column;gap:var(--wx-space-4)}.wx-admin__title[data-v-ebc6adf3]{flex:1 1 auto;min-width:0}.wx-admin__brand>.wx-admin__logo[data-v-ebc6adf3]{margin-inline-end:auto}.wx-admin__logo[data-v-ebc6adf3]{flex:0 1 auto;min-width:0;height:28px;width:auto;max-width:100%;object-fit:contain;object-position:left center}.wx-admin__mark[data-v-ebc6adf3]{height:24px;width:24px;object-fit:contain}.wx-admin__user[data-v-ebc6adf3]{display:flex;align-items:center;padding:var(--wx-space-8);border-top:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__user[data-v-ebc6adf3]{justify-content:center}.wx-admin__user--drawer[data-v-ebc6adf3]{flex:1 1 auto;justify-content:flex-start;padding:0;border-top:none}.wx-admin__screen[data-v-ebc6adf3]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 2);--wx-action-bar-bottom: var(--wx-gap);min-width:0;min-height:0}.wx-admin--drawer .wx-admin__screen[data-v-ebc6adf3]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 3 - var(--wx-admin-header-height))}.wx-admin-plain[data-v-ebc6adf3]{display:grid;place-items:center;box-sizing:border-box;min-height:100dvh;padding:var(--wx-space-16);background:var(--wx-bg-body)}html:has(>body>#webx-app),body:has(>#webx-app){margin:0}.wx-admin--drawer .wx-action--md{--wx-action-size: 30px}.wx-admin--drawer .wx-action--lg{--wx-action-size: 36px}.wx-rename[data-v-d879e8d3]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-rename__footer[data-v-d879e8d3]{display:flex;justify-content:flex-end}.wx-help[data-v-6c280d42]{color:var(--wx-text-default);font-size:var(--wx-font-size-md);line-height:var(--wx-font-line-height-normal)}.wx-help[data-v-6c280d42] h2,.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{margin-block:var(--wx-space-18) var(--wx-space-8);font-weight:var(--wx-font-weight-semibold)}.wx-help[data-v-6c280d42] h2{font-size:var(--wx-font-size-lg)}.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{font-size:var(--wx-font-size-md)}.wx-help[data-v-6c280d42] :is(h2,h3,h4):first-child{margin-block-start:0}.wx-help[data-v-6c280d42] p,.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{margin-block:0 var(--wx-space-12)}.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{padding-inline-start:var(--wx-space-24)}.wx-help[data-v-6c280d42] li{margin-block-end:var(--wx-space-4)}.wx-help[data-v-6c280d42] code{padding:0 var(--wx-space-4);border-radius:var(--wx-radius-xs);background:var(--wx-bg-subtle);font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm)}.wx-help[data-v-6c280d42] pre{margin-block:0 var(--wx-space-12);padding:var(--wx-space-12);border-radius:var(--wx-radius-sm);background:var(--wx-bg-subtle);overflow:auto}.wx-help[data-v-6c280d42] pre code{padding:0;background:none}.wx-help[data-v-6c280d42] a{color:var(--wx-color-primary)}
|
|
1
|
+
.wx-list-screen[data-v-7586ed04]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));min-width:0;container-type:inline-size}.wx-list-screen__head[data-v-7586ed04]{display:flex;align-items:center;justify-content:space-between;gap:var(--wx-space-12);flex-wrap:wrap}.wx-list-screen__title[data-v-7586ed04]{min-width:0}.wx-list-screen__actions[data-v-7586ed04]{display:flex;align-items:center;gap:var(--wx-space-8);flex-wrap:wrap}@container (max-width: 480px){.wx-list-screen__head[data-v-7586ed04]>*{flex:1 1 100%}.wx-list-screen__actions[data-v-7586ed04]>*{flex:1 1 auto}}.wx-list-screen.is-fill[data-v-7586ed04]{min-height:0}.wx-list-screen.is-fill[data-v-7586ed04]>:last-child{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs,.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__layout,.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__panels{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__panel,.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__panel>*{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-7586ed04] .wx-tabs__bar{flex:0 0 auto}.wx-admin[data-v-ebc6adf3]{--wx-admin-header-height: 52px;min-height:100dvh;background:var(--wx-bg-body)}.wx-admin--drawer[data-v-ebc6adf3]{--wx-gap: var(--wx-space-8)}.wx-admin--rail[data-v-ebc6adf3]{--wx-gap: var(--wx-space-12)}.wx-admin--sidebar[data-v-ebc6adf3]{--wx-gap: var(--wx-space-16)}.wx-admin__frame[data-v-ebc6adf3]{padding:var(--wx-gap);gap:var(--wx-gap)}.wx-admin__header[data-v-ebc6adf3]{--wx-header-top: var(--wx-gap)}.wx-admin__aside[data-v-ebc6adf3]{--wx-aside-top: var(--wx-gap);--wx-aside-height: calc(100dvh - var(--wx-gap) * 2)}.wx-admin__brand[data-v-ebc6adf3]{display:flex;align-items:center;gap:var(--wx-space-8);box-sizing:border-box;min-height:48px;padding:var(--wx-space-8);border-bottom:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__brand[data-v-ebc6adf3]{justify-content:center;padding-inline:var(--wx-space-4)}.wx-admin__brand--stacked[data-v-ebc6adf3]{flex-direction:column;gap:var(--wx-space-4)}.wx-admin__title[data-v-ebc6adf3]{flex:1 1 auto;min-width:0}.wx-admin__brand>.wx-admin__logo[data-v-ebc6adf3]{margin-inline-end:auto}.wx-admin__logo[data-v-ebc6adf3]{flex:0 1 auto;min-width:0;height:28px;width:auto;max-width:100%;object-fit:contain;object-position:left center}.wx-admin__mark[data-v-ebc6adf3]{height:24px;width:24px;object-fit:contain}.wx-admin__user[data-v-ebc6adf3]{display:flex;align-items:center;padding:var(--wx-space-8);border-top:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__user[data-v-ebc6adf3]{justify-content:center}.wx-admin__user--drawer[data-v-ebc6adf3]{flex:1 1 auto;justify-content:flex-start;padding:0;border-top:none}.wx-admin__screen[data-v-ebc6adf3]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 2);--wx-action-bar-bottom: var(--wx-gap);min-width:0;min-height:0}.wx-admin--drawer .wx-admin__screen[data-v-ebc6adf3]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 3 - var(--wx-admin-header-height))}.wx-admin-plain[data-v-ebc6adf3]{display:grid;place-items:center;box-sizing:border-box;min-height:100dvh;padding:var(--wx-space-16);background:var(--wx-bg-body)}html:has(>body>#webx-app),body:has(>#webx-app){margin:0}.wx-admin--drawer .wx-action--md{--wx-action-size: 30px}.wx-admin--drawer .wx-action--lg{--wx-action-size: 36px}.wx-rename[data-v-d879e8d3]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-rename__footer[data-v-d879e8d3]{display:flex;justify-content:flex-end}.wx-help[data-v-6c280d42]{color:var(--wx-text-default);font-size:var(--wx-font-size-md);line-height:var(--wx-font-line-height-normal)}.wx-help[data-v-6c280d42] h2,.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{margin-block:var(--wx-space-18) var(--wx-space-8);font-weight:var(--wx-font-weight-semibold)}.wx-help[data-v-6c280d42] h2{font-size:var(--wx-font-size-lg)}.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{font-size:var(--wx-font-size-md)}.wx-help[data-v-6c280d42] :is(h2,h3,h4):first-child{margin-block-start:0}.wx-help[data-v-6c280d42] p,.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{margin-block:0 var(--wx-space-12)}.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{padding-inline-start:var(--wx-space-24)}.wx-help[data-v-6c280d42] li{margin-block-end:var(--wx-space-4)}.wx-help[data-v-6c280d42] code{padding:0 var(--wx-space-4);border-radius:var(--wx-radius-xs);background:var(--wx-bg-subtle);font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm)}.wx-help[data-v-6c280d42] pre{margin-block:0 var(--wx-space-12);padding:var(--wx-space-12);border-radius:var(--wx-radius-sm);background:var(--wx-bg-subtle);overflow:auto}.wx-help[data-v-6c280d42] pre code{padding:0;background:none}.wx-help[data-v-6c280d42] a{color:var(--wx-color-primary)}.wx-notes[data-v-4ce005b1]{display:flex;flex-direction:column;gap:var(--wx-space-12);min-width:0;container-type:inline-size}.wx-notes__list[data-v-4ce005b1]{display:flex;flex-direction:column;gap:var(--wx-space-12);margin:0;padding:0;list-style:none}.wx-note[data-v-4ce005b1]{display:flex;gap:var(--wx-space-8);min-width:0}.wx-note__body[data-v-4ce005b1]{display:flex;flex-direction:column;gap:var(--wx-space-4);flex:1 1 auto;min-width:0}.wx-note__head[data-v-4ce005b1]{display:flex;align-items:center;gap:var(--wx-space-8);min-width:0}.wx-note__head[data-v-4ce005b1]>:last-child{margin-inline-start:auto}.wx-note__text[data-v-4ce005b1]{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--wx-font-size-sm);color:var(--wx-text-default)}.wx-note__buttons[data-v-4ce005b1],.wx-notes__new[data-v-4ce005b1]{display:flex;align-items:flex-start;gap:var(--wx-space-8)}.wx-notes__new[data-v-4ce005b1]>:first-child{flex:1 1 auto;min-width:0}@container (max-width: 440px){.wx-note__buttons[data-v-4ce005b1],.wx-notes__new[data-v-4ce005b1]{flex-direction:column;align-items:stretch}}
|
package/dist/types.d.ts
CHANGED
|
@@ -92,6 +92,15 @@ export interface AdminModule {
|
|
|
92
92
|
* the reason this exists.
|
|
93
93
|
*/
|
|
94
94
|
public?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* The section the panel opens on.
|
|
97
|
+
*
|
|
98
|
+
* A panel is opened in the morning to see what happened overnight, and which section
|
|
99
|
+
* answers that is a property of the installation rather than of the shell — so the module
|
|
100
|
+
* says it, and the root route sends anybody who arrives at `/` there. Two modules claiming
|
|
101
|
+
* it is not an error: the first one listed wins, and the other is still a section.
|
|
102
|
+
*/
|
|
103
|
+
landing?: boolean;
|
|
95
104
|
/**
|
|
96
105
|
* Screen node types this module brings — `wx-media` from the media module. Merged into the
|
|
97
106
|
* registry every screen in the panel is drawn with.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webx-ui/module-admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The frame a WebX UI admin panel runs in: bootstrap, the shell, the HTTP client and the module registry that pairs with webx-ui/module-admin on the server.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|