mgv-backoffice 1.21.0 → 1.23.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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * One choice in a BaseSegmentedControl. `value` is what the control emits,
3
+ * `label` what the button shows; `title` becomes the button's tooltip.
4
+ * Generic so callers with union-typed values ('all' | 'STOCK' | …) keep
5
+ * full type-safety through v-model.
6
+ */
7
+ export interface SegmentedOption<T extends string | number = string | number> {
8
+ value: T
9
+ label: string
10
+ title?: string
11
+ }
@@ -0,0 +1,25 @@
1
+ /** Which input a BaseSpecFields entry renders. */
2
+ export type SpecFieldType = 'decimal' | 'integer' | 'boolean' | 'select'
3
+
4
+ /**
5
+ * One field of a spec-driven form: the field's key in the value map, its
6
+ * label, which input to render, and optional validation/rendering hints.
7
+ * Members are loose (`| null` allowed) so backend-described catalogues can be
8
+ * passed straight through without mapping.
9
+ */
10
+ export interface SpecField {
11
+ key: string
12
+ label: string
13
+ type: SpecFieldType
14
+ /** Choices for `type: 'select'`. */
15
+ options?: string[] | null
16
+ /** Step for numeric inputs; defaults to 1 (integer) / 0.01 (decimal). */
17
+ step?: number | null
18
+ /** Minimum for numeric inputs. */
19
+ min?: number | null
20
+ /** Help text rendered under the field. */
21
+ help?: string | null
22
+ }
23
+
24
+ /** A field's current value in the owner's form state. */
25
+ export type SpecFieldValue = number | boolean | string
@@ -0,0 +1,8 @@
1
+ /**
2
+ * One header cell of a BaseTable. `align: 'right'` right-aligns the header
3
+ * (numeric columns); body cells are the caller's markup and align themselves.
4
+ */
5
+ export interface TableColumn {
6
+ label: string
7
+ align?: 'left' | 'right'
8
+ }