@omnitend/dashboard-for-laravel 0.40.0 → 0.41.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/dist/charts.d.ts +19 -0
- package/dist/components/base/DAccordion.vue.d.ts +12 -0
- package/dist/components/base/DAccordionItem.vue.d.ts +12 -0
- package/dist/components/base/DAlert.vue.d.ts +17 -0
- package/dist/components/base/DAspect.vue.d.ts +12 -0
- package/dist/components/base/DAutocomplete.vue.d.ts +32 -0
- package/dist/components/base/DAvatar.vue.d.ts +12 -0
- package/dist/components/base/DBadge.vue.d.ts +12 -0
- package/dist/components/base/DBreadcrumb.vue.d.ts +12 -0
- package/dist/components/base/DButton.vue.d.ts +88 -0
- package/dist/components/base/DButtonGroup.vue.d.ts +12 -0
- package/dist/components/base/DButtonToolbar.vue.d.ts +12 -0
- package/dist/components/base/DCard.vue.d.ts +12 -0
- package/dist/components/base/DCol.vue.d.ts +12 -0
- package/dist/components/base/DCollapse.vue.d.ts +12 -0
- package/dist/components/base/DContainer.vue.d.ts +12 -0
- package/dist/components/base/DDropdown.vue.d.ts +12 -0
- package/dist/components/base/DDropdownDivider.vue.d.ts +2 -0
- package/dist/components/base/DDropdownItem.vue.d.ts +12 -0
- package/dist/components/base/DForm.vue.d.ts +12 -0
- package/dist/components/base/DFormCheckbox.vue.d.ts +12 -0
- package/dist/components/base/DFormCheckboxGroup.vue.d.ts +12 -0
- package/dist/components/base/DFormGroup.vue.d.ts +12 -0
- package/dist/components/base/DFormInput.vue.d.ts +2 -0
- package/dist/components/base/DFormInvalidFeedback.vue.d.ts +12 -0
- package/dist/components/base/DFormOtp.vue.d.ts +12 -0
- package/dist/components/base/DFormRadio.vue.d.ts +12 -0
- package/dist/components/base/DFormRadioGroup.vue.d.ts +12 -0
- package/dist/components/base/DFormSelect.vue.d.ts +27 -0
- package/dist/components/base/DFormSpinbutton.vue.d.ts +12 -0
- package/dist/components/base/DFormTags.vue.d.ts +12 -0
- package/dist/components/base/DFormText.vue.d.ts +12 -0
- package/dist/components/base/DFormTextarea.vue.d.ts +2 -0
- package/dist/components/base/DImage.vue.d.ts +12 -0
- package/dist/components/base/DInputGroup.vue.d.ts +12 -0
- package/dist/components/base/DLink.vue.d.ts +12 -0
- package/dist/components/base/DListGroup.vue.d.ts +12 -0
- package/dist/components/base/DListGroupItem.vue.d.ts +12 -0
- package/dist/components/base/DModal.vue.d.ts +12 -0
- package/dist/components/base/DNav.vue.d.ts +12 -0
- package/dist/components/base/DNavItem.vue.d.ts +12 -0
- package/dist/components/base/DNavbar.vue.d.ts +12 -0
- package/dist/components/base/DNavbarBrand.vue.d.ts +12 -0
- package/dist/components/base/DNavbarNav.vue.d.ts +12 -0
- package/dist/components/base/DNavbarToggle.vue.d.ts +12 -0
- package/dist/components/base/DOffcanvas.vue.d.ts +12 -0
- package/dist/components/base/DOverlay.vue.d.ts +12 -0
- package/dist/components/base/DPagination.vue.d.ts +2 -0
- package/dist/components/base/DPlaceholder.vue.d.ts +12 -0
- package/dist/components/base/DPopover.vue.d.ts +12 -0
- package/dist/components/base/DProgress.vue.d.ts +12 -0
- package/dist/components/base/DRow.vue.d.ts +12 -0
- package/dist/components/base/DSpinner.vue.d.ts +2 -0
- package/dist/components/base/DTable.vue.d.ts +34 -0
- package/dist/components/base/DTabs.vue.d.ts +12 -0
- package/dist/components/base/DToast.vue.d.ts +12 -0
- package/dist/components/base/DToaster.vue.d.ts +12 -0
- package/dist/components/base/DTooltip.vue.d.ts +12 -0
- package/dist/components/charts/DXBarChart.vue.d.ts +7 -0
- package/dist/components/charts/DXDoughnutChart.vue.d.ts +24 -0
- package/dist/components/charts/DXLineChart.vue.d.ts +7 -0
- package/dist/components/charts/chartTheme.d.ts +59 -0
- package/dist/components/charts/useThemedChart.d.ts +40 -0
- package/dist/components/extended/DXBasicForm.vue.d.ts +10 -0
- package/dist/components/extended/DXChoiceField.vue.d.ts +26 -0
- package/dist/components/extended/DXCurrencyInput.vue.d.ts +42 -0
- package/dist/components/extended/DXDashboard.vue.d.ts +105 -0
- package/dist/components/extended/DXDashboardNavbar.vue.d.ts +86 -0
- package/dist/components/extended/DXDashboardSidebar.vue.d.ts +61 -0
- package/dist/components/extended/DXField.vue.d.ts +86 -0
- package/dist/components/extended/DXFieldLabel.vue.d.ts +18 -0
- package/dist/components/extended/DXFieldShell.vue.d.ts +73 -0
- package/dist/components/extended/DXForm.vue.d.ts +112 -0
- package/dist/components/extended/DXFormField.vue.d.ts +41 -0
- package/dist/components/extended/DXNumericField.vue.d.ts +23 -0
- package/dist/components/extended/DXRepeater.vue.d.ts +46 -0
- package/dist/components/extended/DXRepeaterCards.vue.d.ts +45 -0
- package/dist/components/extended/DXStatCard.vue.d.ts +56 -0
- package/dist/components/extended/DXSwitch.vue.d.ts +47 -0
- package/dist/components/extended/DXTable.vue.d.ts +493 -0
- package/dist/components/extended/DXTableEditorModal.vue.d.ts +100 -0
- package/dist/components/extended/DXTablePagination.vue.d.ts +50 -0
- package/dist/components/extended/DXTableShell.vue.d.ts +24 -0
- package/dist/components/extended/DXUserAvatar.vue.d.ts +40 -0
- package/dist/components/extended/dxFieldContext.d.ts +11 -0
- package/dist/composables/defineForm.d.ts +41 -0
- package/dist/composables/useAsyncOptions.d.ts +20 -0
- package/dist/composables/useContainerWidth.d.ts +96 -0
- package/dist/composables/useForm.d.ts +46 -0
- package/dist/composables/useResourceEditor.d.ts +77 -0
- package/dist/composables/useToast.d.ts +2 -0
- package/dist/dashboard-for-laravel.js +2855 -2848
- package/dist/dashboard-for-laravel.js.map +1 -1
- package/dist/dashboard-for-laravel.umd.cjs +5 -5
- package/dist/dashboard-for-laravel.umd.cjs.map +1 -1
- package/dist/index.d.ts +93 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +477 -0
- package/dist/types/navigation.d.ts +43 -0
- package/dist/utils/api.d.ts +30 -0
- package/dist/utils/formSchema.d.ts +59 -0
- package/dist/utils/objectPath.d.ts +18 -0
- package/docs/public/api-reference.json +3 -3
- package/docs/public/docs-map.md +1 -1
- package/package.json +1 -1
- package/resources/js/components/extended/DXDashboardSidebar.vue +9 -5
- package/resources/js/components/extended/DXTable.vue +3 -0
- package/resources/js/composables/useResourceEditor.ts +41 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { NavbarActionsOnMobile, NavbarSearchAlign } from "../../types/navigation";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The signed-in user shown in the avatar dropdown. `null` hides the menu. */
|
|
4
|
+
user?: {
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
} | null;
|
|
9
|
+
/** Page title shown at the left of the navbar (hidden below the `md` breakpoint). */
|
|
10
|
+
pageTitle?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Horizontal alignment of the search slot content within its region
|
|
13
|
+
* (`"start"` = flush left, `"center"` = centred). Applies at every size:
|
|
14
|
+
* the region sits inline after the title from `md` up, and is its own
|
|
15
|
+
* full-width row below.
|
|
16
|
+
*/
|
|
17
|
+
searchAlign?: NavbarSearchAlign;
|
|
18
|
+
/**
|
|
19
|
+
* What the actions slot does below the `md` breakpoint: `"wrap"` moves it
|
|
20
|
+
* to its own full-width row (the bar grows), `"hide"` removes it entirely
|
|
21
|
+
* (for apps that relocate page actions into the page on phones).
|
|
22
|
+
*/
|
|
23
|
+
actionsOnMobile?: NavbarActionsOnMobile;
|
|
24
|
+
/**
|
|
25
|
+
* Accessible name for the user-menu trigger. Without one, a screen reader
|
|
26
|
+
* announces the trigger as the avatar's initial ("J") rather than as a menu.
|
|
27
|
+
*/
|
|
28
|
+
userMenuLabel?: string;
|
|
29
|
+
};
|
|
30
|
+
declare var __VLS_11: {}, __VLS_13: {}, __VLS_15: {
|
|
31
|
+
pageTitle: string;
|
|
32
|
+
}, __VLS_17: {
|
|
33
|
+
user: {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
name: string;
|
|
36
|
+
email: string;
|
|
37
|
+
} | null;
|
|
38
|
+
}, __VLS_22: {
|
|
39
|
+
initial: string;
|
|
40
|
+
user: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
name: string;
|
|
43
|
+
email: string;
|
|
44
|
+
};
|
|
45
|
+
}, __VLS_27: {
|
|
46
|
+
user: {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
name: string;
|
|
49
|
+
email: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
type __VLS_Slots = {} & {
|
|
53
|
+
'menu-icon'?: (props: typeof __VLS_11) => any;
|
|
54
|
+
} & {
|
|
55
|
+
search?: (props: typeof __VLS_13) => any;
|
|
56
|
+
} & {
|
|
57
|
+
actions?: (props: typeof __VLS_15) => any;
|
|
58
|
+
} & {
|
|
59
|
+
'user-menu'?: (props: typeof __VLS_17) => any;
|
|
60
|
+
} & {
|
|
61
|
+
'user-icon'?: (props: typeof __VLS_22) => any;
|
|
62
|
+
} & {
|
|
63
|
+
'user-menu-items'?: (props: typeof __VLS_27) => any;
|
|
64
|
+
};
|
|
65
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
66
|
+
toggleSidebar: () => any;
|
|
67
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
68
|
+
onToggleSidebar?: (() => any) | undefined;
|
|
69
|
+
}>, {
|
|
70
|
+
user: {
|
|
71
|
+
name: string;
|
|
72
|
+
email: string;
|
|
73
|
+
[key: string]: any;
|
|
74
|
+
} | null;
|
|
75
|
+
pageTitle: string;
|
|
76
|
+
searchAlign: NavbarSearchAlign;
|
|
77
|
+
actionsOnMobile: NavbarActionsOnMobile;
|
|
78
|
+
userMenuLabel: string;
|
|
79
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
80
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
81
|
+
export default _default;
|
|
82
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Navigation } from '../../types/navigation';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Grouped navigation to render: an array of groups, each with a label and items. */
|
|
4
|
+
navigation: Navigation;
|
|
5
|
+
/** The current route URL, used to highlight the matching nav item and open its group. */
|
|
6
|
+
currentUrl: string;
|
|
7
|
+
/** Collapse the rail to an icons-only strip, hiding labels and the brand title. */
|
|
8
|
+
collapsed?: boolean;
|
|
9
|
+
/** Hide the sidebar entirely (`display: none`). */
|
|
10
|
+
hidden?: boolean;
|
|
11
|
+
/** Sidebar title; its first letter is also used as the brand initial. */
|
|
12
|
+
title?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Turn group headers into accordion toggles that collapse/expand their items.
|
|
15
|
+
* When off (default), every group is rendered permanently expanded.
|
|
16
|
+
*/
|
|
17
|
+
collapsibleGroups?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Only relevant when `collapsibleGroups` is on.
|
|
20
|
+
* `true` (default): only the active-route group starts open, and opening one
|
|
21
|
+
* group closes the others (single-open accordion).
|
|
22
|
+
* `false`: all groups start open and toggle independently.
|
|
23
|
+
*/
|
|
24
|
+
autoCollapseInactiveGroups?: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare var __VLS_1: {
|
|
27
|
+
collapsed: boolean;
|
|
28
|
+
title: string;
|
|
29
|
+
}, __VLS_3: {
|
|
30
|
+
item: import("../..").NavigationItem;
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
collapsed: boolean;
|
|
33
|
+
isExpanded: boolean;
|
|
34
|
+
}, __VLS_9: {
|
|
35
|
+
collapsed: boolean;
|
|
36
|
+
};
|
|
37
|
+
type __VLS_Slots = {} & {
|
|
38
|
+
brand?: (props: typeof __VLS_1) => any;
|
|
39
|
+
} & {
|
|
40
|
+
link?: (props: typeof __VLS_3) => any;
|
|
41
|
+
} & {
|
|
42
|
+
footer?: (props: typeof __VLS_9) => any;
|
|
43
|
+
};
|
|
44
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
+
toggle: () => any;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
47
|
+
onToggle?: (() => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
hidden: boolean;
|
|
50
|
+
title: string;
|
|
51
|
+
collapsed: boolean;
|
|
52
|
+
collapsibleGroups: boolean;
|
|
53
|
+
autoCollapseInactiveGroups: boolean;
|
|
54
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { UseFormReturn } from "../../composables/useForm";
|
|
2
|
+
import type { FieldDefinition, FieldOption, LabelCols } from "../../types";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Field definition to render */
|
|
5
|
+
field: FieldDefinition;
|
|
6
|
+
/** Form instance owning the field's data and errors */
|
|
7
|
+
form: UseFormReturn<any>;
|
|
8
|
+
/**
|
|
9
|
+
* Model passed to predicates (label/hint/when/disabled/readonly).
|
|
10
|
+
* Defaults to the live form data; a parent may widen it (e.g. a table
|
|
11
|
+
* merging the original row).
|
|
12
|
+
*/
|
|
13
|
+
model?: any;
|
|
14
|
+
/** Dot path into form.data for the value (defaults to field.key). */
|
|
15
|
+
keyPath?: string;
|
|
16
|
+
/** Error key for validation lookups (defaults to keyPath/field.key). */
|
|
17
|
+
errorKey?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Field layout: "vertical" (default, label above input) or "horizontal"
|
|
20
|
+
* (label left, input right). Normally set by DXForm (form-level, with
|
|
21
|
+
* `field.layout` taking precedence); pass directly when using DXField
|
|
22
|
+
* standalone.
|
|
23
|
+
*/
|
|
24
|
+
layout?: "vertical" | "horizontal";
|
|
25
|
+
/** Label column width for horizontal layout (mirrors BFormGroup). */
|
|
26
|
+
labelCols?: LabelCols;
|
|
27
|
+
/**
|
|
28
|
+
* Skip rendering the field's own (outer) label. Applies to the standard
|
|
29
|
+
* labelled-field branch and to the checkbox/switch/repeater branches. In
|
|
30
|
+
* horizontal layout no label column is reserved either, so the control
|
|
31
|
+
* spans the full width (a switch/checkbox self-label then lines up with
|
|
32
|
+
* sibling row labels). Used by DXRepeater's `table` layout (a column
|
|
33
|
+
* header already names the field) and by consumers hiding the redundant
|
|
34
|
+
* row label on a switch/checkbox, which render their own label inside the
|
|
35
|
+
* control (#78).
|
|
36
|
+
*/
|
|
37
|
+
hideLabel?: boolean;
|
|
38
|
+
}
|
|
39
|
+
declare function setValue(value: any): void;
|
|
40
|
+
declare var __VLS_1: {
|
|
41
|
+
field: FieldDefinition;
|
|
42
|
+
model: any;
|
|
43
|
+
value: any;
|
|
44
|
+
update: typeof setValue;
|
|
45
|
+
}, __VLS_6: {
|
|
46
|
+
field: FieldDefinition;
|
|
47
|
+
model: any;
|
|
48
|
+
}, __VLS_8: {
|
|
49
|
+
field: FieldDefinition;
|
|
50
|
+
model: any;
|
|
51
|
+
}, __VLS_10: {
|
|
52
|
+
field: FieldDefinition;
|
|
53
|
+
model: any;
|
|
54
|
+
value: any;
|
|
55
|
+
update: typeof setValue;
|
|
56
|
+
}, __VLS_52: {
|
|
57
|
+
option: FieldOption;
|
|
58
|
+
on: boolean;
|
|
59
|
+
}, __VLS_64: {
|
|
60
|
+
row: any;
|
|
61
|
+
index: number;
|
|
62
|
+
fields: FieldDefinition[];
|
|
63
|
+
remove: () => void;
|
|
64
|
+
path: string;
|
|
65
|
+
};
|
|
66
|
+
type __VLS_Slots = {} & {
|
|
67
|
+
span?: (props: typeof __VLS_1) => any;
|
|
68
|
+
} & {
|
|
69
|
+
hint?: (props: typeof __VLS_6) => any;
|
|
70
|
+
} & {
|
|
71
|
+
info?: (props: typeof __VLS_8) => any;
|
|
72
|
+
} & {
|
|
73
|
+
value?: (props: typeof __VLS_10) => any;
|
|
74
|
+
} & {
|
|
75
|
+
'switch-list-item'?: (props: typeof __VLS_52) => any;
|
|
76
|
+
} & {
|
|
77
|
+
'repeater-row'?: (props: typeof __VLS_64) => any;
|
|
78
|
+
};
|
|
79
|
+
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>;
|
|
80
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
81
|
+
export default _default;
|
|
82
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Visible label text. */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Optional help text revealed in a popover from an info affordance. */
|
|
5
|
+
info?: string;
|
|
6
|
+
}
|
|
7
|
+
declare var __VLS_8: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
popover?: (props: typeof __VLS_8) => any;
|
|
10
|
+
};
|
|
11
|
+
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>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { UseFormReturn } from "../../composables/useForm";
|
|
2
|
+
import type { FieldDefinition } from "../../types";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** The field definition (for `field.help` and slot props). */
|
|
5
|
+
field: FieldDefinition;
|
|
6
|
+
/** Form instance owning the field's errors. */
|
|
7
|
+
form: UseFormReturn<any>;
|
|
8
|
+
/** Error key for validation lookups. */
|
|
9
|
+
errorKey: string;
|
|
10
|
+
/** Model passed to `hint`/`info` slot props. */
|
|
11
|
+
model?: any;
|
|
12
|
+
/**
|
|
13
|
+
* Layout shape. `group` = DFormGroup root with a label column; `plain` =
|
|
14
|
+
* plain div, the control owning its own inline label/heading.
|
|
15
|
+
*/
|
|
16
|
+
mode: "group" | "plain";
|
|
17
|
+
/** Wrapper class (`field.class || 'mb-3'`). */
|
|
18
|
+
wrapperClass?: string;
|
|
19
|
+
/** BFormGroup attrs (horizontal label-cols etc.); group mode only. */
|
|
20
|
+
groupAttrs?: Record<string, any>;
|
|
21
|
+
/** Resolved label text (group mode). Always supplied by DXField. */
|
|
22
|
+
label: string;
|
|
23
|
+
/** Resolved info text for the label popover (group mode). */
|
|
24
|
+
info?: string;
|
|
25
|
+
/** Skip the label column entirely (group mode). */
|
|
26
|
+
hideLabel?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the hint sits in the label column (horizontal) rather than below
|
|
29
|
+
* the control. Group mode only; plain mode always renders the hint below.
|
|
30
|
+
*/
|
|
31
|
+
hintInLabel?: boolean;
|
|
32
|
+
/** Resolved hint text (fallback when no `hint` slot is supplied). */
|
|
33
|
+
resolvedHint?: string;
|
|
34
|
+
}
|
|
35
|
+
declare var __VLS_8: {
|
|
36
|
+
field: FieldDefinition;
|
|
37
|
+
model: any;
|
|
38
|
+
}, __VLS_10: {}, __VLS_15: {
|
|
39
|
+
field: FieldDefinition;
|
|
40
|
+
model: any;
|
|
41
|
+
}, __VLS_20: {
|
|
42
|
+
field: FieldDefinition;
|
|
43
|
+
model: any;
|
|
44
|
+
}, __VLS_25: {}, __VLS_30: {
|
|
45
|
+
field: FieldDefinition;
|
|
46
|
+
model: any;
|
|
47
|
+
}, __VLS_35: {
|
|
48
|
+
field: FieldDefinition;
|
|
49
|
+
model: any;
|
|
50
|
+
};
|
|
51
|
+
type __VLS_Slots = {} & {
|
|
52
|
+
hint?: (props: typeof __VLS_8) => any;
|
|
53
|
+
} & {
|
|
54
|
+
default?: (props: typeof __VLS_10) => any;
|
|
55
|
+
} & {
|
|
56
|
+
info?: (props: typeof __VLS_15) => any;
|
|
57
|
+
} & {
|
|
58
|
+
hint?: (props: typeof __VLS_20) => any;
|
|
59
|
+
} & {
|
|
60
|
+
default?: (props: typeof __VLS_25) => any;
|
|
61
|
+
} & {
|
|
62
|
+
info?: (props: typeof __VLS_30) => any;
|
|
63
|
+
} & {
|
|
64
|
+
hint?: (props: typeof __VLS_35) => any;
|
|
65
|
+
};
|
|
66
|
+
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>;
|
|
67
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
68
|
+
export default _default;
|
|
69
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { UseFormReturn } from "../../composables/useForm";
|
|
2
|
+
import type { DefineFormReturn } from "../../composables/defineForm";
|
|
3
|
+
import type { FieldDefinition, FormTab, LabelCols } from "../../types";
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Form instance — either a raw `useForm` return or a `defineForm`
|
|
7
|
+
* return (`{ form, fields }`). With the latter, `fields` may be
|
|
8
|
+
* omitted and is taken from the form object.
|
|
9
|
+
*/
|
|
10
|
+
form: UseFormReturn<any> | DefineFormReturn<any>;
|
|
11
|
+
/** Field definitions (optional when `form` is a defineForm return). */
|
|
12
|
+
fields?: FieldDefinition[];
|
|
13
|
+
/** Tab definitions. When omitted, a flat single-column form renders. */
|
|
14
|
+
tabs?: FormTab[];
|
|
15
|
+
/**
|
|
16
|
+
* Extra context merged under the live form data when evaluating
|
|
17
|
+
* predicates (label/hint/when/disabled). E.g. a table passes the
|
|
18
|
+
* original row so predicates can read non-edited columns.
|
|
19
|
+
*/
|
|
20
|
+
context?: Record<string, any>;
|
|
21
|
+
/** Submit button text */
|
|
22
|
+
submitText?: string;
|
|
23
|
+
/** Submit button loading text */
|
|
24
|
+
submitLoadingText?: string;
|
|
25
|
+
/** Show the submit button */
|
|
26
|
+
showSubmit?: boolean;
|
|
27
|
+
/** Auto-switch to the first tab containing a validation error. */
|
|
28
|
+
autoErrorTab?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Wrap the form in a card for a visual boundary (mirrors DXTable's
|
|
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.
|
|
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;
|
|
46
|
+
/**
|
|
47
|
+
* Form-wide field layout:
|
|
48
|
+
*
|
|
49
|
+
* - `"vertical"` (default) — label above input, always.
|
|
50
|
+
* - `"horizontal"` — label left, input right, always.
|
|
51
|
+
* - `"auto"` — horizontal when the form's **own container** is at least
|
|
52
|
+
* `layoutThreshold` px wide, vertical below that. Container-driven, not
|
|
53
|
+
* viewport-driven: a page narrowed by the dashboard sidebar, or a form
|
|
54
|
+
* inside a modal, stacks even though the window is wide (which no
|
|
55
|
+
* Bootstrap media query can see).
|
|
56
|
+
*
|
|
57
|
+
* Overridable per-field via `field.layout`. A field with `span: true`
|
|
58
|
+
* always renders full-width, regardless of layout.
|
|
59
|
+
*/
|
|
60
|
+
layout?: "vertical" | "horizontal" | "auto";
|
|
61
|
+
/**
|
|
62
|
+
* Container width (px) at or above which `layout: "auto"` goes horizontal.
|
|
63
|
+
* Ignored for the explicit `"vertical"`/`"horizontal"` layouts.
|
|
64
|
+
*
|
|
65
|
+
* Default 640, measured rather than guessed: with the default 3-column
|
|
66
|
+
* label the label's text area is `containerWidth / 4 - 18` px, so 640 gives
|
|
67
|
+
* it 142px — enough for a ~20-character label ("Unit price (ex VAT)"
|
|
68
|
+
* measures 128px at the theme's label font) to stay on one line, with the
|
|
69
|
+
* control column still 474px. Below ~584px that label starts wrapping,
|
|
70
|
+
* which is the cramped-label symptom this exists to avoid. Raise it if your
|
|
71
|
+
* labels run longer, or lower `labelCols` instead.
|
|
72
|
+
*/
|
|
73
|
+
layoutThreshold?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Label column width for horizontal layout (mirrors BFormGroup's
|
|
76
|
+
* `labelCols`/`labelCols*` props). Overridable per-field via
|
|
77
|
+
* `field.labelCols`. Ignored when `layout` is "vertical".
|
|
78
|
+
*/
|
|
79
|
+
labelCols?: LabelCols;
|
|
80
|
+
}
|
|
81
|
+
type __VLS_Props = Props;
|
|
82
|
+
type __VLS_Slots = Record<string, (props: any) => any>;
|
|
83
|
+
declare function goToErrorTab(): void;
|
|
84
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
85
|
+
/** v-model for the active tab index. */
|
|
86
|
+
"activeTab"?: number;
|
|
87
|
+
};
|
|
88
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
89
|
+
goToErrorTab: typeof goToErrorTab;
|
|
90
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
91
|
+
submit: () => any;
|
|
92
|
+
"update:activeTab": (value: number) => any;
|
|
93
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
94
|
+
onSubmit?: (() => any) | undefined;
|
|
95
|
+
"onUpdate:activeTab"?: ((value: number) => any) | undefined;
|
|
96
|
+
}>, {
|
|
97
|
+
layout: "vertical" | "horizontal" | "auto";
|
|
98
|
+
card: boolean;
|
|
99
|
+
submitText: string;
|
|
100
|
+
submitLoadingText: string;
|
|
101
|
+
showSubmit: boolean;
|
|
102
|
+
autoErrorTab: boolean;
|
|
103
|
+
cardTabs: boolean;
|
|
104
|
+
layoutThreshold: number;
|
|
105
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
106
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
107
|
+
export default _default;
|
|
108
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
109
|
+
new (): {
|
|
110
|
+
$slots: S;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { UseFormReturn } from "../../composables/useForm";
|
|
2
|
+
import type { FieldDefinition, LabelCols } from "../../types";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** The field to render. */
|
|
5
|
+
field: FieldDefinition;
|
|
6
|
+
/** The resolved form instance (state, errors, submit helpers). */
|
|
7
|
+
form: UseFormReturn<any>;
|
|
8
|
+
/** Live form data merged with context, for slot bindings/predicates. */
|
|
9
|
+
model: Record<string, any>;
|
|
10
|
+
/** Form-level layout; overridden per-field by `field.layout`. */
|
|
11
|
+
layout?: "vertical" | "horizontal";
|
|
12
|
+
/** Form-level label column width; overridden per-field by `field.labelCols`. */
|
|
13
|
+
labelCols?: LabelCols;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_2: `field(${string})`, __VLS_3: {
|
|
16
|
+
field: FieldDefinition;
|
|
17
|
+
model: Record<string, any>;
|
|
18
|
+
}, __VLS_6: `field-before(${string})`, __VLS_7: {
|
|
19
|
+
field: FieldDefinition;
|
|
20
|
+
model: Record<string, any>;
|
|
21
|
+
}, __VLS_13: string, __VLS_14: any, __VLS_17: `field-after(${string})`, __VLS_18: {
|
|
22
|
+
field: FieldDefinition;
|
|
23
|
+
model: Record<string, any>;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_Slots = {} & {
|
|
26
|
+
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
27
|
+
} & {
|
|
28
|
+
[K in NonNullable<typeof __VLS_6>]?: (props: typeof __VLS_7) => any;
|
|
29
|
+
} & {
|
|
30
|
+
[K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any;
|
|
31
|
+
} & {
|
|
32
|
+
[K in NonNullable<typeof __VLS_17>]?: (props: typeof __VLS_18) => any;
|
|
33
|
+
};
|
|
34
|
+
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>;
|
|
35
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { FieldDefinition } from "../../types";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Field definition (type currency/percentage/number + numeric options). */
|
|
4
|
+
field: FieldDefinition;
|
|
5
|
+
/** Current model value. */
|
|
6
|
+
modelValue: any;
|
|
7
|
+
/** Validation state passed to the control. */
|
|
8
|
+
state?: boolean | null;
|
|
9
|
+
/** Disabled state (`isDisabled`). */
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
/** Readonly state (`isReadonly`). */
|
|
12
|
+
isReadonly?: boolean;
|
|
13
|
+
/** Plaintext (display-only) state (`isPlaintext`). */
|
|
14
|
+
isPlaintext?: boolean;
|
|
15
|
+
/** Escape-hatch input props, already guard-merged by DXField. */
|
|
16
|
+
inputProps?: Record<string, any>;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
19
|
+
"update:modelValue": (value: any) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { UseFormReturn } from "../../composables/useForm";
|
|
2
|
+
import type { FieldDefinition } from "../../types";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Form instance owning the repeater array */
|
|
5
|
+
form: UseFormReturn<any>;
|
|
6
|
+
/** The repeater field definition (provides sub-fields, limits, labels) */
|
|
7
|
+
field: FieldDefinition;
|
|
8
|
+
/** Dot path into form.data for the array (defaults to field.key) */
|
|
9
|
+
keyPath?: string;
|
|
10
|
+
/** Model passed to predicates from the parent context */
|
|
11
|
+
model?: any;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_1: {
|
|
14
|
+
row: any;
|
|
15
|
+
index: number;
|
|
16
|
+
fields: FieldDefinition[];
|
|
17
|
+
remove: () => void;
|
|
18
|
+
path: string;
|
|
19
|
+
}, __VLS_27: {
|
|
20
|
+
row: any;
|
|
21
|
+
index: number;
|
|
22
|
+
fields: FieldDefinition[];
|
|
23
|
+
remove: () => void;
|
|
24
|
+
path: string;
|
|
25
|
+
}, __VLS_32: {
|
|
26
|
+
row: any;
|
|
27
|
+
index: number;
|
|
28
|
+
fields: FieldDefinition[];
|
|
29
|
+
remove: () => void;
|
|
30
|
+
path: string;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Slots = {} & {
|
|
33
|
+
row?: (props: typeof __VLS_1) => any;
|
|
34
|
+
} & {
|
|
35
|
+
row?: (props: typeof __VLS_27) => any;
|
|
36
|
+
} & {
|
|
37
|
+
row?: (props: typeof __VLS_32) => any;
|
|
38
|
+
};
|
|
39
|
+
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>;
|
|
40
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { UseFormReturn } from "../../composables/useForm";
|
|
2
|
+
import type { FieldDefinition } from "../../types";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Rows shown in the UI, each paired with its real (unfiltered) array index. */
|
|
5
|
+
visibleRows: Array<{
|
|
6
|
+
row: any;
|
|
7
|
+
index: number;
|
|
8
|
+
}>;
|
|
9
|
+
/** Sub-field definitions for a row. */
|
|
10
|
+
subFields: FieldDefinition[];
|
|
11
|
+
/** Form instance owning the repeater array. */
|
|
12
|
+
form: UseFormReturn<any>;
|
|
13
|
+
/** The repeater field definition (for `showRowIndex` and `addLabel`). */
|
|
14
|
+
field: FieldDefinition;
|
|
15
|
+
/** Minimum rows — the Remove button disables at this count. */
|
|
16
|
+
minItems: number;
|
|
17
|
+
/** Maximum rows — the Add button disables at this count. */
|
|
18
|
+
maxItems: number | undefined;
|
|
19
|
+
/** Stable v-for key for a row (owned by DXRepeater — row identity, not index). */
|
|
20
|
+
rowKey: (row: any, fallbackPosition: number) => string | number;
|
|
21
|
+
/** Dot path into form.data for a row at the given true index. */
|
|
22
|
+
rowPath: (index: number) => string;
|
|
23
|
+
/** Remove the row at the given true index (respects minItems / soft-delete). */
|
|
24
|
+
removeRow: (index: number) => void;
|
|
25
|
+
/** Append a fresh row (respects maxItems). */
|
|
26
|
+
addRow: () => void;
|
|
27
|
+
}
|
|
28
|
+
declare var __VLS_1: {
|
|
29
|
+
row: any;
|
|
30
|
+
index: number;
|
|
31
|
+
fields: FieldDefinition[];
|
|
32
|
+
remove: () => void;
|
|
33
|
+
path: string;
|
|
34
|
+
};
|
|
35
|
+
type __VLS_Slots = {} & {
|
|
36
|
+
row?: (props: typeof __VLS_1) => any;
|
|
37
|
+
};
|
|
38
|
+
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>;
|
|
39
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
type StatFormat = "number" | "currency" | "percent";
|
|
2
|
+
type DeltaDirection = "up" | "down" | "neutral";
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Metric label, e.g. "Revenue". */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Optional secondary line under the title, e.g. "This week". */
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
/** The metric value. Numbers are formatted per `format`; strings pass through. */
|
|
9
|
+
value: string | number;
|
|
10
|
+
/** How to format a numeric `value` (default: plain number with grouping). */
|
|
11
|
+
format?: StatFormat;
|
|
12
|
+
/** Currency symbol for `format: "currency"` (default "£"). */
|
|
13
|
+
currencySymbol?: string;
|
|
14
|
+
/** Decimal places (default: 2 for currency, 0 otherwise). */
|
|
15
|
+
precision?: number;
|
|
16
|
+
/** Locale for number grouping/formatting (default: the runtime's). */
|
|
17
|
+
locale?: string;
|
|
18
|
+
/** Change versus a comparison period. Its sign drives the arrow/colour. */
|
|
19
|
+
delta?: number;
|
|
20
|
+
/** How to format the delta (default "percent"). */
|
|
21
|
+
deltaFormat?: StatFormat;
|
|
22
|
+
/** Force the delta direction instead of deriving it from `delta`'s sign. */
|
|
23
|
+
deltaDirection?: DeltaDirection;
|
|
24
|
+
/** Caption beside the delta, e.g. "vs last week". */
|
|
25
|
+
deltaLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Invert the delta colour: by default an up delta is positive (success/green)
|
|
28
|
+
* and a down delta negative (danger/red). Set for metrics where down is good
|
|
29
|
+
* (costs, bounce rate, …).
|
|
30
|
+
*/
|
|
31
|
+
invertDelta?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare var __VLS_5: {}, __VLS_7: {
|
|
34
|
+
formatted: string;
|
|
35
|
+
value: string | number;
|
|
36
|
+
}, __VLS_12: {};
|
|
37
|
+
type __VLS_Slots = {} & {
|
|
38
|
+
icon?: (props: typeof __VLS_5) => any;
|
|
39
|
+
} & {
|
|
40
|
+
value?: (props: typeof __VLS_7) => any;
|
|
41
|
+
} & {
|
|
42
|
+
trend?: (props: typeof __VLS_12) => any;
|
|
43
|
+
};
|
|
44
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
45
|
+
currencySymbol: string;
|
|
46
|
+
format: StatFormat;
|
|
47
|
+
deltaFormat: StatFormat;
|
|
48
|
+
invertDelta: boolean;
|
|
49
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
51
|
+
export default _default;
|
|
52
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
53
|
+
new (): {
|
|
54
|
+
$slots: S;
|
|
55
|
+
};
|
|
56
|
+
};
|