@omnitend/dashboard-for-laravel 0.29.0 → 0.31.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.
@@ -1,8 +1,28 @@
1
+ import type { SelectOption } from "bootstrap-vue-next";
2
+ type AutocompleteOptions = readonly (object | string | number | boolean)[];
3
+ type FilterFunction = (options: SelectOption[], search: string) => SelectOption[];
4
+ interface Props {
5
+ /** Options passed straight through to BAutocomplete (see its `options` prop). */
6
+ options?: AutocompleteOptions;
7
+ /**
8
+ * A custom filter. Composed with `null-option` rather than replaced: when a
9
+ * null option is present it stays pinned and this runs on the rest.
10
+ */
11
+ filterFunction?: FilterFunction;
12
+ /**
13
+ * Prepend a pinned, never-filtered, selectable "no selection" row whose value
14
+ * is `null` (#138). `true` → default label "None"; a string → that label.
15
+ * Selecting it sets the model to `null` (bvn reads that as no selection, so
16
+ * the ✕ hides and the placeholder shows). Off by default — unchanged
17
+ * behaviour. DXTable does NOT use this; it builds its own "All" option.
18
+ */
19
+ nullOption?: boolean | string;
20
+ }
1
21
  declare var __VLS_6: string | number, __VLS_7: any;
2
22
  type __VLS_Slots = {} & {
3
23
  [K in NonNullable<typeof __VLS_6>]?: (props: typeof __VLS_7) => any;
4
24
  };
5
- declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
25
+ 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>;
6
26
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
27
  export default _default;
8
28
  type __VLS_WithSlots<T, S> = T & {
@@ -28,11 +28,21 @@ interface Props {
28
28
  autoErrorTab?: boolean;
29
29
  /**
30
30
  * Wrap the form in a card for a visual boundary (mirrors DXTable's
31
- * `card` prop). Tabbed forms render the tab nav as a BS5
32
- * card-header-tabs instead of double-wrapping. Off by default since
33
- * DXForm is commonly embedded in a page card or modal already.
31
+ * `card` prop). Off by default since DXForm is commonly embedded in a
32
+ * page card or modal already. Tabbed forms are wrapped by default
33
+ * regardless — see `cardTabs`; setting `card` also forces the tabbed
34
+ * card on even when `cardTabs` is disabled.
34
35
  */
35
36
  card?: boolean;
37
+ /**
38
+ * Wrap a TABBED form's content in a card panel so the active tab reads
39
+ * as a finished panel connected to the tab strip (the standard
40
+ * Bootstrap card-with-tabs pattern) rather than floating on the bare
41
+ * page background (#159). On by default. Set `false` for bare tabs
42
+ * (e.g. inside a modal that already provides a boundary). Ignored for
43
+ * flat (non-tabbed) forms — use `card` for those.
44
+ */
45
+ cardTabs?: boolean;
36
46
  /**
37
47
  * Form-wide field layout: "vertical" (default, label above input) or
38
48
  * "horizontal" (label left, input right). Overridable per-field via
@@ -69,6 +79,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
69
79
  submitLoadingText: string;
70
80
  showSubmit: boolean;
71
81
  autoErrorTab: boolean;
82
+ cardTabs: boolean;
72
83
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
73
84
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
74
85
  export default _default;
@@ -7,6 +7,14 @@ interface Props {
7
7
  textWhenTrue?: string;
8
8
  /** Text shown when off — overrides `label` in the off state (e.g. "Product is not current"). */
9
9
  textWhenFalse?: string;
10
+ /**
11
+ * On-state colour. `"success"` (default) reads the house green-on / red-off
12
+ * style — an active/enabled/good switch ("Product is current", "Stock is
13
+ * tracked", "Visible"). `"neutral"` is for semantically-mixed switches
14
+ * ("contains alcohol", an allergen toggle, "hidden on web shop") that
15
+ * shouldn't imply good/bad — it uses the brand primary on / grey off (#158).
16
+ */
17
+ onVariant?: "success" | "neutral";
10
18
  }
11
19
  declare var __VLS_4: {
12
20
  on: boolean;
@@ -20,6 +28,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
20
28
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
21
29
  }>, {
22
30
  modelValue: boolean;
31
+ onVariant: "success" | "neutral";
23
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
33
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
25
34
  export default _default;
@@ -36,6 +36,19 @@ export interface TableField {
36
36
  filter?: FilterType;
37
37
  filterOptions?: FilterOption[];
38
38
  filterPlaceholder?: string;
39
+ /**
40
+ * Fixed width for this column, applied via a `<colgroup>` `<col>`. A number
41
+ * is treated as pixels (`200` → `200px`); a string is used verbatim
42
+ * (`"20%"`, `"12rem"`). Pair with the table-level `fixedLayout` prop so the
43
+ * width is authoritative and the column stops resizing to fit its content —
44
+ * without `fixedLayout` a wider cell can still stretch the column (#156).
45
+ */
46
+ width?: string | number;
47
+ /**
48
+ * Minimum width for this column, applied via the same `<col>` as `width`.
49
+ * A number is pixels; a string is used verbatim.
50
+ */
51
+ minWidth?: string | number;
39
52
  [key: string]: any;
40
53
  }
41
54
  export interface PaginationData {
@@ -109,11 +122,27 @@ export interface Props<TItem = any> {
109
122
  showPagination?: boolean;
110
123
  /** Show per-page selector */
111
124
  showPerPageSelector?: boolean;
125
+ /**
126
+ * Show the footer's item-count caption ("N items." / "X to Y out of Z
127
+ * items."). Defaults to `true`. Set `false` to suppress just the caption,
128
+ * independent of the pager — a page ported from a plain `<b-table>` that
129
+ * hides the pager with `:show-pagination="false"` would otherwise gain a
130
+ * caption it never had (#127).
131
+ */
132
+ showCount?: boolean;
112
133
  /** Per-page options for selector */
113
134
  perPageOptions?: number[];
114
135
  /** Current page (for provider mode) */
115
136
  currentPage?: number;
116
- /** Items per page (for provider mode, v-model support) */
137
+ /**
138
+ * Items per page. With a `v-model:per-page` it is controlled state; a bare
139
+ * `:per-page="20"` is the INITIAL page size (see the initial-value vs
140
+ * controlled note above). When passed explicitly it takes PRECEDENCE over any
141
+ * per-page preference persisted in localStorage — `:per-page="20"` always
142
+ * starts at 20, never a size the user once picked on another table (#124).
143
+ * Omit it to let a stored preference (URL-keyed tables only) or the default
144
+ * apply.
145
+ */
117
146
  perPage?: number;
118
147
  /** Striped (banded) rows. Off by default — banding adds little on short
119
148
  * tables and can read as noise; opt in with `:striped="true"`. */
@@ -217,6 +246,15 @@ export interface Props<TItem = any> {
217
246
  rowClickable?: (item: TItem, index: number) => boolean;
218
247
  /** Enable client-side filtering, sorting, and pagination on items array */
219
248
  clientSide?: boolean;
249
+ /**
250
+ * Apply `table-layout: fixed` to the underlying table. Off by default, so
251
+ * existing tables keep their content-sized columns. When on, column widths
252
+ * stop depending on cell content, so they no longer reshuffle when a filter
253
+ * narrows the rows — the table stays put as you filter (#156). Combine with
254
+ * per-field `width`/`minWidth` to control the proportions; columns with no
255
+ * declared width share the remaining space equally.
256
+ */
257
+ fixedLayout?: boolean;
220
258
  }
221
259
  declare const _default: <T = any>(__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<{
222
260
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
@@ -10,6 +10,8 @@ interface Props {
10
10
  showPagination: boolean;
11
11
  /** Whether to render the per-page selector. */
12
12
  showPerPageSelector: boolean;
13
+ /** Whether to render the item-count caption (the "X out of Z items" line). */
14
+ showCount: boolean;
13
15
  /** Singular item noun for the info line (e.g. "product"). */
14
16
  singularItemName: string;
15
17
  /** Plural item noun for the info line (e.g. "products"). */