@omnitend/dashboard-for-laravel 0.22.0 → 0.24.0

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.
@@ -67,7 +67,18 @@ type __VLS_Slots = {} & {
67
67
  } & {
68
68
  default?: (props: typeof __VLS_37) => any;
69
69
  };
70
- declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
70
+ declare const __VLS_component: import("vue").DefineComponent<Props, {
71
+ /**
72
+ * Show/hide the sidebar (same as clicking the navbar's hamburger). The
73
+ * dashboard owns the visibility state, so this is the supported way to drive
74
+ * it from outside — page content, a custom brand row, a keyboard shortcut.
75
+ * Also available as a slot binding on every forwarded `sidebar-*`/`navbar-*`
76
+ * slot, which is usually more convenient.
77
+ */
78
+ toggleSidebar: () => void;
79
+ /** Whether the sidebar is currently hidden. */
80
+ sidebarHidden: import("vue").ComputedRef<boolean>;
81
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
71
82
  title: string;
72
83
  collapsibleGroups: boolean;
73
84
  autoCollapseInactiveGroups: boolean;
@@ -32,7 +32,12 @@ declare var __VLS_11: {}, __VLS_13: {}, __VLS_15: {
32
32
  } | null;
33
33
  }, __VLS_22: {
34
34
  initial: string;
35
- }, __VLS_24: {
35
+ user: {
36
+ [key: string]: any;
37
+ name: string;
38
+ email: string;
39
+ };
40
+ }, __VLS_27: {
36
41
  user: {
37
42
  [key: string]: any;
38
43
  name: string;
@@ -50,7 +55,7 @@ type __VLS_Slots = {} & {
50
55
  } & {
51
56
  'user-icon'?: (props: typeof __VLS_22) => any;
52
57
  } & {
53
- 'user-menu-items'?: (props: typeof __VLS_24) => any;
58
+ 'user-menu-items'?: (props: typeof __VLS_27) => any;
54
59
  };
55
60
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
56
61
  toggleSidebar: () => any;
@@ -112,10 +112,10 @@ declare var __VLS_1: {
112
112
  model: any;
113
113
  value: any;
114
114
  update: typeof setValue;
115
- }, __VLS_179: {
115
+ }, __VLS_198: {
116
116
  field: FieldDefinition;
117
117
  model: any;
118
- }, __VLS_184: {
118
+ }, __VLS_203: {
119
119
  field: FieldDefinition;
120
120
  model: any;
121
121
  };
@@ -160,9 +160,9 @@ type __VLS_Slots = {} & {
160
160
  } & {
161
161
  value?: (props: typeof __VLS_133) => any;
162
162
  } & {
163
- info?: (props: typeof __VLS_179) => any;
163
+ info?: (props: typeof __VLS_198) => any;
164
164
  } & {
165
- hint?: (props: typeof __VLS_184) => any;
165
+ hint?: (props: typeof __VLS_203) => any;
166
166
  };
167
167
  declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
168
168
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -6,6 +6,24 @@ export interface FilterOption {
6
6
  export interface TableField {
7
7
  key: string;
8
8
  label?: string;
9
+ /**
10
+ * The key this column's filter is sent under, when it differs from the
11
+ * column's own key (default: `key`). Lets a *display* column filter on a
12
+ * different server param — e.g. a "Customer" column rendering a name but
13
+ * filtering on `customer_id` — instead of forcing the column to be named
14
+ * after the server's filter param and the human-facing value into a
15
+ * `#cell` slot.
16
+ */
17
+ filterKey?: string;
18
+ /**
19
+ * For a `select` filter: adds an option meaning "has no value", e.g.
20
+ * `filterNullText: "Unassigned"` on an assignee column. Selecting it sends
21
+ * `filterNullValue` (default `"null"`) as the filter value; client-side, it
22
+ * matches rows whose value is null, undefined or empty.
23
+ */
24
+ filterNullText?: string;
25
+ /** The value sent when the `filterNullText` option is chosen. Default `"null"`. */
26
+ filterNullValue?: string;
9
27
  sortable?: boolean;
10
28
  hint?: string;
11
29
  filter?: FilterType;
@@ -142,6 +160,40 @@ export interface Props<TItem = any> {
142
160
  deleteGuard?: (item: TItem) => string | null | undefined;
143
161
  /** API endpoint for creating new items (e.g., "/api/products") — enables "New" button */
144
162
  createUrl?: string;
163
+ /**
164
+ * Render the built-in "New {item}" button in the card header (default
165
+ * `true` whenever `createUrl` is set). Set `false` to drive the create
166
+ * modal from your own trigger elsewhere — e.g. a button in the dashboard
167
+ * navbar's actions slot calling the exposed `openCreate()`. With no
168
+ * `title` and no `header` slot, the header is then dropped entirely
169
+ * rather than left empty.
170
+ */
171
+ showCreateButton?: boolean;
172
+ /**
173
+ * Render a `<tfoot>` mirroring the header row, so `#foot(<key>)` slots can
174
+ * hold per-column totals that line up under their data (#99). Without it
175
+ * there is no footer to put them in. For a fully custom footer, use the
176
+ * `custom-foot` slot instead.
177
+ */
178
+ footClone?: boolean;
179
+ /**
180
+ * Show a message row when there are no rows (default `true`). An empty
181
+ * table body is indistinguishable from a broken one, so the message is on
182
+ * by default. Override the wording with `emptyText`, or the whole row with
183
+ * the `empty` slot.
184
+ */
185
+ showEmpty?: boolean;
186
+ /**
187
+ * Message shown when there are no rows. Defaults to "No {items} found", or
188
+ * "No {items} match your filters" when a column filter is active.
189
+ */
190
+ emptyText?: string;
191
+ /**
192
+ * Rows currently expanded, as a `v-model`. Pair with the `row-expansion`
193
+ * slot to render detail content under a row (#112) instead of forcing every
194
+ * per-row detail into a modal.
195
+ */
196
+ expandedItems?: TItem[];
145
197
  /** Enable client-side filtering, sorting, and pagination on items array */
146
198
  clientSide?: boolean;
147
199
  }
@@ -150,6 +202,7 @@ declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_
150
202
  readonly "onUpdate:sortBy"?: ((sortBy: BTableSortBy[]) => any) | undefined;
151
203
  readonly "onUpdate:busy"?: ((busy: boolean) => any) | undefined;
152
204
  readonly onRowClicked?: ((item: T, index: number, event: MouseEvent) => any) | undefined;
205
+ readonly "onUpdate:expandedItems"?: ((items: T[]) => any) | undefined;
153
206
  readonly onPageChange?: ((page: number) => any) | undefined;
154
207
  readonly onSortChange?: ((sort: {
155
208
  key: string;
@@ -165,7 +218,7 @@ declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_
165
218
  readonly onDeleteError?: ((item: T, error: any) => any) | undefined;
166
219
  readonly "onUpdate:filters"?: ((filters: Record<string, string>) => any) | undefined;
167
220
  readonly "onUpdate:perPage"?: ((perPage: number) => any) | undefined;
168
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:sortBy" | "onUpdate:busy" | "onRowClicked" | "onPageChange" | "onSortChange" | "onFilterChange" | "onPerPageChange" | "onRowCreated" | "onCreateError" | "onRowUpdated" | "onEditError" | "onRowDeleted" | "onDeleteError" | "onUpdate:filters" | "onUpdate:perPage"> & Props<T> & Partial<{}>> & import("vue").PublicProps;
221
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:sortBy" | "onUpdate:busy" | "onRowClicked" | "onUpdate:expandedItems" | "onPageChange" | "onSortChange" | "onFilterChange" | "onPerPageChange" | "onRowCreated" | "onCreateError" | "onRowUpdated" | "onEditError" | "onRowDeleted" | "onDeleteError" | "onUpdate:filters" | "onUpdate:perPage"> & Props<T> & Partial<{}>> & import("vue").PublicProps;
169
222
  expose(exposed: import("vue").ShallowUnwrapRef<{
170
223
  refresh: () => void;
171
224
  /**
@@ -214,7 +267,7 @@ declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_
214
267
  } & {
215
268
  header?: (props: {}) => any;
216
269
  };
217
- emit: ((evt: "update:sortBy", sortBy: BTableSortBy[]) => void) & ((evt: "update:busy", busy: boolean) => void) & ((evt: "rowClicked", item: T, index: number, event: MouseEvent) => void) & ((evt: "pageChange", page: number) => void) & ((evt: "sortChange", sort: {
270
+ emit: ((evt: "update:sortBy", sortBy: BTableSortBy[]) => void) & ((evt: "update:busy", busy: boolean) => void) & ((evt: "rowClicked", item: T, index: number, event: MouseEvent) => void) & ((evt: "update:expandedItems", items: T[]) => void) & ((evt: "pageChange", page: number) => void) & ((evt: "sortChange", sort: {
218
271
  key: string;
219
272
  order: "asc" | "desc";
220
273
  }) => void) & ((evt: "filterChange", filters: Record<string, string>) => void) & ((evt: "perPageChange", perPage: number) => void) & ((evt: "rowCreated", item: any, response: any) => void) & ((evt: "createError", error: any) => void) & ((evt: "rowUpdated", item: T, response: any) => void) & ((evt: "editError", item: T, error: any) => void) & ((evt: "rowDeleted", item: T, response: any) => void) & ((evt: "deleteError", item: T, error: any) => void) & ((evt: "update:filters", filters: Record<string, string>) => void) & ((evt: "update:perPage", perPage: number) => void);
@@ -0,0 +1,40 @@
1
+ import type { ColorVariant } from "bootstrap-vue-next";
2
+ type __VLS_Props = {
3
+ /** The user whose initial is shown. The first letter of `name` is used. */
4
+ user?: {
5
+ name: string;
6
+ [key: string]: any;
7
+ } | null;
8
+ /** Overrides the initial derived from `user.name` (e.g. two-letter initials). */
9
+ initial?: string;
10
+ /** Show a notification dot on the avatar (e.g. unread updates). */
11
+ badge?: boolean;
12
+ /** Colour of the notification dot. */
13
+ badgeVariant?: ColorVariant;
14
+ /**
15
+ * Accessible text for the notification dot, announced to screen readers
16
+ * (the dot itself is a colour-only signal). Ignored unless `badge` is set.
17
+ */
18
+ badgeLabel?: string;
19
+ };
20
+ declare var __VLS_1: {};
21
+ type __VLS_Slots = {} & {
22
+ default?: (props: typeof __VLS_1) => any;
23
+ };
24
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
25
+ user: {
26
+ name: string;
27
+ [key: string]: any;
28
+ } | null;
29
+ initial: string;
30
+ badge: boolean;
31
+ badgeVariant: ColorVariant;
32
+ badgeLabel: string;
33
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
35
+ export default _default;
36
+ type __VLS_WithSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };