@omnitend/dashboard-for-laravel 0.10.0 → 0.11.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/DXDashboard.vue.d.ts +12 -2
- package/dist/components/extended/DXTable.vue.d.ts +15 -0
- package/dist/dashboard-for-laravel.js +3726 -3693
- 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/style.css +1 -1
- package/docs/public/api-reference.json +21 -3
- package/docs/public/docs-map.md +1 -1
- package/package.json +1 -1
- package/resources/js/components/extended/DXDashboard.vue +18 -3
- package/resources/js/components/extended/DXTable.vue +29 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generated": "2026-07-
|
|
2
|
+
"generated": "2026-07-04T13:10:37.448Z",
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "@omnitend/dashboard-for-laravel",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.11.0"
|
|
6
6
|
},
|
|
7
7
|
"components": {
|
|
8
8
|
"base": [
|
|
@@ -1250,6 +1250,18 @@
|
|
|
1250
1250
|
"default": "''",
|
|
1251
1251
|
"description": "Page title shown in navbar"
|
|
1252
1252
|
},
|
|
1253
|
+
{
|
|
1254
|
+
"name": "fluid",
|
|
1255
|
+
"type": "boolean",
|
|
1256
|
+
"required": false,
|
|
1257
|
+
"description": "Render the page content full-width and left-aligned instead of the default\ncentred, reading-width (`col-xl-10`) column. Use for data-heavy admin pages\n(wide tables)."
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"name": "contentClass",
|
|
1261
|
+
"type": "string",
|
|
1262
|
+
"required": false,
|
|
1263
|
+
"description": "Extra class(es) applied to the content container/column."
|
|
1264
|
+
},
|
|
1253
1265
|
{
|
|
1254
1266
|
"name": "user",
|
|
1255
1267
|
"type": "union",
|
|
@@ -1307,7 +1319,7 @@
|
|
|
1307
1319
|
},
|
|
1308
1320
|
{
|
|
1309
1321
|
"name": "default",
|
|
1310
|
-
"description": "Default slot for the main page content
|
|
1322
|
+
"description": "Default slot for the main page content. Full-width when `fluid`, otherwise a centred reading-width column.",
|
|
1311
1323
|
"bindings": []
|
|
1312
1324
|
}
|
|
1313
1325
|
],
|
|
@@ -2209,6 +2221,12 @@
|
|
|
2209
2221
|
"required": false,
|
|
2210
2222
|
"description": "API endpoint pattern for deletions (e.g., \"/api/products/:id\")"
|
|
2211
2223
|
},
|
|
2224
|
+
{
|
|
2225
|
+
"name": "deleteGuard",
|
|
2226
|
+
"type": "TSFunctionType",
|
|
2227
|
+
"required": false,
|
|
2228
|
+
"description": "Guard run when Delete is clicked, before the confirm dialog and request.\nReturn a message for a non-deletable item to show it immediately (as a\ntoast) and skip both the confirm and the delete request; return\n`null`/`undefined` to proceed with the normal confirm + delete. Lets you\nshort-circuit a doomed delete (e.g. a record with dependents that the\nserver would reject) with an immediate, specific reason."
|
|
2229
|
+
},
|
|
2212
2230
|
{
|
|
2213
2231
|
"name": "createUrl",
|
|
2214
2232
|
"type": "string",
|
package/docs/public/docs-map.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Documentation Map
|
|
2
2
|
|
|
3
3
|
> Auto-generated hierarchical overview of all documentation
|
|
4
|
-
> Last updated: 2026-07-
|
|
4
|
+
> Last updated: 2026-07-04T13:10:37.517Z
|
|
5
5
|
|
|
6
6
|
This file provides a complete map of all available documentation for AI agents and developers.
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -52,10 +52,15 @@
|
|
|
52
52
|
|
|
53
53
|
<!-- Page Content -->
|
|
54
54
|
<main class="dashboard-main p-4">
|
|
55
|
-
|
|
55
|
+
<!-- Fluid: full-width, left-aligned content (for wide tables / admin
|
|
56
|
+
pages). Default: a centred reading-width column. -->
|
|
57
|
+
<DContainer v-if="fluid" fluid :class="contentClass">
|
|
58
|
+
<!-- @slot Default slot for the main page content. Full-width when `fluid`, otherwise a centred reading-width column. -->
|
|
59
|
+
<slot />
|
|
60
|
+
</DContainer>
|
|
61
|
+
<DContainer v-else fluid>
|
|
56
62
|
<DRow class="justify-content-center">
|
|
57
|
-
<DCol cols="12" xl="10">
|
|
58
|
-
<!-- @slot Default slot for the main page content, rendered in the centred content column. -->
|
|
63
|
+
<DCol cols="12" xl="10" :class="contentClass">
|
|
59
64
|
<slot />
|
|
60
65
|
</DCol>
|
|
61
66
|
</DRow>
|
|
@@ -89,6 +94,16 @@ interface Props {
|
|
|
89
94
|
/** Page title shown in navbar */
|
|
90
95
|
pageTitle?: string;
|
|
91
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Render the page content full-width and left-aligned instead of the default
|
|
99
|
+
* centred, reading-width (`col-xl-10`) column. Use for data-heavy admin pages
|
|
100
|
+
* (wide tables).
|
|
101
|
+
*/
|
|
102
|
+
fluid?: boolean;
|
|
103
|
+
|
|
104
|
+
/** Extra class(es) applied to the content container/column. */
|
|
105
|
+
contentClass?: string;
|
|
106
|
+
|
|
92
107
|
/** User object for navbar dropdown */
|
|
93
108
|
user?: { name: string; email: string } | null;
|
|
94
109
|
|
|
@@ -794,6 +794,16 @@ export interface Props<TItem = any> {
|
|
|
794
794
|
/** API endpoint pattern for deletions (e.g., "/api/products/:id") */
|
|
795
795
|
deleteUrl?: string;
|
|
796
796
|
|
|
797
|
+
/**
|
|
798
|
+
* Guard run when Delete is clicked, before the confirm dialog and request.
|
|
799
|
+
* Return a message for a non-deletable item to show it immediately (as a
|
|
800
|
+
* toast) and skip both the confirm and the delete request; return
|
|
801
|
+
* `null`/`undefined` to proceed with the normal confirm + delete. Lets you
|
|
802
|
+
* short-circuit a doomed delete (e.g. a record with dependents that the
|
|
803
|
+
* server would reject) with an immediate, specific reason.
|
|
804
|
+
*/
|
|
805
|
+
deleteGuard?: (item: TItem) => string | null | undefined;
|
|
806
|
+
|
|
797
807
|
/** API endpoint for creating new items (e.g., "/api/products") — enables "New" button */
|
|
798
808
|
createUrl?: string;
|
|
799
809
|
|
|
@@ -1733,6 +1743,19 @@ const handleEditCancel = () => {
|
|
|
1733
1743
|
const handleDelete = async () => {
|
|
1734
1744
|
if (!editForm.value || !selectedItem.value || !props.deleteUrl) return;
|
|
1735
1745
|
|
|
1746
|
+
// Delete guard: a non-null message means this item can't be deleted — show
|
|
1747
|
+
// it immediately and skip the confirm and the request entirely.
|
|
1748
|
+
const guardMessage = props.deleteGuard?.(selectedItem.value as T);
|
|
1749
|
+
if (guardMessage) {
|
|
1750
|
+
createToast?.({
|
|
1751
|
+
title: 'Cannot delete',
|
|
1752
|
+
body: guardMessage,
|
|
1753
|
+
variant: 'danger',
|
|
1754
|
+
modelValue: 5000,
|
|
1755
|
+
});
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1736
1759
|
// Confirm deletion
|
|
1737
1760
|
const itemName = (selectedItem.value as any).name || (selectedItem.value as any).title || singularItemName.value;
|
|
1738
1761
|
const confirmed = window.confirm(`Are you sure you want to delete "${itemName}"? This action cannot be undone.`);
|
|
@@ -1786,6 +1809,12 @@ const handleDelete = async () => {
|
|
|
1786
1809
|
|
|
1787
1810
|
defineExpose({
|
|
1788
1811
|
refresh,
|
|
1812
|
+
/**
|
|
1813
|
+
* Open the built-in create modal (same as clicking the default "New {item}"
|
|
1814
|
+
* button). Lets the create action live outside the table card — e.g. in a
|
|
1815
|
+
* page header or the dashboard navbar. No-op unless `editFields` are set.
|
|
1816
|
+
*/
|
|
1817
|
+
openCreate: handleCreateNew,
|
|
1789
1818
|
});
|
|
1790
1819
|
</script>
|
|
1791
1820
|
|