@xy-planning-network/trees 0.13.7-dev-4 → 0.13.7
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/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { default as useBaseAPI, useBaseAPIGet, useBaseAPIPatch, useBaseAPIPut, useBaseAPIPost, useBaseAPIDelete } from "./useBaseAPI";
|
|
2
2
|
import type { UseBaseAPIOptions, UseBaseAPI } from "./useBaseAPI";
|
|
3
|
-
import type { DynamicTableOptions, DynamicTableAPI, TableActionButton, TableActionItem, TableActionLink, TableActions, TableBulkActionItem, TableColumn, TableColumns, TableCellAlignment, TableRowData, TableRowsData } from "./table";
|
|
3
|
+
import type { DynamicTableOptions, DynamicTableAPI, TableActionButton, TableActionItem, TableActionLink, TableActions, TableBulkActions, TableBulkActionItem, TableColumn, TableColumns, TableCellAlignment, TableRowData, TableRowsData } from "./table";
|
|
4
4
|
import type { DetailListAPI, SortDir } from "./list";
|
|
5
|
-
export type { UseBaseAPIOptions, UseBaseAPI, DetailListAPI, DynamicTableOptions, DynamicTableAPI, SortDir, TableActionButton, TableActionItem, TableActionLink, TableActions, TableBulkActionItem, TableColumn, TableColumns, TableCellAlignment, TableRowData, TableRowsData, };
|
|
5
|
+
export type { UseBaseAPIOptions, UseBaseAPI, DetailListAPI, DynamicTableOptions, DynamicTableAPI, SortDir, TableActionButton, TableActionItem, TableActionLink, TableActions, TableBulkActions, TableBulkActionItem, TableColumn, TableColumns, TableCellAlignment, TableRowData, TableRowsData, };
|
|
6
6
|
export { useBaseAPI, useBaseAPIGet, useBaseAPIPatch, useBaseAPIPut, useBaseAPIPost, useBaseAPIDelete, };
|
|
7
7
|
import { useFlashes, useAppFlashes, useAppFlasher } from "./useFlashes";
|
|
8
8
|
import type { FlashMessage, FlashType, FlashStore, Flasher } from "./useFlashes";
|
|
9
9
|
export type { FlashMessage, FlashType, FlashStore, Flasher };
|
|
10
10
|
export { useFlashes, useAppFlashes, useAppFlasher };
|
|
11
|
-
import type { ActionItem, ActionItemButton, ActionItemLink, NavItem, Pagination, URLParams, URLParamValue, UseTabHistoryOpts } from "./nav";
|
|
12
|
-
export type { ActionItem, ActionItemButton, ActionItemLink, NavItem, Pagination, URLParams, URLParamValue, UseTabHistoryOpts, };
|
|
11
|
+
import type { ActionItem, ActionItems, ActionItemButton, ActionItemLink, NavItem, Pagination, URLParams, URLParamValue, UseTabHistoryOpts } from "./nav";
|
|
12
|
+
export type { ActionItem, ActionItems, ActionItemButton, ActionItemLink, NavItem, Pagination, URLParams, URLParamValue, UseTabHistoryOpts, };
|
|
13
13
|
import { isActionItemButton, isActionItemLink, useUrlSearchParams, useTabHistory } from "./nav";
|
|
14
14
|
export { isActionItemButton, isActionItemLink, useUrlSearchParams, useTabHistory, };
|
|
15
15
|
import { useSpinnerDisplay, useAppSpinner } from "./useSpinner";
|
|
@@ -13,6 +13,13 @@ export interface Pagination {
|
|
|
13
13
|
}
|
|
14
14
|
export type ActionItem = ActionItemButton | ActionItemLink;
|
|
15
15
|
export type ActionItems = ActionItem[];
|
|
16
|
+
/**
|
|
17
|
+
* ActionItemButton determines the configuration for a button action in a component.
|
|
18
|
+
* Visibility (`show`) and interactivity (`disabled`) can be toggled via static booleans.
|
|
19
|
+
*
|
|
20
|
+
* The use of (`never`) on properties that exist in ActionItemLink ensures the compiler
|
|
21
|
+
* can infer between the to interfaces when used in the type union ActionItem.
|
|
22
|
+
*/
|
|
16
23
|
export interface ActionItemButton {
|
|
17
24
|
label: string;
|
|
18
25
|
attrs?: never;
|
|
@@ -24,6 +31,13 @@ export interface ActionItemButton {
|
|
|
24
31
|
onClick: (e: Event) => void;
|
|
25
32
|
}
|
|
26
33
|
export declare const isActionItemButton: (item: ActionItem) => item is ActionItemButton;
|
|
34
|
+
/**
|
|
35
|
+
* ActionItemLink determines the configuration for a link action in a component.
|
|
36
|
+
* Visibility (`show`) and interactivity (`disabled`) can be toggled via static booleans.
|
|
37
|
+
*
|
|
38
|
+
* HTML Attributes can be defined on (`attrs`) for additional HTML anchor tag attributes
|
|
39
|
+
* that are not explicitly defined in the interface.
|
|
40
|
+
*/
|
|
27
41
|
export interface ActionItemLink {
|
|
28
42
|
label: string;
|
|
29
43
|
url: string;
|
|
@@ -42,6 +42,9 @@ export type TableActionItem<T = TableRowData> = TableActionButton<T> | TableActi
|
|
|
42
42
|
* Visibility (`show`) and interactivity (`disabled`) can be toggled via static booleans
|
|
43
43
|
* or dynamic methods based on the specific row's state and index.
|
|
44
44
|
*
|
|
45
|
+
* The use of (`never`) on properties that exist in TableActionLink ensures the compiler
|
|
46
|
+
* can infer between the to interfaces when used in the type union TableActionItem.
|
|
47
|
+
*
|
|
45
48
|
* @template T The shape of the underlying row data.
|
|
46
49
|
*/
|
|
47
50
|
export interface TableActionButton<T = TableRowData> {
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Ref } from "vue";
|
|
2
|
-
import { ActionItem } from "./nav";
|
|
3
|
-
export declare const useActionItems: (items: ActionItem[] | Ref<ActionItem[]>) => {
|
|
4
|
-
actions: import("vue").ComputedRef<{
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
show: boolean;
|
|
7
|
-
onClick: (...args: any[]) => void;
|
|
8
|
-
icon?: import("vue").RenderFunction | import("vue").FunctionalComponent<{}, {}, any, {}> | undefined;
|
|
9
|
-
label: string;
|
|
10
|
-
}[]>;
|
|
11
|
-
hasActions: import("vue").ComputedRef<boolean>;
|
|
12
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TableActionItem } from "../../composables";
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
actions?: TableActionItem[];
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
-
actions: TableActionItem<import("../../composables").TableRowData>[];
|
|
7
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
-
export default _default;
|