@webx-ui/module-admin 0.16.0 → 0.17.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/RenameButton.d.ts +1 -1
- package/dist/collections/CollectionField.d.ts +17 -0
- package/dist/collections/api.d.ts +32 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1443 -1252
- package/dist/index.js.map +1 -1
- package/dist/screenTypes.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/RenameButton.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
148
148
|
onClear?: (() => any) | undefined;
|
|
149
149
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
150
150
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
151
|
-
}>, "disabled" | "type" | "id" | "size" | "clearable" | "placeholder" | "status" | "ariaLabel" | "input" | "select" | "readonly" | "
|
|
151
|
+
}>, "disabled" | "type" | "id" | "size" | "clearable" | "placeholder" | "status" | "ariaLabel" | "input" | "select" | "readonly" | "focus" | "blur" | "maxlength" | "showCount" | "autocomplete" | "localized"> & {
|
|
152
152
|
focus: () => void | undefined;
|
|
153
153
|
blur: () => void | undefined;
|
|
154
154
|
select: () => void | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CollectionValue } from './api';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The source's key, as the server registered it: `faq`. */
|
|
4
|
+
source: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = {
|
|
8
|
+
modelValue?: CollectionValue | null;
|
|
9
|
+
} & __VLS_Props;
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: CollectionValue | null) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: CollectionValue | null) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AdminContext } from '../admin';
|
|
2
|
+
/**
|
|
3
|
+
* One section a block can show records from, as `GET /api/cms/collections` describes it
|
|
4
|
+
* (`WebxUi\Admin\Collections\CollectionSource` on the server).
|
|
5
|
+
*/
|
|
6
|
+
export interface CollectionSourceInfo {
|
|
7
|
+
/** What a block schema writes in `props.source`: `faq`. */
|
|
8
|
+
key: string;
|
|
9
|
+
/** Already in the panel's language. */
|
|
10
|
+
title: string;
|
|
11
|
+
/** The path its categories answer at (`faq/categories`); `null` — a source without them. */
|
|
12
|
+
categories: string | null;
|
|
13
|
+
/** Whether it can mark its records up for search engines. */
|
|
14
|
+
markup: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** What a `wx-collection` field keeps: the choice, never the records. */
|
|
17
|
+
export interface CollectionValue {
|
|
18
|
+
/** Empty — all of them. */
|
|
19
|
+
categories: number[];
|
|
20
|
+
/** `null` — all of them. */
|
|
21
|
+
limit: number | null;
|
|
22
|
+
filter: boolean;
|
|
23
|
+
/** `null` — the default: on when no category is chosen (decision 8 of the FAQ spec). */
|
|
24
|
+
markup: boolean | null;
|
|
25
|
+
}
|
|
26
|
+
/** The server's ceiling for `limit` (`Selection::MAX_LIMIT`). */
|
|
27
|
+
export declare const COLLECTION_MAX_LIMIT = 100;
|
|
28
|
+
export declare function collectionSources(admin: AdminContext): Promise<CollectionSourceInfo[]>;
|
|
29
|
+
/** Whatever arrived, as the four keys the server writes — the same `Selection::normalise()` does. */
|
|
30
|
+
export declare function normaliseCollection(value: unknown): CollectionValue;
|
|
31
|
+
/** What `markup: null` means for this choice: on for the whole collection, off for a part of it. */
|
|
32
|
+
export declare function defaultMarkup(value: CollectionValue): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { createLinksApi, emptyLink, type LinkCandidate, type LinkRel, type LinkS
|
|
|
11
11
|
export { createHttp, readCookie, HttpError, type Http, type HttpOptions, type RequestOptions, } from './http';
|
|
12
12
|
export { adminTypes } from './screenTypes';
|
|
13
13
|
export { categoryRoutes, createCategoriesApi, itemOrderMode, reorderItems, useCategoryEditor, useCategoryWords, useItemOrder, type CategoriesApi, type CategoriesOptions, type CategoriesPayload, type CategoryDetail, type CategoryEditorContext, type CategoryRow, type CategoryWord, type ItemOrder, type ItemOrderMode, type ItemOrderState, } from './categories';
|
|
14
|
+
export { COLLECTION_MAX_LIMIT, collectionSources, defaultMarkup, normaliseCollection, type CollectionSourceInfo, type CollectionValue, } from './collections/api';
|
|
14
15
|
export type { AdminModule, AdminStatus, AdminUser, Manifest, ManifestModule, NavEntry, PickedImage, RowAction, ScreenAction, AppliedFilter, } from './types';
|
|
15
16
|
export { default as AdminShell } from './AdminShell';
|
|
16
17
|
export { default as AdminNav } from './AdminNav';
|
|
@@ -35,6 +36,7 @@ export { default as WxCategoriesPage } from './categories/CategoriesPage';
|
|
|
35
36
|
export { default as WxCategoryCreateDialog } from './categories/CategoryCreateDialog';
|
|
36
37
|
export { default as WxCategoryEditorPage } from './categories/CategoryEditorPage';
|
|
37
38
|
export { default as WxCategoriesField } from './categories/CategoriesField';
|
|
39
|
+
export { default as WxCollectionField } from './collections/CollectionField';
|
|
38
40
|
export { default as WxSlugField } from './SlugField';
|
|
39
41
|
/** The shared address field under the name it was released with. */
|
|
40
42
|
export { default as WxCategorySlug } from './SlugField';
|