@webx-ui/module-blocks 0.9.3 → 0.10.1
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/BlockMoveDialog.d.ts +17 -0
- package/dist/BlocksTree.d.ts +4 -2
- package/dist/api.d.ts +2 -0
- package/dist/index.js +1842 -1659
- package/dist/index.js.map +1 -1
- package/dist/move.d.ts +33 -0
- package/dist/preview.d.ts +8 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +3 -0
- package/package.json +4 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Destination } from './move';
|
|
2
|
+
/**
|
|
3
|
+
* "Move to": the lists a block may go into, each named by the containers down to it.
|
|
4
|
+
*
|
|
5
|
+
* A list rather than a drag across the tree. The places are few and each one is named, the
|
|
6
|
+
* rules are applied before anything is offered rather than at the moment of a drop, and a
|
|
7
|
+
* finger in a sheet can do it as well as a mouse can. The block goes to the end of the list
|
|
8
|
+
* it is moved into; its place there is a drag within that list.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
title: string;
|
|
12
|
+
destinations: Destination[];
|
|
13
|
+
/** What the top level is called: the page, or the block whose sample this is. */
|
|
14
|
+
topLabel: string;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
package/dist/BlocksTree.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { BlockNode, BlockType } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* One level of the tree, and itself again for every container. Rows reorder among their
|
|
5
5
|
* siblings by drag; a container shows its fields' lists underneath, each with its own
|
|
6
|
-
* "add inside". Moving a block between containers is not a drag
|
|
7
|
-
*
|
|
6
|
+
* "add inside". Moving a block between containers is not a drag but "Move to" in its menu:
|
|
7
|
+
* a drag across allow-rules would need a judge at every drop, and a finger in a sheet has none.
|
|
8
8
|
*/
|
|
9
9
|
type __VLS_Props = {
|
|
10
10
|
nodes: BlockNode[];
|
|
@@ -23,6 +23,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
23
23
|
add: (parentKey: string | null, field: string | null, node: ScreenNode | null, index?: number | undefined) => any;
|
|
24
24
|
remove: (key: string) => any;
|
|
25
25
|
duplicate: (key: string) => any;
|
|
26
|
+
move: (key: string) => any;
|
|
26
27
|
select: (key: string) => any;
|
|
27
28
|
visibility: (key: string, hidden: boolean) => any;
|
|
28
29
|
reorder: (parentKey: string | null, field: string | null, list: BlockNode[]) => any;
|
|
@@ -30,6 +31,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
30
31
|
onAdd?: ((parentKey: string | null, field: string | null, node: ScreenNode | null, index?: number | undefined) => any) | undefined;
|
|
31
32
|
onRemove?: ((key: string) => any) | undefined;
|
|
32
33
|
onDuplicate?: ((key: string) => any) | undefined;
|
|
34
|
+
onMove?: ((key: string) => any) | undefined;
|
|
33
35
|
onSelect?: ((key: string) => any) | undefined;
|
|
34
36
|
onVisibility?: ((key: string, hidden: boolean) => any) | undefined;
|
|
35
37
|
onReorder?: ((parentKey: string | null, field: string | null, list: BlockNode[]) => any) | undefined;
|
package/dist/api.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface BlocksApi {
|
|
|
19
19
|
versions(id: number): Promise<BlockVersionMeta[]>;
|
|
20
20
|
version(id: number, number: number): Promise<BlockVersion>;
|
|
21
21
|
restore(id: number, number: number): Promise<BlockType>;
|
|
22
|
+
/** The new order of some types — a group — in the places they held; the rest stay put. */
|
|
23
|
+
reorder(ids: number[]): Promise<void>;
|
|
22
24
|
}
|
|
23
25
|
/** Everything under `/blocks`, below the panel's API path. */
|
|
24
26
|
export declare function createBlocksApi(admin: AdminContext): BlocksApi;
|