sit-onyx 1.0.0-beta.230 → 1.0.0-beta.232
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/components/OnyxDataGrid/features/hideColumns/hideColumns.d.ts +8 -3
- package/dist/components/OnyxDataGrid/features/index.d.ts +3 -4
- package/dist/components/OnyxDataGrid/features/selection/selection.d.ts +1 -2
- package/dist/components/OnyxNavBar/OnyxNavBar.vue.d.ts +1 -1
- package/dist/components/OnyxNotificationCard/OnyxNotificationCard.vue.d.ts +1 -1
- package/dist/components/OnyxSidebar/modules/OnyxSidebarItem/OnyxSidebarItem.vue.d.ts +17 -0
- package/dist/components/OnyxSidebar/modules/OnyxSidebarItem/types.d.ts +9 -0
- package/dist/components/OnyxSidebar/modules/index.d.ts +2 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1969 -1928
- package/dist/style.css +1 -1
- package/dist/utils/feature.d.ts +15 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
+
import { type InternalColumnConfig } from "..";
|
|
2
3
|
import type { DataGridEntry } from "../../types";
|
|
3
4
|
import "./hideColumns.scss";
|
|
4
5
|
import type { HideColumnsOptions } from "./types";
|
|
@@ -8,8 +9,12 @@ export declare const useHideColumns: <TEntry extends DataGridEntry>(options?: Hi
|
|
|
8
9
|
name: symbol;
|
|
9
10
|
watch: Ref<Set<keyof TEntry>, Set<keyof TEntry>>[];
|
|
10
11
|
modifyColumns: {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
order: number;
|
|
13
|
+
/**
|
|
14
|
+
* Store the current column configuration for later reference
|
|
15
|
+
*/
|
|
16
|
+
func: (newConfig: readonly InternalColumnConfig<TEntry, any>[]) => InternalColumnConfig<TEntry>[];
|
|
17
|
+
}[];
|
|
13
18
|
typeRenderer: {
|
|
14
19
|
[HIDDEN_COLUMN]: {
|
|
15
20
|
header: {
|
|
@@ -29,7 +34,7 @@ export declare const useHideColumns: <TEntry extends DataGridEntry>(options?: Hi
|
|
|
29
34
|
};
|
|
30
35
|
};
|
|
31
36
|
header: {
|
|
32
|
-
actions: ({ key: column }:
|
|
37
|
+
actions: ({ key: column }: InternalColumnConfig<any, any>) => {
|
|
33
38
|
menuItems: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
39
|
[key: string]: any;
|
|
35
40
|
}>[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Component, type HTMLAttributes, type MaybeRef, type MaybeRefOrGetter, type TdHTMLAttributes, type ThHTMLAttributes, type WatchSource } from "vue";
|
|
2
2
|
import { type OnyxI18n } from "../../../i18n";
|
|
3
3
|
import type { DatetimeFormat } from "../../../i18n/datetime-formats";
|
|
4
|
+
import { type OrderableMapping } from "../../../utils/feature";
|
|
4
5
|
import type { OnyxMenuItem } from "../../OnyxNavBar/modules";
|
|
5
6
|
import type { TableColumnGroup } from "../../OnyxTable/types";
|
|
6
7
|
import type { DataGridRendererCell, DataGridRendererColumn, DataGridRendererRow } from "../OnyxDataGridRenderer/types";
|
|
@@ -9,9 +10,7 @@ import type { BASE_FEATURE } from "./base/base";
|
|
|
9
10
|
/**
|
|
10
11
|
* Function type for modifying the normalized column configuration.
|
|
11
12
|
*/
|
|
12
|
-
export type ModifyColumns<TEntry extends DataGridEntry> =
|
|
13
|
-
func: (columns: Readonly<InternalColumnConfig<TEntry>[]>) => InternalColumnConfig<TEntry>[];
|
|
14
|
-
};
|
|
13
|
+
export type ModifyColumns<TEntry extends DataGridEntry> = OrderableMapping<InternalColumnConfig<TEntry>[]>;
|
|
15
14
|
export type HeaderCellProps<TOptions = unknown> = {
|
|
16
15
|
label: string;
|
|
17
16
|
typeOptions?: TOptions;
|
|
@@ -125,7 +124,7 @@ export type DataGridFeature<TEntry extends DataGridEntry, TTypeRenderer extends
|
|
|
125
124
|
* @example
|
|
126
125
|
* ```ts
|
|
127
126
|
* {
|
|
128
|
-
* modifyColumns: (config) => configs.map(column => ({ ...column, type: "newType" }));
|
|
127
|
+
* modifyColumns: [ { func: (config) => configs.map(column => ({ ...column, type: "newType" })) } ];
|
|
129
128
|
* }
|
|
130
129
|
* ```
|
|
131
130
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
-
import { type ModifyColumns } from "..";
|
|
3
2
|
import type { DataGridEntry } from "../../types";
|
|
4
3
|
import "./selection.scss";
|
|
5
4
|
import type { SelectionOptions, SelectionState } from "./types";
|
|
@@ -7,7 +6,7 @@ export declare const SELECTION_FEATURE: unique symbol;
|
|
|
7
6
|
export declare const useSelection: <TEntry extends DataGridEntry>(options?: SelectionOptions) => {
|
|
8
7
|
name: symbol;
|
|
9
8
|
watch: (Readonly<Ref<boolean, boolean>> | Ref<SelectionState, SelectionState>)[];
|
|
10
|
-
modifyColumns:
|
|
9
|
+
modifyColumns: import("../../../../utils/feature.ts").SingleOrderableMapping<import("..").InternalColumnConfig<TEntry, any>[], import("..").InternalColumnConfig<TEntry, any>[], readonly import("..").InternalColumnConfig<TEntry, any>[]>;
|
|
11
10
|
mutation: {
|
|
12
11
|
func: (rows: Readonly<any>[]) => Readonly<any>[];
|
|
13
12
|
order: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type OnyxNavBarProps } from "./types";
|
|
2
2
|
type __VLS_Slots = {
|
|
3
3
|
/**
|
|
4
|
-
* [`OnyxNavItem`](/docs/navigation-modules-navitem--docs) components should be placed and nested here to build the navigation.
|
|
4
|
+
* [`OnyxNavItem`](/docs/navigation-navbar-modules-navitem--docs) components should be placed and nested here to build the navigation.
|
|
5
5
|
*/
|
|
6
6
|
default?: () => unknown;
|
|
7
7
|
/**
|
|
@@ -11,7 +11,7 @@ type __VLS_Slots = {
|
|
|
11
11
|
/**
|
|
12
12
|
* Optional custom header actions to display inside a flyout menu.
|
|
13
13
|
* Will only be shown when hovering the notification card or focussing via keyboard.
|
|
14
|
-
* You must only put [OnyxMenuItem](
|
|
14
|
+
* You must only put [OnyxMenuItem](https://storybook.onyx.schwarz/?path=/docs/navigation-navbar-modules-menuitem--docs) components here.
|
|
15
15
|
*/
|
|
16
16
|
headerActions?: unknown;
|
|
17
17
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OnyxSidebarItemProps } from "./types";
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/**
|
|
4
|
+
* Content of the sidebar item.
|
|
5
|
+
*/
|
|
6
|
+
default(): unknown;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<OnyxSidebarItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxSidebarItemProps> & Readonly<{}>, {
|
|
9
|
+
active: boolean | "auto";
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DensityProp } from "../../../../composables/density";
|
|
2
|
+
import type { WithLinkProp } from "../../../OnyxRouterLink/types";
|
|
3
|
+
export type OnyxSidebarItemProps = DensityProp & WithLinkProp & {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the item is currently active.
|
|
6
|
+
* If "auto" and a [router](https://onyx.schwarz/development/router.html) is provided, the active state will be determined automatically based on the current route. (only when `link` property is set).
|
|
7
|
+
*/
|
|
8
|
+
active?: boolean | "auto";
|
|
9
|
+
};
|