@omnitend/dashboard-for-laravel 0.32.0 → 0.33.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/components/extended/DXCurrencyInput.vue.d.ts +27 -0
- package/dist/components/extended/DXField.vue.d.ts +30 -15
- package/dist/components/extended/DXTable.vue.d.ts +17 -5
- package/dist/composables/defineForm.d.ts +8 -2
- package/dist/dashboard-for-laravel.js +8489 -8340
- package/dist/dashboard-for-laravel.js.map +1 -1
- package/dist/dashboard-for-laravel.umd.cjs +7 -7
- package/dist/dashboard-for-laravel.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +21 -9
- package/docs/public/api-reference.json +79 -5
- package/docs/public/docs-map.md +3 -2
- package/docs/public/llms.txt +3 -2
- package/package.json +1 -5
- package/resources/css/theme.scss +34 -0
- package/resources/js/components/extended/DXCurrencyInput.vue +143 -0
- package/resources/js/components/extended/DXDashboardSidebar.vue +21 -16
- package/resources/js/components/extended/DXField.vue +142 -71
- package/resources/js/components/extended/DXFormField.vue +1 -0
- package/resources/js/components/extended/DXTable.vue +116 -48
- package/resources/js/composables/defineForm.ts +12 -2
- package/resources/js/composables/useResourceEditor.ts +3 -5
- package/resources/js/index.ts +1 -0
- package/resources/js/types/index.ts +22 -8
- package/resources/js/utils/api.ts +13 -5
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** The numeric model. In `minorUnits` mode this is the integer minor-unit
|
|
3
|
+
* amount (e.g. pence); otherwise the major-unit amount. `null` = empty. */
|
|
4
|
+
modelValue?: number | null;
|
|
5
|
+
/** Symbol shown in the prepend (default "£"). */
|
|
6
|
+
currencySymbol?: string;
|
|
7
|
+
/** Minor-unit decimal places the display pads to (default 2; 0 for a
|
|
8
|
+
* currency with no minor unit, e.g. JPY). */
|
|
9
|
+
decimals?: number;
|
|
10
|
+
/** Model is stored in integer minor units (pence) but edited in major
|
|
11
|
+
* units (pounds). Scale is 10^decimals. */
|
|
12
|
+
minorUnits?: boolean;
|
|
13
|
+
/** Input step in MAJOR units (default: one minor unit, e.g. 0.01). */
|
|
14
|
+
step?: string | number;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: number | null) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
currencySymbol: string;
|
|
22
|
+
modelValue: number | null;
|
|
23
|
+
step: string | number;
|
|
24
|
+
decimals: number;
|
|
25
|
+
minorUnits: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UseFormReturn } from "../../composables/useForm";
|
|
2
|
-
import type { FieldDefinition, LabelCols } from "../../types";
|
|
2
|
+
import type { FieldDefinition, FieldOption, LabelCols } from "../../types";
|
|
3
3
|
interface Props {
|
|
4
4
|
/** Field definition to render */
|
|
5
5
|
field: FieldDefinition;
|
|
@@ -92,30 +92,39 @@ declare var __VLS_1: {
|
|
|
92
92
|
}, __VLS_98: {
|
|
93
93
|
field: FieldDefinition;
|
|
94
94
|
model: any;
|
|
95
|
-
},
|
|
95
|
+
}, __VLS_119: {
|
|
96
|
+
option: FieldOption;
|
|
97
|
+
on: boolean;
|
|
98
|
+
}, __VLS_124: {
|
|
99
|
+
field: FieldDefinition;
|
|
100
|
+
model: any;
|
|
101
|
+
}, __VLS_129: {
|
|
102
|
+
field: FieldDefinition;
|
|
103
|
+
model: any;
|
|
104
|
+
}, __VLS_144: {
|
|
96
105
|
row: any;
|
|
97
106
|
index: number;
|
|
98
107
|
fields: FieldDefinition[];
|
|
99
108
|
remove: () => void;
|
|
100
109
|
path: string;
|
|
101
|
-
},
|
|
110
|
+
}, __VLS_146: {
|
|
102
111
|
field: FieldDefinition;
|
|
103
112
|
model: any;
|
|
104
|
-
},
|
|
113
|
+
}, __VLS_151: {
|
|
105
114
|
field: FieldDefinition;
|
|
106
115
|
model: any;
|
|
107
|
-
},
|
|
116
|
+
}, __VLS_162: {
|
|
108
117
|
field: FieldDefinition;
|
|
109
118
|
model: any;
|
|
110
|
-
},
|
|
119
|
+
}, __VLS_164: {
|
|
111
120
|
field: FieldDefinition;
|
|
112
121
|
model: any;
|
|
113
122
|
value: any;
|
|
114
123
|
update: typeof setValue;
|
|
115
|
-
},
|
|
124
|
+
}, __VLS_230: {
|
|
116
125
|
field: FieldDefinition;
|
|
117
126
|
model: any;
|
|
118
|
-
},
|
|
127
|
+
}, __VLS_235: {
|
|
119
128
|
field: FieldDefinition;
|
|
120
129
|
model: any;
|
|
121
130
|
};
|
|
@@ -150,19 +159,25 @@ type __VLS_Slots = {} & {
|
|
|
150
159
|
} & {
|
|
151
160
|
hint?: (props: typeof __VLS_98) => any;
|
|
152
161
|
} & {
|
|
153
|
-
'
|
|
162
|
+
'switch-list-item'?: (props: typeof __VLS_119) => any;
|
|
163
|
+
} & {
|
|
164
|
+
info?: (props: typeof __VLS_124) => any;
|
|
165
|
+
} & {
|
|
166
|
+
hint?: (props: typeof __VLS_129) => any;
|
|
167
|
+
} & {
|
|
168
|
+
'repeater-row'?: (props: typeof __VLS_144) => any;
|
|
154
169
|
} & {
|
|
155
|
-
info?: (props: typeof
|
|
170
|
+
info?: (props: typeof __VLS_146) => any;
|
|
156
171
|
} & {
|
|
157
|
-
hint?: (props: typeof
|
|
172
|
+
hint?: (props: typeof __VLS_151) => any;
|
|
158
173
|
} & {
|
|
159
|
-
hint?: (props: typeof
|
|
174
|
+
hint?: (props: typeof __VLS_162) => any;
|
|
160
175
|
} & {
|
|
161
|
-
value?: (props: typeof
|
|
176
|
+
value?: (props: typeof __VLS_164) => any;
|
|
162
177
|
} & {
|
|
163
|
-
info?: (props: typeof
|
|
178
|
+
info?: (props: typeof __VLS_230) => any;
|
|
164
179
|
} & {
|
|
165
|
-
hint?: (props: typeof
|
|
180
|
+
hint?: (props: typeof __VLS_235) => any;
|
|
166
181
|
};
|
|
167
182
|
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
183
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -15,6 +15,17 @@ export interface TableField {
|
|
|
15
15
|
* `#cell` slot.
|
|
16
16
|
*/
|
|
17
17
|
filterKey?: string;
|
|
18
|
+
/**
|
|
19
|
+
* For a `select` filter: allow SEVERAL values at once (#51). The filter
|
|
20
|
+
* renders as a multi-select typeahead, the filters map holds an ARRAY of
|
|
21
|
+
* the chosen option values, and the query string carries Laravel bracket
|
|
22
|
+
* notation (`filters[status][]=active&filters[status][]=pending`).
|
|
23
|
+
* Client-side, a row matches when its value equals ANY chosen value. An
|
|
24
|
+
* empty selection means "no filter". The "All …" reset row is omitted in
|
|
25
|
+
* this mode (removing the chips/✕ is the way back); `filterNullText`
|
|
26
|
+
* stays available as a choosable value.
|
|
27
|
+
*/
|
|
28
|
+
filterMultiple?: boolean;
|
|
18
29
|
/**
|
|
19
30
|
* For a `select` filter: adds an option meaning "has no value", e.g.
|
|
20
31
|
* `filterNullText: "Unassigned"` on an assignee column. Selecting it sends
|
|
@@ -102,8 +113,9 @@ export interface Props<TItem = any> {
|
|
|
102
113
|
fields: TableField[];
|
|
103
114
|
/** Sort configuration (v-model support) */
|
|
104
115
|
sortBy?: BTableSortBy[];
|
|
105
|
-
/** Filter values (v-model support) - key is field key, value is filter
|
|
106
|
-
|
|
116
|
+
/** Filter values (v-model support) - key is field key, value is the filter
|
|
117
|
+
* string, or an ARRAY of values for a `filterMultiple` column (#51). */
|
|
118
|
+
filters?: Record<string, string | string[]>;
|
|
107
119
|
/** Dynamic filter options from server - key is field key, value is array of values */
|
|
108
120
|
filterValues?: Record<string, string[]>;
|
|
109
121
|
/** Inertia route URL (if provided, handles navigation automatically) */
|
|
@@ -273,9 +285,9 @@ declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_
|
|
|
273
285
|
key: string;
|
|
274
286
|
order: "asc" | "desc";
|
|
275
287
|
}) => any) | undefined;
|
|
276
|
-
readonly onFilterChange?: ((filters: Record<string, string>) => any) | undefined;
|
|
288
|
+
readonly onFilterChange?: ((filters: Record<string, string | string[]>) => any) | undefined;
|
|
277
289
|
readonly onPerPageChange?: ((perPage: number) => any) | undefined;
|
|
278
|
-
readonly "onUpdate:filters"?: ((filters: Record<string, string>) => any) | undefined;
|
|
290
|
+
readonly "onUpdate:filters"?: ((filters: Record<string, string | string[]>) => any) | undefined;
|
|
279
291
|
readonly "onUpdate:perPage"?: ((perPage: number) => any) | undefined;
|
|
280
292
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:sortBy" | "onUpdate:busy" | "onRowClicked" | "onUpdate:expandedItems" | "onRowCreated" | "onCreateError" | "onRowUpdated" | "onEditError" | "onRowDeleted" | "onDeleteError" | "onPageChange" | "onSortChange" | "onFilterChange" | "onPerPageChange" | "onUpdate:filters" | "onUpdate:perPage"> & Props<T> & Partial<{}>> & import("vue").PublicProps;
|
|
281
293
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
@@ -300,7 +312,7 @@ declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_
|
|
|
300
312
|
emit: ((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: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: {
|
|
301
313
|
key: string;
|
|
302
314
|
order: "asc" | "desc";
|
|
303
|
-
}) => void) & ((evt: "filterChange", filters: Record<string, string>) => void) & ((evt: "perPageChange", perPage: number) => void) & ((evt: "update:filters", filters: Record<string, string>) => void) & ((evt: "update:perPage", perPage: number) => void);
|
|
315
|
+
}) => void) & ((evt: "filterChange", filters: Record<string, string | string[]>) => void) & ((evt: "perPageChange", perPage: number) => void) & ((evt: "update:filters", filters: Record<string, string | string[]>) => void) & ((evt: "update:perPage", perPage: number) => void);
|
|
304
316
|
}>) => import("vue").VNode & {
|
|
305
317
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
306
318
|
};
|
|
@@ -4,8 +4,14 @@ import type { FieldDefinition } from "../types";
|
|
|
4
4
|
* Extended field definition that includes default value
|
|
5
5
|
*/
|
|
6
6
|
export interface FormFieldDefinition<TValue = any> extends FieldDefinition {
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Default/initial value for the field. Optional: when omitted, the field
|
|
9
|
+
* seeds from its type (`false` for checkbox/switch, `[]` for
|
|
10
|
+
* checkbox-group/switch-list/repeater, `0` for numerics, `""` otherwise) —
|
|
11
|
+
* previously the type required this even though the runtime had a
|
|
12
|
+
* fallback, so typed consumers could never use it.
|
|
13
|
+
*/
|
|
14
|
+
default?: TValue;
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* Infer data type from field definitions
|