sit-onyx 1.0.0-beta.241 → 1.0.0-beta.243
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/examples/AsyncExample.vue.d.ts +2 -0
- package/dist/components/OnyxDataGrid/features/base/base.d.ts +1 -1
- package/dist/components/OnyxDataGrid/features/filtering/filtering.d.ts +1 -3
- package/dist/components/OnyxDataGrid/features/filtering/types.d.ts +12 -11
- package/dist/components/OnyxDataGrid/features/hideColumns/hideColumns.d.ts +1 -1
- package/dist/components/OnyxDataGrid/features/hideColumns/types.d.ts +1 -1
- package/dist/components/OnyxDataGrid/features/index.d.ts +36 -9
- package/dist/components/OnyxDataGrid/features/renderer.d.ts +2 -2
- package/dist/components/OnyxDataGrid/features/resizing/resizing.d.ts +1 -1
- package/dist/components/OnyxDataGrid/features/resizing/types.d.ts +1 -1
- package/dist/components/OnyxDataGrid/features/selection/selection.d.ts +1 -1
- package/dist/components/OnyxDataGrid/features/sorting/sorting.d.ts +2 -2
- package/dist/components/OnyxDataGrid/features/sorting/types.d.ts +7 -7
- package/dist/components/OnyxDataGrid/features/stickyColumns/stickyColumns.d.ts +1 -1
- package/dist/components/OnyxDataGrid/types.d.ts +6 -1
- package/dist/components/OnyxNotificationCard/OnyxNotificationCard.vue.d.ts +3 -1
- package/dist/components/OnyxNotificationCard/types.d.ts +5 -0
- package/dist/components/OnyxSelect/OnyxSelect.vue.d.ts +2 -1
- package/dist/components/examples/NotificationCenter/NotificationCenter.vue.d.ts +13 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.js +3005 -2976
- package/dist/style.css +1 -1
- package/dist/utils/objects.d.ts +6 -0
- package/package.json +3 -3
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -7,7 +7,7 @@ export type BaseFeatureOptions = {
|
|
|
7
7
|
/**
|
|
8
8
|
* The Base feature includes everything that should be provided as built-in functionality of the `OnyxDataGrid` component.
|
|
9
9
|
*/
|
|
10
|
-
export declare const BASE_FEATURE: ({ skeleton }: BaseFeatureOptions) => {
|
|
10
|
+
export declare const BASE_FEATURE: ({ skeleton }: BaseFeatureOptions) => () => {
|
|
11
11
|
readonly name: typeof BASE_FEATURE_SYMBOL;
|
|
12
12
|
readonly modifyColumns: {
|
|
13
13
|
readonly func: (columns: readonly import("..").InternalColumnConfig<any, any>[]) => {
|
|
@@ -3,11 +3,9 @@ import type { DataGridEntry } from "../../types";
|
|
|
3
3
|
import "./filtering.scss";
|
|
4
4
|
import type { FilterOptions } from "./types";
|
|
5
5
|
export declare const FILTERING_FEATURE: unique symbol;
|
|
6
|
-
export
|
|
7
|
-
export declare const useFiltering: <TEntry extends DataGridEntry>(options?: FilterOptions<TEntry>) => {
|
|
6
|
+
export declare const useFiltering: <TEntry extends DataGridEntry>(options?: FilterOptions<TEntry>) => (ctx: import("..").DataGridFeatureContext) => {
|
|
8
7
|
name: symbol;
|
|
9
8
|
watch: (Ref<Partial<Record<keyof DataGridEntry, string | undefined>>, Partial<Record<keyof DataGridEntry, string | undefined>>> | import("vue").ComputedRef<{ [TKey in keyof TEntry]?: ({ [TKey_1 in keyof TEntry]?: {
|
|
10
|
-
searchTerm?: string;
|
|
11
9
|
config?: import("./types").FilterConfig<TEntry> | undefined;
|
|
12
10
|
} | undefined; }[TKey] & {
|
|
13
11
|
enabled?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
1
2
|
import type { DataGridFeatureOptions } from "..";
|
|
2
3
|
import type { DataGridEntry } from "../../types";
|
|
3
4
|
/**
|
|
@@ -41,25 +42,25 @@ export type FilterConfig<TEntry extends DataGridEntry> = {
|
|
|
41
42
|
*/
|
|
42
43
|
exactMatch?: boolean;
|
|
43
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Defines the current filter/search term per column
|
|
47
|
+
*/
|
|
48
|
+
export type FilterState<TEntry> = Partial<Record<keyof TEntry, string | undefined>>;
|
|
44
49
|
/**
|
|
45
50
|
* The configuration options for the filtering feature in the OnyxDataGrid component.
|
|
46
51
|
* Includes settings for the individual columns and general filter behavior.
|
|
47
52
|
*/
|
|
48
53
|
export type FilterOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry, {
|
|
49
|
-
/**
|
|
50
|
-
* Configuration for how the filtering should behave across all columns.
|
|
51
|
-
*/
|
|
52
|
-
filterConfig?: FilterConfig<TEntry>;
|
|
53
|
-
}, {
|
|
54
54
|
[TKey in keyof TEntry]?: {
|
|
55
|
-
/**
|
|
56
|
-
* The filter value for this column.
|
|
57
|
-
* This value will be used to filter the data in this column.
|
|
58
|
-
*/
|
|
59
|
-
searchTerm?: string;
|
|
60
55
|
/**
|
|
61
56
|
* Configuration for how filtering should behave for this column.
|
|
62
57
|
*/
|
|
63
58
|
config?: FilterConfig<TEntry>;
|
|
64
59
|
};
|
|
65
|
-
}
|
|
60
|
+
}, true> & {
|
|
61
|
+
filterState?: Ref<FilterState<TEntry>>;
|
|
62
|
+
/**
|
|
63
|
+
* Configuration for how the filtering should behave across all columns.
|
|
64
|
+
*/
|
|
65
|
+
filterConfig?: FilterConfig<TEntry>;
|
|
66
|
+
};
|
|
@@ -5,7 +5,7 @@ import "./hideColumns.scss";
|
|
|
5
5
|
import type { HideColumnsOptions } from "./types";
|
|
6
6
|
export declare const HIDE_COLUMNS_FEATURE: unique symbol;
|
|
7
7
|
export declare const HIDDEN_COLUMN: unique symbol;
|
|
8
|
-
export declare const useHideColumns: <TEntry extends DataGridEntry>(options?: HideColumnsOptions<TEntry>) => {
|
|
8
|
+
export declare const useHideColumns: <TEntry extends DataGridEntry>(options?: HideColumnsOptions<TEntry>) => (ctx: import("..").DataGridFeatureContext) => {
|
|
9
9
|
name: symbol;
|
|
10
10
|
watch: Ref<Set<keyof TEntry>, Set<keyof TEntry>>[];
|
|
11
11
|
modifyColumns: {
|
|
@@ -3,7 +3,7 @@ import type { DataGridEntry } from "../../types";
|
|
|
3
3
|
/**
|
|
4
4
|
* The options of the sorting feature for the OnyxDataGrid component.
|
|
5
5
|
*/
|
|
6
|
-
export type HideColumnsOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry,
|
|
6
|
+
export type HideColumnsOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry, {
|
|
7
7
|
[TKey in keyof TEntry]?: {
|
|
8
8
|
/**
|
|
9
9
|
* Whether the column is hidden.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component, type HTMLAttributes, type MaybeRef, type MaybeRefOrGetter, type TdHTMLAttributes, type ThHTMLAttributes, type WatchSource } from "vue";
|
|
1
|
+
import { type Component, type HTMLAttributes, type MaybeRef, type MaybeRefOrGetter, type Ref, 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
4
|
import { type OrderableMapping } from "../../../utils/feature";
|
|
@@ -83,16 +83,33 @@ export type PublicNormalizedColumnConfig<TEntry extends DataGridEntry, TColumnGr
|
|
|
83
83
|
/**
|
|
84
84
|
* Key of the ColumnGroup that this column should be visually grouped in.
|
|
85
85
|
* The columns have to be defined in the correct order.
|
|
86
|
-
* So columns that should be grouped together have to actually be defined after
|
|
86
|
+
* So columns that should be grouped together have to actually be defined after each other.
|
|
87
87
|
*
|
|
88
88
|
* The label for the column group can be configured via the `columnGroups` prop.
|
|
89
89
|
*/
|
|
90
90
|
columnGroupKey?: keyof TColumnGroup;
|
|
91
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* Context that is passed to a feature when it is set up by the `useDataGridFeatures` composable.
|
|
94
|
+
*/
|
|
95
|
+
export type DataGridFeatureContext = {
|
|
96
|
+
/**
|
|
97
|
+
* Ref for the `async` state of the `OnyxDataGrid`. If `true` data mutations should be skipped, if they are expected to be handled by a backend.
|
|
98
|
+
*/
|
|
99
|
+
async: Readonly<Ref<boolean>>;
|
|
100
|
+
/**
|
|
101
|
+
* The `i18n` object, which can be used to access messages, formatters and the current locale.
|
|
102
|
+
*/
|
|
103
|
+
i18n: OnyxI18n;
|
|
104
|
+
};
|
|
92
105
|
/**
|
|
93
106
|
* Complete Type for a single data grid feature.
|
|
94
107
|
*/
|
|
95
|
-
export type DataGridFeature<TEntry extends DataGridEntry, TTypeRenderer extends TypeRenderMap<TEntry> = TypeRenderMap<TEntry>, TFeatureName extends symbol = symbol> =
|
|
108
|
+
export type DataGridFeature<TEntry extends DataGridEntry, TTypeRenderer extends TypeRenderMap<TEntry> = TypeRenderMap<TEntry>, TFeatureName extends symbol = symbol> = (ctx: DataGridFeatureContext) => DataGridFeatureDescription<TEntry, TTypeRenderer, TFeatureName>;
|
|
109
|
+
/**
|
|
110
|
+
* Object that describes the hooks and properties of a datagrid feature.
|
|
111
|
+
*/
|
|
112
|
+
export type DataGridFeatureDescription<TEntry extends DataGridEntry, TTypeRenderer extends TypeRenderMap<TEntry> = TypeRenderMap<TEntry>, TFeatureName extends symbol = symbol> = {
|
|
96
113
|
/**
|
|
97
114
|
* Unique name and identifier of the datagrid feature
|
|
98
115
|
*/
|
|
@@ -113,7 +130,7 @@ export type DataGridFeature<TEntry extends DataGridEntry, TTypeRenderer extends
|
|
|
113
130
|
order?: number;
|
|
114
131
|
};
|
|
115
132
|
/**
|
|
116
|
-
* Defines a renderer for a type.
|
|
133
|
+
* Defines a renderer for a column type.
|
|
117
134
|
*/
|
|
118
135
|
typeRenderer?: TTypeRenderer;
|
|
119
136
|
/**
|
|
@@ -153,7 +170,7 @@ export type DataGridFeature<TEntry extends DataGridEntry, TTypeRenderer extends
|
|
|
153
170
|
};
|
|
154
171
|
scrollContainerAttributes?: () => HTMLAttributes;
|
|
155
172
|
};
|
|
156
|
-
export type DataGridFeatureOptions<TEntry extends DataGridEntry,
|
|
173
|
+
export type DataGridFeatureOptions<TEntry extends DataGridEntry, TColumnOptions extends Partial<Record<keyof TEntry, object>>, TWithAsync extends boolean = false> = {
|
|
157
174
|
/**
|
|
158
175
|
* Whether the feature is enabled by default. Can be overridden per column.
|
|
159
176
|
*
|
|
@@ -171,7 +188,12 @@ export type DataGridFeatureOptions<TEntry extends DataGridEntry, TOptions extend
|
|
|
171
188
|
enabled?: boolean;
|
|
172
189
|
};
|
|
173
190
|
} | undefined>;
|
|
174
|
-
}
|
|
191
|
+
} & (TWithAsync extends true ? {
|
|
192
|
+
/**
|
|
193
|
+
* When async is `true`, then the internal data transformations of this feature are disabled and have to be performed manually.
|
|
194
|
+
*/
|
|
195
|
+
async?: boolean;
|
|
196
|
+
} : unknown);
|
|
175
197
|
/**
|
|
176
198
|
* Helper function that checks the generics of the DataGridFeature type, without breaking type inference.
|
|
177
199
|
* @example
|
|
@@ -192,12 +214,13 @@ export type DataGridFeatureOptions<TEntry extends DataGridEntry, TOptions extend
|
|
|
192
214
|
* });
|
|
193
215
|
* ```
|
|
194
216
|
*/
|
|
195
|
-
export declare function createFeature<
|
|
217
|
+
export declare function createFeature<TFeature extends DataGridFeature<any, any, any>, T extends CheckDataGridFeature<TFeature>>(featureDefinition: T): T;
|
|
196
218
|
type CheckDataGridFeature<T> = T extends DataGridFeature<infer A, TypeRenderMap<infer A>, infer C> ? DataGridFeature<A, TypeRenderMap<A>, C> : never;
|
|
197
219
|
export type UseDataGridFeaturesOptions<TEntry extends DataGridEntry, TColumnGroup extends ColumnGroupConfig, TTypes extends ColumnConfigTypeOption<PropertyKey, unknown>> = {
|
|
198
220
|
columnConfig: MaybeRefOrGetter<ColumnConfig<TEntry, TColumnGroup, TTypes>[]>;
|
|
199
221
|
i18n: OnyxI18n;
|
|
200
222
|
columnGroups: MaybeRefOrGetter<TColumnGroup>;
|
|
223
|
+
async: Readonly<Ref<boolean>>;
|
|
201
224
|
};
|
|
202
225
|
export declare const createTableColumnGroups: <TEntry extends DataGridEntry, TColumnGroup extends ColumnGroupConfig>(columns?: InternalColumnConfig<TEntry, TColumnGroup>[], columnGroups?: ColumnGroupConfig) => TableColumnGroup[] | undefined;
|
|
203
226
|
/**
|
|
@@ -234,7 +257,7 @@ export declare const createTableColumnGroups: <TEntry extends DataGridEntry, TCo
|
|
|
234
257
|
* </template>
|
|
235
258
|
* ```
|
|
236
259
|
*/
|
|
237
|
-
export declare const useDataGridFeatures: <TEntry extends DataGridEntry, TFeatureName extends symbol, TTypeRenderer extends TypeRenderMap<TEntry>, TColumnGroup extends ColumnGroupConfig, TTypes extends ColumnConfigTypeOption<PropertyKey, unknown>, T extends DataGridFeature<TEntry, TTypeRenderer, TFeatureName>[] | []>(
|
|
260
|
+
export declare const useDataGridFeatures: <TEntry extends DataGridEntry, TFeatureName extends symbol, TTypeRenderer extends TypeRenderMap<TEntry>, TColumnGroup extends ColumnGroupConfig, TTypes extends ColumnConfigTypeOption<PropertyKey, unknown>, T extends DataGridFeature<TEntry, TTypeRenderer, TFeatureName>[] | []>(featureDefinitions: T, { i18n, columnConfig, columnGroups, async, }: UseDataGridFeaturesOptions<TEntry, TColumnGroup, TTypes>) => {
|
|
238
261
|
/**
|
|
239
262
|
* Takes the table attributes and maps all
|
|
240
263
|
*/
|
|
@@ -247,7 +270,7 @@ export declare const useDataGridFeatures: <TEntry extends DataGridEntry, TFeatur
|
|
|
247
270
|
createRendererColumns: () => DataGridRendererColumn<TEntry>[];
|
|
248
271
|
watchSources: WatchSource[];
|
|
249
272
|
};
|
|
250
|
-
export declare const
|
|
273
|
+
export declare const useFeatureContext: (ctx: DataGridFeatureContext, options?: DataGridFeatureOptions<DataGridEntry, object, boolean>) => {
|
|
251
274
|
/**
|
|
252
275
|
* Checks whether a data grid feature is enabled for a given column.
|
|
253
276
|
* Considers the feature defaults as well as column-specific overrides.
|
|
@@ -255,5 +278,9 @@ export declare const useIsFeatureEnabled: (options?: DataGridFeatureOptions<Data
|
|
|
255
278
|
* @default true
|
|
256
279
|
*/
|
|
257
280
|
isEnabled: import("vue").ComputedRef<(column: PropertyKey) => boolean>;
|
|
281
|
+
/**
|
|
282
|
+
* Whether the feature only or all features have data transformations enabled.
|
|
283
|
+
*/
|
|
284
|
+
isAsync: import("vue").ComputedRef<boolean>;
|
|
258
285
|
};
|
|
259
286
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type DataGridFeatureDescription, type TypeRenderer, type TypeRenderMap } from ".";
|
|
2
2
|
import { type OnyxDateFormatOptions, type OnyxNumberFormatOptions } from "../../../i18n";
|
|
3
3
|
import type { DataGridEntry } from "../types";
|
|
4
4
|
import "./renderer.scss";
|
|
@@ -43,7 +43,7 @@ export declare const DATETIME_RENDERER: Readonly<TypeRenderer<DataGridEntry, Dat
|
|
|
43
43
|
export declare const TIME_RENDERER: Readonly<TypeRenderer<DataGridEntry, DateCellOptions>>;
|
|
44
44
|
export declare const TIMESTAMP_RENDERER: Readonly<TypeRenderer<DataGridEntry, DateCellOptions>>;
|
|
45
45
|
export declare const SKELETON_RENDERER: Readonly<TypeRenderer<DataGridEntry, StringCellOptions>>;
|
|
46
|
-
export declare const createRenderer: <TEntry extends DataGridEntry>(features:
|
|
46
|
+
export declare const createRenderer: <TEntry extends DataGridEntry>(features: DataGridFeatureDescription<TEntry, TypeRenderMap<TEntry>, symbol>[]) => {
|
|
47
47
|
/**
|
|
48
48
|
* Returns a renderer for any given component and type.
|
|
49
49
|
* Uses the fallbackRenderer if necessary.
|
|
@@ -5,7 +5,7 @@ import "./resizing.scss";
|
|
|
5
5
|
import type { ResizingOptions } from "./types";
|
|
6
6
|
export declare const RESIZING_FEATURE: unique symbol;
|
|
7
7
|
export declare const EMPTY_COLUMN: unique symbol;
|
|
8
|
-
export declare const useResizing: <TEntry extends DataGridEntry>(options?: ResizingOptions<TEntry>) => {
|
|
8
|
+
export declare const useResizing: <TEntry extends DataGridEntry>(options?: ResizingOptions<TEntry>) => (ctx: import("..").DataGridFeatureContext) => {
|
|
9
9
|
name: symbol;
|
|
10
10
|
watch: import("vue").Ref<boolean, boolean>[];
|
|
11
11
|
modifyColumns: {
|
|
@@ -4,4 +4,4 @@ import type { DataGridEntry } from "../../types";
|
|
|
4
4
|
* The configuration options for the resizing feature in the OnyxDataGrid component.
|
|
5
5
|
* Includes settings for the individual columns and general resizing behavior.
|
|
6
6
|
*/
|
|
7
|
-
export type ResizingOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry, object
|
|
7
|
+
export type ResizingOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry, object>;
|
|
@@ -3,7 +3,7 @@ import type { DataGridEntry } from "../../types";
|
|
|
3
3
|
import "./selection.scss";
|
|
4
4
|
import type { SelectionOptions, SelectionState } from "./types";
|
|
5
5
|
export declare const SELECTION_FEATURE: unique symbol;
|
|
6
|
-
export declare const useSelection: <TEntry extends DataGridEntry>(options?: SelectionOptions) => {
|
|
6
|
+
export declare const useSelection: <TEntry extends DataGridEntry>(options?: SelectionOptions) => ({ i18n }: import("..").DataGridFeatureContext) => {
|
|
7
7
|
name: symbol;
|
|
8
8
|
watch: (Readonly<Ref<boolean, boolean>> | Ref<SelectionState, SelectionState>)[];
|
|
9
9
|
modifyColumns: import("../../../../utils/feature.ts").SingleOrderableMapping<import("..").InternalColumnConfig<TEntry, any>[], import("..").InternalColumnConfig<TEntry, any>[], readonly import("..").InternalColumnConfig<TEntry, any>[]>;
|
|
@@ -3,11 +3,11 @@ import type { DataGridEntry } from "../../types";
|
|
|
3
3
|
import type { SortDirection, SortOptions, SortState } from "./types";
|
|
4
4
|
export declare const nextSortDirection: (current?: SortDirection, skipNone?: boolean) => SortDirection;
|
|
5
5
|
export declare const SORTING_FEATURE: unique symbol;
|
|
6
|
-
export declare const useSorting: <TEntry extends DataGridEntry>(options?: SortOptions<TEntry>) => {
|
|
6
|
+
export declare const useSorting: <TEntry extends DataGridEntry>(options?: SortOptions<TEntry>) => (ctx: import("..").DataGridFeatureContext) => {
|
|
7
7
|
name: symbol;
|
|
8
8
|
watch: (Ref<SortState<TEntry>, SortState<TEntry>> | import("vue").ComputedRef<(a: unknown, b: unknown) => number>)[];
|
|
9
9
|
mutation: {
|
|
10
|
-
func: (data: Readonly<TEntry>[]) =>
|
|
10
|
+
func: (data: Readonly<TEntry>[]) => Readonly<TEntry>[];
|
|
11
11
|
};
|
|
12
12
|
header: {
|
|
13
13
|
actions: ({ key: column, label }: import("..").InternalColumnConfig<any, any>) => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MaybeRef } from "vue";
|
|
2
2
|
import type { DataGridFeatureOptions } from "..";
|
|
3
3
|
import type { DataGridEntry } from "../../types";
|
|
4
4
|
export type SortDirection = "asc" | "desc" | "none";
|
|
@@ -28,11 +28,6 @@ export type SortState<TEntry extends DataGridEntry> = {
|
|
|
28
28
|
* The options of the sorting feature for the OnyxDataGrid component.
|
|
29
29
|
*/
|
|
30
30
|
export type SortOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<TEntry, {
|
|
31
|
-
/**
|
|
32
|
-
* The currently applied sorting. Will be updated by the data grid, can be used for reading, updating and watching the applied sorting.
|
|
33
|
-
*/
|
|
34
|
-
sortState?: MaybeRef<SortState<TEntry>>;
|
|
35
|
-
}, {
|
|
36
31
|
[TKey in keyof TEntry]?: {
|
|
37
32
|
/**
|
|
38
33
|
* A custom sorting function for this column.
|
|
@@ -40,4 +35,9 @@ export type SortOptions<TEntry extends DataGridEntry> = DataGridFeatureOptions<T
|
|
|
40
35
|
*/
|
|
41
36
|
sortFunc?: Compare<TEntry[TKey]>;
|
|
42
37
|
};
|
|
43
|
-
}
|
|
38
|
+
}, true> & {
|
|
39
|
+
/**
|
|
40
|
+
* The currently applied sorting. Will be updated by the data grid, can be used for reading, updating and watching the applied sorting.
|
|
41
|
+
*/
|
|
42
|
+
sortState?: MaybeRef<SortState<TEntry>>;
|
|
43
|
+
};
|
|
@@ -4,7 +4,7 @@ import type { DataGridEntry } from "../../types";
|
|
|
4
4
|
import "./stickyColumns.scss";
|
|
5
5
|
import type { StickyColumnsOptions } from "./types";
|
|
6
6
|
export declare const STICKY_COLUMNS_FEATURE: unique symbol;
|
|
7
|
-
export declare const useStickyColumns: <TEntry extends DataGridEntry>(options?: StickyColumnsOptions<TEntry>) => {
|
|
7
|
+
export declare const useStickyColumns: <TEntry extends DataGridEntry>(options?: StickyColumnsOptions<TEntry>) => () => {
|
|
8
8
|
name: symbol;
|
|
9
9
|
watch: (import("vue").Ref<boolean, boolean> | import("vue").ComputedRef<"left" | "right"> | import("vue").ComputedRef<(keyof TEntry)[]>)[];
|
|
10
10
|
modifyColumns: ModifyColumns<TEntry>;
|
|
@@ -14,7 +14,7 @@ export type MapTypeRenderOptions<T> = {
|
|
|
14
14
|
/**
|
|
15
15
|
* Unwraps the defined typeRenderers
|
|
16
16
|
*/
|
|
17
|
-
export type RenderTypesFromFeature<TFeatures extends DataGridFeature<any, any, any>[]> = IfExtends<RecordValues<MapTypeRenderOptions<IfNotEmpty<MaybePick<UnionByKey<TFeatures[number]
|
|
17
|
+
export type RenderTypesFromFeature<TFeatures extends DataGridFeature<any, any, any>[]> = IfExtends<RecordValues<MapTypeRenderOptions<IfNotEmpty<MaybePick<UnionByKey<ReturnType<TFeatures[number]>>, "typeRenderer">>>>, ColumnConfigTypeOption<PropertyKey, unknown>>;
|
|
18
18
|
/**
|
|
19
19
|
* @experimental The DataGrid is still working in progress and the props will change in the future.
|
|
20
20
|
*/
|
|
@@ -29,6 +29,11 @@ export type OnyxDataGridProps<TEntry extends DataGridEntry, TColumnGroup extends
|
|
|
29
29
|
* Check the Storybook examples (e.g. [Sorting](/?path=/story/data-datagrid-features--sorting)) for more details on how the features are used and configured.
|
|
30
30
|
*/
|
|
31
31
|
features?: TFeatures;
|
|
32
|
+
/**
|
|
33
|
+
* When `async` is `true`, the data transformation of supported features is disabled and externalized.
|
|
34
|
+
* This allows for backend handling of data fetching and data transformation.
|
|
35
|
+
*/
|
|
36
|
+
async?: boolean;
|
|
32
37
|
/**
|
|
33
38
|
* The order of and which columns should be rendered.
|
|
34
39
|
*/
|
|
@@ -15,7 +15,9 @@ type __VLS_Slots = {
|
|
|
15
15
|
*/
|
|
16
16
|
headerActions?: unknown;
|
|
17
17
|
};
|
|
18
|
-
declare const __VLS_component: import("vue").DefineComponent<OnyxNotificationCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxNotificationCardProps> & Readonly<{}>, {
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<OnyxNotificationCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxNotificationCardProps> & Readonly<{}>, {
|
|
19
|
+
skeleton: import("../../composables/useSkeletonState").SkeletonInjected;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
21
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
20
22
|
export default _default;
|
|
21
23
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DensityProp } from "../../composables/density";
|
|
2
|
+
import type { SkeletonInjected } from "../../composables/useSkeletonState";
|
|
2
3
|
import type { DateValue } from "../OnyxDatePicker/types";
|
|
3
4
|
export type OnyxNotificationCardProps = DensityProp & {
|
|
4
5
|
/**
|
|
@@ -17,4 +18,8 @@ export type OnyxNotificationCardProps = DensityProp & {
|
|
|
17
18
|
* Optional icon to show.
|
|
18
19
|
*/
|
|
19
20
|
icon?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether to show a skeleton.
|
|
23
|
+
*/
|
|
24
|
+
skeleton?: SkeletonInjected;
|
|
20
25
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
1
2
|
import type { Nullable, SelectOptionValue } from "../../types";
|
|
2
3
|
import type { OnyxSelectProps, SelectOption } from "./types";
|
|
3
4
|
declare const _default: <TModelValue extends SelectOptionValue | SelectOptionValue[], TMultiple extends TModelValue extends any[] ? true : false | undefined, TValue extends TModelValue extends (infer TInner)[] ? TInner : TModelValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
@@ -9,7 +10,7 @@ declare const _default: <TModelValue extends SelectOptionValue | SelectOptionVal
|
|
|
9
10
|
readonly "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
10
11
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onValidityChange" | "onUpdate:open" | "onLazyLoad" | "onUpdate:searchTerm"> & OnyxSelectProps<TModelValue, TMultiple, TValue> & Partial<{}>> & import("vue").PublicProps;
|
|
11
12
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
12
|
-
input:
|
|
13
|
+
input: ComputedRef<HTMLInputElement | null | undefined>;
|
|
13
14
|
}>): void;
|
|
14
15
|
attrs: any;
|
|
15
16
|
slots: {
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { type OnyxNotificationCardProps } from "../../..";
|
|
2
|
+
/**
|
|
3
|
+
* Custom notification type for your project. This can also include custom properties depending in your needs (e.g. an ID etc.).
|
|
4
|
+
*/
|
|
5
|
+
type MyNotification = OnyxNotificationCardProps & {
|
|
6
|
+
/**
|
|
7
|
+
* Description/content of the notification.
|
|
8
|
+
*/
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<MyNotification, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MyNotification> & Readonly<{}>, {
|
|
12
|
+
skeleton: import("../../../composables/useSkeletonState").SkeletonInjected;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
14
|
export default _default;
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export type OnyxI18n = ReturnType<typeof createI18n>;
|
|
|
73
73
|
/**
|
|
74
74
|
* Creates a new i18n instance.
|
|
75
75
|
*/
|
|
76
|
-
declare const createI18n: (options?: ProvideI18nOptions) => {
|
|
76
|
+
export declare const createI18n: (options?: ProvideI18nOptions) => {
|
|
77
77
|
t: Readonly<import("vue").Ref<TranslationFunction, TranslationFunction>>;
|
|
78
78
|
locale: Readonly<import("vue").Ref<string, string>>;
|
|
79
79
|
d: import("vue").ComputedRef<(date: DateValue, format?: OnyxDateFormatOptions) => string>;
|