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.
- package/README.md +129 -0
- package/dist/components/BaseInput.vue.d.ts +21 -0
- package/dist/components/BaseSegmentedControl.vue.d.ts +25 -0
- package/dist/components/BaseSelect.vue.d.ts +28 -0
- package/dist/components/BaseSpecFields.vue.d.ts +23 -0
- package/dist/components/BaseTable.vue.d.ts +26 -0
- package/dist/components/EarningsCard.vue.d.ts +10 -0
- package/dist/index.d.ts +8 -0
- package/dist/types/segmented.d.ts +11 -0
- package/dist/types/specField.d.ts +23 -0
- package/dist/types/table.d.ts +8 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +422 -258
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/BaseInput.test.ts +40 -0
- package/src/components/BaseInput.vue +46 -0
- package/src/components/BaseSegmentedControl.test.ts +78 -0
- package/src/components/BaseSegmentedControl.vue +98 -0
- package/src/components/BaseSelect.test.ts +37 -0
- package/src/components/BaseSelect.vue +46 -0
- package/src/components/BaseSpecFields.test.ts +78 -0
- package/src/components/BaseSpecFields.vue +83 -0
- package/src/components/BaseTable.test.ts +55 -0
- package/src/components/BaseTable.vue +50 -0
- package/src/components/EarningsCard.test.ts +30 -0
- package/src/components/EarningsCard.vue +28 -11
- package/src/index.ts +10 -0
- package/src/types/segmented.ts +11 -0
- package/src/types/specField.ts +25 -0
- package/src/types/table.ts +8 -0
|
@@ -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
|