adminizer 5.1.0-build.26 → 5.1.0-build.28
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/assets/{abnfDiagram-VCTEODGH-BPk_d6eP.js → abnfDiagram-VCTEODGH-uWOVpoSR.js} +1 -1
- package/assets/add-A_fIlNKI.js +1 -0
- package/assets/{add-group-Dgnx2vMh.js → add-group-C2x6K3tV.js} +1 -1
- package/assets/{add-user-BfR1nhGQ.js → add-user-u61kYlEm.js} +1 -1
- package/assets/ai-assistant/agent.es.js +7894 -6950
- package/assets/app-CRa5Kokq.js +138 -0
- package/assets/app-TCCHARSx.css +1 -0
- package/assets/{arc-uDJSz8bh.js → arc--ZX64bmY.js} +1 -1
- package/assets/{architectureDiagram-5GKGNRK7-OIR43cRx.js → architectureDiagram-5GKGNRK7-W9AzLZvl.js} +1 -1
- package/assets/{blockDiagram-I7D4REHJ-h6ySQ0QE.js → blockDiagram-I7D4REHJ-BpK_yEa7.js} +1 -1
- package/assets/{c4Diagram-7LVT6UL2-DOT80T2g.js → c4Diagram-7LVT6UL2-DiQzU1s0.js} +1 -1
- package/assets/{catalog-B6ZGmhng.js → catalog-dSCv3Szm.js} +3 -3
- package/assets/channel-DRO88SVn.js +1 -0
- package/assets/{chunk-2Q5K7J3B-BoyYAiVR.js → chunk-2Q5K7J3B-GPHETbCq.js} +1 -1
- package/assets/{chunk-5VM5RSS4-B-ZfcfTz.js → chunk-5VM5RSS4-bLovkogd.js} +1 -1
- package/assets/{chunk-F27PBJKO-GsDMG_ue.js → chunk-F27PBJKO-DbkTY41z.js} +1 -1
- package/assets/{chunk-IMKFNOWR-zvoLOzaf.js → chunk-IMKFNOWR-CL0VAxX7.js} +1 -1
- package/assets/{chunk-JWPE2WC7-DYtJ3ly7.js → chunk-JWPE2WC7-d1Grk14b.js} +1 -1
- package/assets/{chunk-POPQ4Y6H-ChVoBm_0.js → chunk-POPQ4Y6H-CAUhiiNt.js} +1 -1
- package/assets/{chunk-SVP7TREG-BV0LTCGr.js → chunk-SVP7TREG-C8ADZUEr.js} +1 -1
- package/assets/{chunk-TICWLB2K-Dmp4mCPP.js → chunk-TICWLB2K-oRqFZabo.js} +1 -1
- package/assets/{chunk-XXDRQBXY-d7y3nWm0.js → chunk-XXDRQBXY-C3zo4c2P.js} +1 -1
- package/assets/classDiagram-ZZMXUADV-Cb-leHEm.js +1 -0
- package/assets/classDiagram-v2-VYDZK3BY-Cb-leHEm.js +1 -0
- package/assets/controls/ckeditor.es.js +265 -259
- package/assets/controls/jsoneditor.es.js +5921 -5896
- package/assets/controls/leaflet.es.js +29 -26
- package/assets/{cose-bilkent-JH36ORCC-DfL41_IE.js → cose-bilkent-JH36ORCC-ZPvVaI6n.js} +1 -1
- package/assets/{cynefin-OW5HDTMX-CdMB9V74.js → cynefin-OW5HDTMX-EEL4eqU7.js} +1 -1
- package/assets/{cynefinDiagram-5FMLGOSQ-B65Z6Wy5.js → cynefinDiagram-5FMLGOSQ-DpDFbbrn.js} +1 -1
- package/assets/{dagre-GXQ25YYZ-vs7dR1k0.js → dagre-GXQ25YYZ-Dtjy1xN1.js} +1 -1
- package/assets/{dashboard-gVK2jkxM.js → dashboard-DXs-vdJG.js} +2 -2
- package/assets/{diagram-S7CK7UJ4-BP2KlMF7.js → diagram-S7CK7UJ4-BhWisCOy.js} +1 -1
- package/assets/{diagram-UQ7AKVKN-DtBR3nL4.js → diagram-UQ7AKVKN-BBH2Mm33.js} +1 -1
- package/assets/{diagram-VSXAHHWV-DNqepAMp.js → diagram-VSXAHHWV-B1Xc2cPz.js} +1 -1
- package/assets/{diagram-VX7I27RA-B_qeXnMo.js → diagram-VX7I27RA-CTTYzy1s.js} +1 -1
- package/assets/{diagram-Z3DM3KII-Deat3YWi.js → diagram-Z3DM3KII-DdH0yWH0.js} +1 -1
- package/assets/{docs-CV8mkNUq.js → docs-BZYlfOON.js} +1 -1
- package/assets/{ebnfDiagram-PWID7BFC-C0qShrVz.js → ebnfDiagram-PWID7BFC-R9cSqf0y.js} +1 -1
- package/assets/{erDiagram-RLTQ6QDP-ByGzKaF4.js → erDiagram-RLTQ6QDP-Bpu-Pm95.js} +1 -1
- package/assets/{flowDiagram-HODETNUW-DP7cFly4.js → flowDiagram-HODETNUW-NdXf-fRN.js} +1 -1
- package/assets/{ganttDiagram-EL5Y4UJY-CxsNBze0.js → ganttDiagram-EL5Y4UJY-itQHv_dH.js} +1 -1
- package/assets/{gitGraphDiagram-WWUBYQGX-DAjOquZ3.js → gitGraphDiagram-WWUBYQGX-DorHK4Wx.js} +1 -1
- package/assets/{history-BjZubBIS.js → history-DB48MCa8.js} +1 -1
- package/assets/{infoDiagram-27XIBGKW-DAHcs_EB.js → infoDiagram-27XIBGKW-FgFATKk4.js} +1 -1
- package/assets/{init-user-Y2cS_Umn.js → init-user-DAXb55S_.js} +1 -1
- package/assets/{ishikawaDiagram-5VMMS53U-DG-NixrB.js → ishikawaDiagram-5VMMS53U-Bjl1a496.js} +1 -1
- package/assets/{journeyDiagram-3NMN7TZE-B3QkLsRE.js → journeyDiagram-3NMN7TZE-DU1TmnbI.js} +1 -1
- package/assets/{kanban-definition-UXKFOSKX-Co9SxVeD.js → kanban-definition-UXKFOSKX-BsrlKdcU.js} +1 -1
- package/assets/{layout-CcAsMdrw.js → layout-C68duuC7.js} +1 -1
- package/assets/{linear-p2QT3a1B.js → linear-DdadsTLS.js} +1 -1
- package/assets/{list-Bu_Q0EVP.js → list-D3R3q3Ti.js} +2 -2
- package/assets/{login-n9fNk99k.js → login-DwxC2WD6.js} +1 -1
- package/assets/manifest.json +277 -277
- package/assets/{media-manager-ChlwzfP8.js → media-manager-mt4Ykki7.js} +1 -1
- package/assets/{mermaid.core-CUYdfyhY.js → mermaid.core-DxLHD4PF.js} +5 -5
- package/assets/{mindmap-definition-YA3MSWOX-9_Osk887.js → mindmap-definition-YA3MSWOX-BfdP8hOy.js} +1 -1
- package/assets/module-DKdDlng0.js +1 -0
- package/assets/{notification-DTOo0s9p.js → notification-DDWbaooT.js} +1 -1
- package/assets/{pegDiagram-XKGWAZYB-xGo27v2q.js → pegDiagram-XKGWAZYB-BO9cFGCI.js} +1 -1
- package/assets/{pieDiagram-E7YTZNPT-BlxVq7jD.js → pieDiagram-E7YTZNPT-B4KrTpto.js} +1 -1
- package/assets/{quadrantDiagram-AXDQQJYC-DSIsRL3O.js → quadrantDiagram-AXDQQJYC-BumScZvv.js} +1 -1
- package/assets/{railroadDiagram-O6MQD6OU-CcXubifR.js → railroadDiagram-O6MQD6OU-DUDQQC-p.js} +1 -1
- package/assets/{register-sc1NPrUn.js → register-5rs1OSaq.js} +1 -1
- package/assets/{requirementDiagram-BXWQKSXE-CQ0HxjT5.js → requirementDiagram-BXWQKSXE-BtNsxNt1.js} +1 -1
- package/assets/{ru-BcGQTZye.js → ru-Cf1WWSt0.js} +1 -1
- package/assets/{sankeyDiagram-P5KCCOFB-BfeizISp.js → sankeyDiagram-P5KCCOFB-xjPcSTcN.js} +1 -1
- package/assets/{sequenceDiagram-WJ2MYXX4-U6sVYSC5.js → sequenceDiagram-WJ2MYXX4-BVOgA3-B.js} +1 -1
- package/assets/{sizeCapture-INFHLROL-sy73XuOR.js → sizeCapture-INFHLROL-BDI5FsKO.js} +1 -1
- package/assets/{stateDiagram-D77RDMKH-BBQ4V6V5.js → stateDiagram-D77RDMKH-DreIJby8.js} +1 -1
- package/assets/stateDiagram-v2-MP3YSRHH-BNzSJJYe.js +1 -0
- package/assets/{swimlanes-42K2YHIH-DgNoaSy5.js → swimlanes-42K2YHIH-J_CNnPZv.js} +1 -1
- package/assets/swimlanesDiagram-VR7AAH4N-DN5N1rG7.js +8 -0
- package/assets/{timeline-definition-24CTP7MA-DCZ7_pVf.js → timeline-definition-24CTP7MA-BXGN0YmT.js} +1 -1
- package/assets/{use-appearance-B1Ulba0z.js → use-appearance-B2YFalXG.js} +1 -1
- package/assets/{user-filters-list-Jd8ADfF3.js → user-filters-list-D8WohjvX.js} +1 -1
- package/assets/{vennDiagram-4TSXK5OY-BH1b3-en.js → vennDiagram-4TSXK5OY-Mu0lMKUo.js} +1 -1
- package/assets/{wardleyDiagram-VM6X3IG4-4tU49eCf.js → wardleyDiagram-VM6X3IG4-CXFMI74r.js} +1 -1
- package/assets/{welcome-CoEo_2b6.js → welcome-DHQx7R11.js} +1 -1
- package/assets/with-app-layout-Cvg36gxr.js +31 -0
- package/assets/{xychartDiagram-S5SC5T6Z-C-jB1QUO.js → xychartDiagram-S5SC5T6Z-DCr7j1YG.js} +1 -1
- package/controllers/adminLinks.d.ts +7 -0
- package/controllers/adminLinks.js +10 -0
- package/helpers/menuHelper.d.ts +11 -1
- package/helpers/menuHelper.js +16 -6
- package/helpers/navigationAccessHelper.d.ts +10 -3
- package/helpers/navigationAccessHelper.js +21 -2
- package/helpers/pathPattern.d.ts +5 -0
- package/helpers/pathPattern.js +10 -0
- package/interfaces/adminpanelConfig.d.ts +23 -0
- package/lib/admin-links/AdminLinkHandler.d.ts +41 -0
- package/lib/admin-links/AdminLinkHandler.js +94 -1
- package/lib/ai-assistant/AiAssistantUiMethodHandler.d.ts +4 -22
- package/lib/ai-assistant/AiAssistantUiMethodHandler.js +3 -47
- package/lib/docs/AbstractDocumentation.js +2 -4
- package/package.json +1 -2
- package/system/Router.js +7 -0
- package/system/bindInertia.js +16 -0
- package/ui/components/VanillaJSONEditor.js +50 -11
- package/ui/components/ui/badge.d.ts +1 -1
- package/ui/components/ui/badge.js +1 -0
- package/ui/components/ui/command.d.ts +3 -1
- package/ui/components/ui/command.js +2 -2
- package/assets/add-BJKSs5TK.js +0 -1
- package/assets/app-BKQr0JOg.js +0 -138
- package/assets/app-DPmI-MvN.css +0 -1
- package/assets/channel-e6rquzsE.js +0 -1
- package/assets/classDiagram-ZZMXUADV-DIbGlLDx.js +0 -1
- package/assets/classDiagram-v2-VYDZK3BY-DIbGlLDx.js +0 -1
- package/assets/module-jjWCUszz.js +0 -1
- package/assets/stateDiagram-v2-MP3YSRHH-BrVvb-bz.js +0 -1
- package/assets/swimlanesDiagram-VR7AAH4N-CkLcfj4e.js +0 -8
- package/assets/with-app-layout-R5blfHwR.js +0 -31
package/system/bindInertia.js
CHANGED
|
@@ -168,6 +168,22 @@ export function bindInertia(adminizer) {
|
|
|
168
168
|
},
|
|
169
169
|
menu,
|
|
170
170
|
menuSections: req.user ? menuHelper.getSections(req) : null,
|
|
171
|
+
// Auto breadcrumbs. A function prop is evaluated by the Inertia
|
|
172
|
+
// adapter only when the key is rendered and only when the page did
|
|
173
|
+
// not send `breadcrumbs` of its own — page props override shared
|
|
174
|
+
// props before evaluation.
|
|
175
|
+
...(menu && adminizer.config.navbar?.breadcrumbs === 'auto' ? {
|
|
176
|
+
breadcrumbs: async () => {
|
|
177
|
+
try {
|
|
178
|
+
const crumbs = await adminizer.adminLinkHandler.locate(req.user, req.originalUrl || req.url, menu);
|
|
179
|
+
return crumbs.map((crumb) => ({ ...crumb, title: req.i18n.__(crumb.title) }));
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
Adminizer.log.error(`bindInertia > breadcrumbs failed: ${error}`);
|
|
183
|
+
return [];
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
} : {}),
|
|
171
187
|
title: menuHelper.getBrandTitle(),
|
|
172
188
|
brand: menuHelper.getBrandTitle(),
|
|
173
189
|
logout: menuHelper.getLogoutUrl(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createJSONEditor, createAjvValidator } from 'vanilla-jsoneditor';
|
|
2
|
+
import { createJSONEditor, createAjvValidator, isTextContent, toJSONContent } from 'vanilla-jsoneditor';
|
|
3
3
|
import { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { useAppearance } from "@/hooks/use-appearance";
|
|
5
5
|
import { setFieldError } from "@/hooks/form-state";
|
|
@@ -11,10 +11,32 @@ function normalizeContent(content, json) {
|
|
|
11
11
|
}
|
|
12
12
|
return json !== undefined ? { json } : undefined;
|
|
13
13
|
}
|
|
14
|
+
function contentKey(content) {
|
|
15
|
+
return content === undefined ? 'undefined' : JSON.stringify(content);
|
|
16
|
+
}
|
|
17
|
+
// In text mode the editor emits {text}, in tree mode {json}. Consumers expect the parsed
|
|
18
|
+
// value, so always hand them {json} and report unparsable text as a field error.
|
|
19
|
+
function toJson(content) {
|
|
20
|
+
if (!isTextContent(content)) {
|
|
21
|
+
return { json: content.json };
|
|
22
|
+
}
|
|
23
|
+
if (content.text.trim() === '') {
|
|
24
|
+
return { json: undefined };
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
return { json: toJSONContent(content).json };
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return { parseError: err instanceof Error ? err.message : 'Invalid JSON' };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
14
33
|
export default function VanillaJSONEditor(props) {
|
|
15
34
|
const refContainer = useRef(null);
|
|
16
35
|
const refEditor = useRef(null);
|
|
17
36
|
const refPrevProps = useRef(props);
|
|
37
|
+
// Serialized content of the last onChange we emitted: the parent feeds it straight back
|
|
38
|
+
// as a prop, and pushing that echo into the editor would rewrite what the user is typing.
|
|
39
|
+
const refEmittedContent = useRef(undefined);
|
|
18
40
|
const { appearance } = useAppearance();
|
|
19
41
|
const [theme, setTheme] = useState('');
|
|
20
42
|
useEffect(() => {
|
|
@@ -23,9 +45,11 @@ export default function VanillaJSONEditor(props) {
|
|
|
23
45
|
}, [appearance]);
|
|
24
46
|
useEffect(() => {
|
|
25
47
|
if (refEditor.current) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
48
|
+
const content = normalizeContent(props.content, props.json);
|
|
49
|
+
if (contentKey(content) === refEmittedContent.current) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
refEditor.current.updateProps({ content });
|
|
29
53
|
}
|
|
30
54
|
}, [props.content, props.json]);
|
|
31
55
|
useEffect(() => {
|
|
@@ -38,15 +62,23 @@ export default function VanillaJSONEditor(props) {
|
|
|
38
62
|
validator,
|
|
39
63
|
content,
|
|
40
64
|
onChange: (content, previousContent, status) => {
|
|
41
|
-
|
|
42
|
-
|
|
65
|
+
const { json, parseError } = toJson(content);
|
|
66
|
+
if (parseError) {
|
|
67
|
+
setFieldError(props.name, true, parseError);
|
|
68
|
+
}
|
|
69
|
+
else if (validator) {
|
|
70
|
+
const isEmpty = json === undefined;
|
|
43
71
|
const validationError = isEmpty
|
|
44
72
|
? ['error']
|
|
45
73
|
: status.contentErrors?.validationErrors;
|
|
46
74
|
setFieldError(props.name, !!validationError?.length, 'Error validation JSON schema');
|
|
47
75
|
}
|
|
76
|
+
else {
|
|
77
|
+
setFieldError(props.name, false);
|
|
78
|
+
}
|
|
48
79
|
if (props.onChange) {
|
|
49
|
-
|
|
80
|
+
refEmittedContent.current = contentKey(normalizeContent(json, undefined));
|
|
81
|
+
props.onChange({ json }, previousContent, status);
|
|
50
82
|
}
|
|
51
83
|
}
|
|
52
84
|
}
|
|
@@ -54,13 +86,14 @@ export default function VanillaJSONEditor(props) {
|
|
|
54
86
|
// Trigger onChange manually
|
|
55
87
|
if (refEditor.current) {
|
|
56
88
|
// Get the current content
|
|
57
|
-
const
|
|
89
|
+
const { json, parseError } = toJson(refEditor.current.get());
|
|
58
90
|
// Validate the content
|
|
59
91
|
const validationResult = refEditor.current.validate();
|
|
60
92
|
// @ts-ignore
|
|
61
93
|
const hasErrors = !!validationResult?.validationErrors?.length;
|
|
62
94
|
if (props.onChange) {
|
|
63
|
-
|
|
95
|
+
refEmittedContent.current = contentKey(normalizeContent(json, undefined));
|
|
96
|
+
props.onChange({ json },
|
|
64
97
|
//@ts-ignore
|
|
65
98
|
undefined, {
|
|
66
99
|
contentErrors: validationResult,
|
|
@@ -71,7 +104,7 @@ export default function VanillaJSONEditor(props) {
|
|
|
71
104
|
});
|
|
72
105
|
}
|
|
73
106
|
// Set the error state
|
|
74
|
-
setFieldError(props.name, hasErrors, 'Error validation JSON schema');
|
|
107
|
+
setFieldError(props.name, hasErrors || !!parseError, parseError ?? 'Error validation JSON schema');
|
|
75
108
|
}
|
|
76
109
|
return () => {
|
|
77
110
|
// destroy editor
|
|
@@ -88,7 +121,13 @@ export default function VanillaJSONEditor(props) {
|
|
|
88
121
|
// since the last time to prevent syncing issues
|
|
89
122
|
const changedProps = filterUnchangedProps(props, refPrevProps.current);
|
|
90
123
|
if ('content' in changedProps || 'json' in changedProps) {
|
|
91
|
-
|
|
124
|
+
const content = normalizeContent(props.content, props.json);
|
|
125
|
+
if (contentKey(content) === refEmittedContent.current) {
|
|
126
|
+
delete changedProps.content;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
changedProps.content = content;
|
|
130
|
+
}
|
|
92
131
|
delete changedProps.json;
|
|
93
132
|
}
|
|
94
133
|
if ('schema' in changedProps) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "warning" | "outline" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
7
|
asChild?: boolean;
|
|
@@ -8,6 +8,7 @@ const badgeVariants = cva("inline-flex items-center justify-center rounded-md bo
|
|
|
8
8
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
9
9
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
10
10
|
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
11
|
+
warning: "border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90",
|
|
11
12
|
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
12
13
|
},
|
|
13
14
|
},
|
|
@@ -2,9 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
import { Command as CommandPrimitive } from "cmdk";
|
|
3
3
|
import { Dialog } from "@/components/ui/dialog";
|
|
4
4
|
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
|
|
5
|
-
declare function CommandDialog({ title, description, children, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
5
|
+
declare function CommandDialog({ title, description, shouldFilter, children, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
6
|
title?: string;
|
|
7
7
|
description?: string;
|
|
8
|
+
/** Pass `false` when the items are already filtered by the server. */
|
|
9
|
+
shouldFilter?: boolean;
|
|
8
10
|
}): React.JSX.Element;
|
|
9
11
|
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
|
|
10
12
|
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
|
|
@@ -6,8 +6,8 @@ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, }
|
|
|
6
6
|
function Command({ className, ...props }) {
|
|
7
7
|
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className), ...props }));
|
|
8
8
|
}
|
|
9
|
-
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, ...props }) {
|
|
10
|
-
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: "overflow-hidden p-0", children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] }));
|
|
9
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", shouldFilter, children, ...props }) {
|
|
10
|
+
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: "overflow-hidden p-0 z-[1011]", children: _jsx(Command, { shouldFilter: shouldFilter, className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] }));
|
|
11
11
|
}
|
|
12
12
|
function CommandInput({ className, ...props }) {
|
|
13
13
|
return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] }));
|
package/assets/add-BJKSs5TK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as e,r as a,t,j as r,T as c,A as u}from"./app-BKQr0JOg.js";import{w as p}from"./with-app-layout-R5blfHwR.js";import"./use-appearance-B1Ulba0z.js";const f=[];function n(){const o=e();return a.useEffect(()=>{const s=o.props.flash;s&&(s.success&&t.success(s.success),s.error&&t.error(s.error))},[o.props.flash]),r.jsxs(r.Fragment,{children:[r.jsx(c,{position:"top-center",richColors:!0,closeButton:!0}),r.jsx(u,{page:o,catalog:!1})]})}const d=p(n,{breadcrumbs:f,className:"overflow-auto h-[calc(100svh-16px)]"});export{d as default};
|