sit-onyx 1.0.0-beta.232 → 1.0.0-beta.233

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.
@@ -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;
@@ -1,9 +1,30 @@
1
+ import type { ComputedRef } from "vue";
1
2
  export declare const BASE_FEATURE_SYMBOL: unique symbol;
3
+ export type BaseFeatureOptions = {
4
+ skeleton: ComputedRef<number | boolean>;
5
+ };
2
6
  /**
3
7
  * The Base feature includes everything that should be provided as built-in functionality of the `OnyxDataGrid` component.
4
8
  */
5
- export declare const BASE_FEATURE: {
9
+ export declare const BASE_FEATURE: ({ skeleton }: BaseFeatureOptions) => {
6
10
  readonly name: typeof BASE_FEATURE_SYMBOL;
11
+ readonly modifyColumns: {
12
+ readonly func: (columns: readonly import("..").InternalColumnConfig<any, any>[]) => {
13
+ type: {
14
+ name: string;
15
+ };
16
+ key: string | number | symbol;
17
+ width?: string | undefined;
18
+ columnGroupKey?: string | number | symbol | undefined;
19
+ tdAttributes?: import("vue").TdHTMLAttributes;
20
+ thAttributes?: import("vue").ThHTMLAttributes;
21
+ label: string;
22
+ }[] | import("..").InternalColumnConfig<any, any>[];
23
+ };
24
+ readonly mutation: {
25
+ readonly func: (rows: Readonly<any>[]) => {}[];
26
+ };
27
+ readonly watch: [ComputedRef<number | boolean>];
7
28
  readonly typeRenderer: {
8
29
  readonly number: Readonly<import("..").TypeRenderer<import("../../types").DataGridEntry, import("../renderer").NumberCellOptions>>;
9
30
  readonly string: Readonly<import("..").TypeRenderer<import("../../types").DataGridEntry, import("../renderer").StringCellOptions>>;
@@ -11,5 +32,6 @@ export declare const BASE_FEATURE: {
11
32
  readonly "datetime-local": Readonly<import("..").TypeRenderer<import("../../types").DataGridEntry, import("../renderer").DateCellOptions>>;
12
33
  readonly time: Readonly<import("..").TypeRenderer<import("../../types").DataGridEntry, import("../renderer").DateCellOptions>>;
13
34
  readonly timestamp: Readonly<import("..").TypeRenderer<import("../../types").DataGridEntry, import("../renderer").DateCellOptions>>;
35
+ readonly skeleton: Readonly<import("..").TypeRenderer<import("../../types").DataGridEntry, import("../renderer").StringCellOptions>>;
14
36
  };
15
37
  };
@@ -35,7 +35,7 @@ export type TypeRenderMap<TEntry extends DataGridEntry, TKey extends PropertyKey
35
35
  /**
36
36
  * ColumnConfig as it can be defined by the user.
37
37
  */
38
- export type ColumnConfig<TEntry extends DataGridEntry, TColumnGroup extends ColumnGroupConfig = Record<string, never>, TTypes extends ColumnConfigTypeOption<PropertyKey, unknown> = never> = keyof TEntry | PublicNormalizedColumnConfig<TEntry, TColumnGroup, TTypes | RenderTypesFromFeature<[typeof BASE_FEATURE]>>;
38
+ export type ColumnConfig<TEntry extends DataGridEntry, TColumnGroup extends ColumnGroupConfig = Record<string, never>, TTypes extends ColumnConfigTypeOption<PropertyKey, unknown> = never> = keyof TEntry | PublicNormalizedColumnConfig<TEntry, TColumnGroup, TTypes | RenderTypesFromFeature<[ReturnType<typeof BASE_FEATURE>]>>;
39
39
  export type DefaultSupportedTypes = "string" | "number" | DatetimeFormat;
40
40
  /**
41
41
  * Configuration for the column groupings.
@@ -42,6 +42,7 @@ export declare const DATE_RENDERER: Readonly<TypeRenderer<DataGridEntry, DateCel
42
42
  export declare const DATETIME_RENDERER: Readonly<TypeRenderer<DataGridEntry, DateCellOptions>>;
43
43
  export declare const TIME_RENDERER: Readonly<TypeRenderer<DataGridEntry, DateCellOptions>>;
44
44
  export declare const TIMESTAMP_RENDERER: Readonly<TypeRenderer<DataGridEntry, DateCellOptions>>;
45
+ export declare const SKELETON_RENDERER: Readonly<TypeRenderer<DataGridEntry, StringCellOptions>>;
45
46
  export declare const createRenderer: <TEntry extends DataGridEntry>(features: DataGridFeature<TEntry, TypeRenderMap<TEntry>, symbol>[]) => {
46
47
  /**
47
48
  * Returns a renderer for any given component and type.
@@ -1,3 +1,4 @@
1
+ import type { SkeletonInjected } from "src/composables/useSkeletonState";
1
2
  import type { IfExtends, IfNotEmpty, MaybePick, RecordValues, UnionByKey } from "../../types";
2
3
  import type { ColumnConfig, ColumnConfigTypeOption, ColumnGroupConfig, DataGridFeature, TypeRenderer, TypeRenderMap } from "./features";
3
4
  import type { BASE_FEATURE } from "./features/base/base";
@@ -17,7 +18,7 @@ export type RenderTypesFromFeature<TFeatures extends DataGridFeature<any, any, a
17
18
  * @experimental The DataGrid is still working in progress and the props will change in the future.
18
19
  */
19
20
  export type OnyxDataGridProps<TEntry extends DataGridEntry, TColumnGroup extends ColumnGroupConfig, TTypeRenderer extends TypeRenderMap<TEntry>, TFeatureName extends symbol, TFeatures extends DataGridFeature<TEntry, TTypeRenderer, TFeatureName>[] = never, TTypes extends ColumnConfigTypeOption<PropertyKey, unknown> = RenderTypesFromFeature<[
20
- typeof BASE_FEATURE,
21
+ ReturnType<typeof BASE_FEATURE>,
21
22
  ...TFeatures
22
23
  ]>> = {
23
24
  /**
@@ -39,6 +40,10 @@ export type OnyxDataGridProps<TEntry extends DataGridEntry, TColumnGroup extends
39
40
  * The data that should be used to fill the datagrid.
40
41
  */
41
42
  data: TEntry[];
43
+ /**
44
+ * Whether to show skeleton rows. Can be set to `true` to use a pre-defined skeleton row count or you can pass a number tospecific the count.
45
+ */
46
+ skeleton?: SkeletonInjected;
42
47
  };
43
48
  /**
44
49
  * "Raw" user data for a data grid entry/row, e.g. fetched from a backend service.
@@ -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;