@webx-ui/module-admin 0.8.0 → 0.9.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.
@@ -10,5 +10,9 @@ import { TypeRegistry } from '@webx-ui/schema';
10
10
  *
11
11
  * The rows themselves are still a module's own type — `wx-pages-table`, `wx-media` — because
12
12
  * only the module knows what it is listing and where it asks for it.
13
+ *
14
+ * `wx-rich-text` is here rather than in `@webx-ui/schema` because it is not the editor that
15
+ * makes it a panel field: it is the panel's words on its toolbar and the panel's library behind
16
+ * its image button, and the schema package knows about neither.
13
17
  */
14
18
  export declare const adminTypes: TypeRegistry;
package/dist/types.d.ts CHANGED
@@ -106,6 +106,30 @@ export interface AdminModule {
106
106
  * registry every screen in the panel is drawn with.
107
107
  */
108
108
  types?: TypeRegistry;
109
+ /**
110
+ * Opens a library and answers with the picture that was chosen, or `null` if nobody chose
111
+ * one.
112
+ *
113
+ * The seam exists because the panel's own fields need a picture — `wx-rich-text` has an
114
+ * image button — and the panel cannot depend on the module that has the files: it is the
115
+ * other way round. A module supplies this, the panel asks for it, and a panel without one
116
+ * simply does not offer the button.
117
+ */
118
+ pickImage?: () => Promise<PickedImage | null>;
119
+ }
120
+ /**
121
+ * A picture out of a library: where it is right now, and the key it is filed under.
122
+ *
123
+ * Both, because they answer different questions. The address is what draws the picture in this
124
+ * browser this minute — it may be signed and about to expire, and it carries a version stamp
125
+ * that changes the moment somebody crops the image. The key is what goes into the record, so
126
+ * the address can be worked out again: a library that moves to another bucket, a site deployed
127
+ * against a different CDN and an image edited in place all change the address and none of them
128
+ * change the key.
129
+ */
130
+ export interface PickedImage {
131
+ url: string;
132
+ path?: string;
109
133
  }
110
134
  export type AdminStatus = 'loading' | 'ready' | 'unauthenticated' | 'error';
111
135
  export interface NavEntry {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webx-ui/module-admin",
3
- "version": "0.8.0",
3
+ "version": "0.9.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",
@@ -44,8 +44,8 @@
44
44
  "vue-router": "^4.5.0"
45
45
  },
46
46
  "dependencies": {
47
- "@webx-ui/core": "^0.23.0",
48
- "@webx-ui/schema": "^0.3.0",
47
+ "@webx-ui/core": "^0.24.0",
48
+ "@webx-ui/schema": "^0.3.1",
49
49
  "@webx-ui/tokens": "^0.3.0"
50
50
  },
51
51
  "devDependencies": {