@payloadcms/ui 4.0.0-canary.5 → 4.0.0-canary.6
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/css/forms.css +6 -3
- package/dist/css/theme.css +2 -1
- package/dist/elements/AddNewRelation/index.css +1 -1
- package/dist/elements/DatePicker/index.css +1 -1
- package/dist/elements/DatePicker/index.js +1 -1
- package/dist/elements/DatePicker/index.js.map +1 -1
- package/dist/elements/DocumentFields/index.css +1 -0
- package/dist/elements/EditUpload/index.d.ts.map +1 -1
- package/dist/elements/EditUpload/index.js +4 -0
- package/dist/elements/EditUpload/index.js.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.css +3 -1
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.css +1 -0
- package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.js.map +1 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.js +12 -12
- package/dist/elements/Hierarchy/DocHeaderButton/index.js.map +1 -1
- package/dist/elements/Hierarchy/Field/index.client.js +14 -14
- package/dist/elements/Hierarchy/Field/index.client.js.map +1 -1
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts.map +1 -0
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js.map +1 -0
- package/dist/elements/Hierarchy/Modal/index.css +88 -0
- package/dist/elements/Hierarchy/Modal/index.d.ts +20 -0
- package/dist/elements/Hierarchy/Modal/index.d.ts.map +1 -0
- package/dist/elements/Hierarchy/{Drawer → Modal}/index.js +105 -81
- package/dist/elements/Hierarchy/Modal/index.js.map +1 -0
- package/dist/elements/Hierarchy/{Drawer → Modal}/types.d.ts +22 -18
- package/dist/elements/Hierarchy/Modal/types.d.ts.map +1 -0
- package/dist/elements/Hierarchy/Modal/types.js.map +1 -0
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.d.ts +30 -0
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.d.ts.map +1 -0
- package/dist/elements/Hierarchy/{Drawer/useHierarchyDrawer.js → Modal/useHierarchyModal.js} +51 -50
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.js.map +1 -0
- package/dist/elements/Hierarchy/MoveMany/index.d.ts +2 -2
- package/dist/elements/Hierarchy/MoveMany/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/MoveMany/index.js +9 -9
- package/dist/elements/Hierarchy/MoveMany/index.js.map +1 -1
- package/dist/elements/LivePreview/Toolbar/SizeInput/index.d.ts.map +1 -1
- package/dist/elements/LivePreview/Toolbar/SizeInput/index.js +1 -0
- package/dist/elements/LivePreview/Toolbar/SizeInput/index.js.map +1 -1
- package/dist/elements/LivePreview/Window/index.css +6 -0
- package/dist/elements/ReactSelect/index.css +2 -2
- package/dist/elements/ReactSelect/index.js +1 -1
- package/dist/elements/ReactSelect/index.js.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js +24 -24
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js.map +1 -1
- package/dist/elements/TimezonePicker/index.css +1 -1
- package/dist/exports/client/index.d.ts +2 -2
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +26 -26
- package/dist/exports/client/index.js.map +4 -4
- package/dist/fields/ConfirmPassword/index.d.ts +4 -0
- package/dist/fields/ConfirmPassword/index.d.ts.map +1 -1
- package/dist/fields/ConfirmPassword/index.js +37 -33
- package/dist/fields/ConfirmPassword/index.js.map +1 -1
- package/dist/fields/Number/Input.d.ts.map +1 -1
- package/dist/fields/Number/Input.js +29 -25
- package/dist/fields/Number/Input.js.map +1 -1
- package/dist/fields/Number/types.d.ts +4 -0
- package/dist/fields/Number/types.d.ts.map +1 -1
- package/dist/fields/Number/types.js.map +1 -1
- package/dist/fields/Password/input.d.ts.map +1 -1
- package/dist/fields/Password/input.js +33 -29
- package/dist/fields/Password/input.js.map +1 -1
- package/dist/fields/Password/types.d.ts +4 -0
- package/dist/fields/Password/types.d.ts.map +1 -1
- package/dist/fields/Password/types.js.map +1 -1
- package/dist/fields/Relationship/Input.d.ts.map +1 -1
- package/dist/fields/Relationship/Input.js +2 -0
- package/dist/fields/Relationship/Input.js.map +1 -1
- package/dist/fields/Relationship/types.d.ts +4 -0
- package/dist/fields/Relationship/types.d.ts.map +1 -1
- package/dist/fields/Relationship/types.js.map +1 -1
- package/dist/fields/Select/Input.d.ts +4 -0
- package/dist/fields/Select/Input.d.ts.map +1 -1
- package/dist/fields/Select/Input.js +44 -40
- package/dist/fields/Select/Input.js.map +1 -1
- package/dist/fields/Text/Input.d.ts.map +1 -1
- package/dist/fields/Text/Input.js +25 -21
- package/dist/fields/Text/Input.js.map +1 -1
- package/dist/fields/Text/types.d.ts +4 -0
- package/dist/fields/Text/types.d.ts.map +1 -1
- package/dist/fields/Text/types.js.map +1 -1
- package/dist/fields/Textarea/Input.d.ts.map +1 -1
- package/dist/fields/Textarea/Input.js +27 -23
- package/dist/fields/Textarea/Input.js.map +1 -1
- package/dist/fields/Textarea/index.css +1 -1
- package/dist/fields/Textarea/types.d.ts +4 -0
- package/dist/fields/Textarea/types.d.ts.map +1 -1
- package/dist/fields/Textarea/types.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -5
- package/dist/elements/Hierarchy/Drawer/fetchAncestorPath.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/fetchAncestorPath.js.map +0 -1
- package/dist/elements/Hierarchy/Drawer/index.css +0 -90
- package/dist/elements/Hierarchy/Drawer/index.d.ts +0 -20
- package/dist/elements/Hierarchy/Drawer/index.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/index.js.map +0 -1
- package/dist/elements/Hierarchy/Drawer/types.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/types.js.map +0 -1
- package/dist/elements/Hierarchy/Drawer/useHierarchyDrawer.d.ts +0 -30
- package/dist/elements/Hierarchy/Drawer/useHierarchyDrawer.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/useHierarchyDrawer.js.map +0 -1
- /package/dist/elements/Hierarchy/{Drawer → Modal}/fetchAncestorPath.d.ts +0 -0
- /package/dist/elements/Hierarchy/{Drawer → Modal}/fetchAncestorPath.js +0 -0
- /package/dist/elements/Hierarchy/{Drawer → Modal}/types.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/ui",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.6",
|
|
4
4
|
"homepage": "https://payloadcms.com",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"ts-essentials": "10.0.3",
|
|
244
244
|
"use-context-selector": "2.0.0",
|
|
245
245
|
"uuid": "14.0.0",
|
|
246
|
-
"@payloadcms/translations": "4.0.0-canary.
|
|
246
|
+
"@payloadcms/translations": "4.0.0-canary.6"
|
|
247
247
|
},
|
|
248
248
|
"devDependencies": {
|
|
249
249
|
"@babel/cli": "7.27.2",
|
|
@@ -257,13 +257,13 @@
|
|
|
257
257
|
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
|
258
258
|
"esbuild": "0.27.1",
|
|
259
259
|
"esbuild-sass-plugin": "3.3.1",
|
|
260
|
-
"
|
|
261
|
-
"
|
|
260
|
+
"payload": "4.0.0-canary.6",
|
|
261
|
+
"@payloadcms/eslint-config": "3.28.0"
|
|
262
262
|
},
|
|
263
263
|
"peerDependencies": {
|
|
264
264
|
"react": "^19.0.1 || ^19.1.2 || ^19.2.1",
|
|
265
265
|
"react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
|
|
266
|
-
"payload": "4.0.0-canary.
|
|
266
|
+
"payload": "4.0.0-canary.6"
|
|
267
267
|
},
|
|
268
268
|
"engines": {
|
|
269
269
|
"node": ">=24.15.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAncestorPath.d.ts","sourceRoot":"","sources":["../../../../src/elements/Hierarchy/Drawer/fetchAncestorPath.ts"],"names":[],"mappings":"AAGA,KAAK,qBAAqB,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAID;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,GAAG,EACH,cAAc,EACd,MAAM,EACN,eAAe,EACf,SAAS,GACV,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CA+CtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAncestorPath.js","names":["formatAdminURL","qs","MAX_HIERARCHY_DEPTH","fetchAncestorPath","api","collectionSlug","itemId","parentFieldName","serverURL","queryString","stringify","depth","limit","select","where","id","equals","addQueryPrefix","url","apiRoute","path","response","fetch","credentials","ok","data","json","doc","docs","current","undefined","parentId","unshift"],"sources":["../../../../src/elements/Hierarchy/Drawer/fetchAncestorPath.ts"],"sourcesContent":["import { formatAdminURL } from 'payload/shared'\nimport * as qs from 'qs-esm'\n\ntype FetchAncestorPathArgs = {\n api: string\n collectionSlug: string\n itemId: number | string\n parentFieldName: string\n serverURL: string\n}\n\nconst MAX_HIERARCHY_DEPTH = 20\n\n/**\n * Fetches the ancestor path for an item using a single API call with depth.\n * Returns array of ancestor IDs from root to item's parent.\n * Example: item at level 3 returns [grandparentId, parentId]\n */\nexport async function fetchAncestorPath({\n api,\n collectionSlug,\n itemId,\n parentFieldName,\n serverURL,\n}: FetchAncestorPathArgs): Promise<(number | string)[]> {\n const queryString = qs.stringify(\n {\n depth: MAX_HIERARCHY_DEPTH,\n limit: 1,\n select: { [parentFieldName]: true },\n where: { id: { equals: itemId } },\n },\n { addQueryPrefix: true },\n )\n\n const url = formatAdminURL({\n apiRoute: api,\n path: `/${collectionSlug}${queryString}`,\n serverURL,\n })\n\n const response = await fetch(url, { credentials: 'include' })\n\n if (!response.ok) {\n return []\n }\n\n const data = await response.json()\n const doc = data.docs?.[0]\n\n if (!doc) {\n return []\n }\n\n // Walk the nested parent chain to build path from root to immediate parent\n const path: (number | string)[] = []\n let current = doc[parentFieldName]\n\n while (current !== null && current !== undefined) {\n // Parent could be an ID (number/string) or a populated object\n const parentId = typeof current === 'object' ? current.id : current\n\n if (parentId !== null && parentId !== undefined) {\n path.unshift(parentId)\n }\n\n // Move to next parent (only if current is populated object)\n current = typeof current === 'object' ? current[parentFieldName] : null\n }\n\n return path\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ;AAC/B,YAAYC,EAAA,MAAQ;AAUpB,MAAMC,mBAAA,GAAsB;AAE5B;;;;;AAKA,OAAO,eAAeC,kBAAkB;EACtCC,GAAG;EACHC,cAAc;EACdC,MAAM;EACNC,eAAe;EACfC;AAAS,CACa;EACtB,MAAMC,WAAA,GAAcR,EAAA,CAAGS,SAAS,CAC9B;IACEC,KAAA,EAAOT,mBAAA;IACPU,KAAA,EAAO;IACPC,MAAA,EAAQ;MAAE,CAACN,eAAA,GAAkB;IAAK;IAClCO,KAAA,EAAO;MAAEC,EAAA,EAAI;QAAEC,MAAA,EAAQV;MAAO;IAAE;EAClC,GACA;IAAEW,cAAA,EAAgB;EAAK;EAGzB,MAAMC,GAAA,GAAMlB,cAAA,CAAe;IACzBmB,QAAA,EAAUf,GAAA;IACVgB,IAAA,EAAM,IAAIf,cAAA,GAAiBI,WAAA,EAAa;IACxCD;EACF;EAEA,MAAMa,QAAA,GAAW,MAAMC,KAAA,CAAMJ,GAAA,EAAK;IAAEK,WAAA,EAAa;EAAU;EAE3D,IAAI,CAACF,QAAA,CAASG,EAAE,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAMC,IAAA,GAAO,MAAMJ,QAAA,CAASK,IAAI;EAChC,MAAMC,GAAA,GAAMF,IAAA,CAAKG,IAAI,GAAG,EAAE;EAE1B,IAAI,CAACD,GAAA,EAAK;IACR,OAAO,EAAE;EACX;EAEA;EACA,MAAMP,IAAA,GAA4B,EAAE;EACpC,IAAIS,OAAA,GAAUF,GAAG,CAACpB,eAAA,CAAgB;EAElC,OAAOsB,OAAA,KAAY,QAAQA,OAAA,KAAYC,SAAA,EAAW;IAChD;IACA,MAAMC,QAAA,GAAW,OAAOF,OAAA,KAAY,WAAWA,OAAA,CAAQd,EAAE,GAAGc,OAAA;IAE5D,IAAIE,QAAA,KAAa,QAAQA,QAAA,KAAaD,SAAA,EAAW;MAC/CV,IAAA,CAAKY,OAAO,CAACD,QAAA;IACf;IAEA;IACAF,OAAA,GAAU,OAAOA,OAAA,KAAY,WAAWA,OAAO,CAACtB,eAAA,CAAgB,GAAG;EACrE;EAEA,OAAOa,IAAA;AACT","ignoreList":[]}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
@layer payload-default {
|
|
2
|
-
.dialog.hierarchy-drawer {
|
|
3
|
-
width: min(900px, calc(100vw - var(--spacer-6)));
|
|
4
|
-
height: min(700px, calc(100vh - var(--spacer-6)));
|
|
5
|
-
max-width: calc(100vw - var(--spacer-6));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.hierarchy-drawer__content {
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
background: var(--color-bg);
|
|
13
|
-
border-radius: var(--radius-large);
|
|
14
|
-
overflow: clip;
|
|
15
|
-
|
|
16
|
-
.drawer-action-header {
|
|
17
|
-
padding: var(--spacer-2) var(--spacer-3);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.hierarchy-drawer__subheader {
|
|
22
|
-
display: flex;
|
|
23
|
-
justify-content: space-between;
|
|
24
|
-
align-items: center;
|
|
25
|
-
padding: var(--spacer-2) var(--spacer-2-5);
|
|
26
|
-
border-bottom: var(--stroke-width-small) solid var(--color-border);
|
|
27
|
-
flex-shrink: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.hierarchy-drawer__subheader-left {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
gap: var(--spacer-2);
|
|
34
|
-
font-weight: 500;
|
|
35
|
-
color: var(--color-text);
|
|
36
|
-
|
|
37
|
-
svg {
|
|
38
|
-
width: var(--spacer-3);
|
|
39
|
-
height: var(--spacer-3);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.hierarchy-drawer__subheader-right {
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
gap: var(--spacer-2);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.hierarchy-drawer__selection-info {
|
|
50
|
-
color: var(--color-text-secondary);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.hierarchy-drawer__clear-all {
|
|
54
|
-
color: var(--color-text-secondary);
|
|
55
|
-
text-decoration: underline;
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
background: none;
|
|
58
|
-
border: none;
|
|
59
|
-
padding: 0;
|
|
60
|
-
font-size: inherit;
|
|
61
|
-
|
|
62
|
-
&:hover {
|
|
63
|
-
color: var(--color-text);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.hierarchy-drawer__move-to-root {
|
|
68
|
-
background: none;
|
|
69
|
-
border: none;
|
|
70
|
-
color: var(--color-text-secondary);
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
font-size: inherit;
|
|
73
|
-
padding: 0;
|
|
74
|
-
text-decoration: underline;
|
|
75
|
-
|
|
76
|
-
&:hover {
|
|
77
|
-
color: var(--color-text);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.hierarchy-drawer__columns {
|
|
82
|
-
flex: 1;
|
|
83
|
-
overflow: hidden;
|
|
84
|
-
display: flex;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.hierarchy-drawer__toggler {
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { HierarchyColumnBrowserRef } from '../ColumnBrowser/index.js';
|
|
3
|
-
import type { HierarchyDrawerInternalProps } from './types.js';
|
|
4
|
-
import './index.css';
|
|
5
|
-
export declare const baseClass = "hierarchy-drawer";
|
|
6
|
-
type HierarchyDrawerContentProps = {
|
|
7
|
-
columnBrowserRef?: React.RefObject<HierarchyColumnBrowserRef | null>;
|
|
8
|
-
onCreateNew?: (params: {
|
|
9
|
-
parentId: null | number | string;
|
|
10
|
-
}) => void;
|
|
11
|
-
} & HierarchyDrawerInternalProps;
|
|
12
|
-
export type HierarchyDrawerContentRef = {
|
|
13
|
-
selectItem: (id: number | string) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare const HierarchyDrawerContent: ({ baseFilter, closeDrawer, columnBrowserRef, disabledIds, filterByCollection, hasMany, hierarchyCollectionSlug, Icon, initialSelections, onCreateNew, onMoveToRoot, onSave, parentFieldName, ref, showMoveToRoot, useAsTitle, }: {
|
|
16
|
-
ref?: React.RefObject<HierarchyDrawerContentRef | null>;
|
|
17
|
-
} & HierarchyDrawerContentProps) => React.JSX.Element;
|
|
18
|
-
export declare const HierarchyDrawer: React.FC<HierarchyDrawerInternalProps>;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/Hierarchy/Drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAAK,EAAE,4BAA4B,EAAqB,MAAM,YAAY,CAAA;AAajF,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,SAAS,qBAAqB,CAAA;AAE3C,KAAK,2BAA2B,GAAG;IACjC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IACpE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACrE,GAAG,4BAA4B,CAAA;AAEhC,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAmC,iOAiBnE;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;CAAE,GAAG,2BAA2B,sBAwL3F,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CA8FlE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getTranslation","React","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","useEffectEvent","TagIcon","useConfig","useHierarchy","useTranslation","DialogModal","useDocumentDrawer","DrawerDepthProvider","DrawerActionHeader","HierarchyColumnBrowser","fetchAncestorPath","baseClass","HierarchyDrawerContent","baseFilter","closeDrawer","columnBrowserRef","disabledIds","filterByCollection","hasMany","hierarchyCollectionSlug","Icon","initialSelections","onCreateNew","onMoveToRoot","onSave","parentFieldName","ref","showMoveToRoot","useAsTitle","i18n","t","config","routes","api","serverURL","getEntityConfig","collectionConfig","collectionSlug","collectionLabel","labels","plural","parentFieldName_internal","hierarchy","initialExpandedPath","setInitialExpandedPath","isLoadingPath","setIsLoadingPath","Boolean","length","hasLoadedPathRef","firstSelection","loadAncestorPath","itemId","path","current","selections","setSelections","map","Map","id","set","selectedIds","Set","keys","ancestorsWithSelections","handleCancel","handleSave","handleSelect","prev","next","has","delete","clear","handleClearAll","selectItem","selectionCount","size","_jsxs","className","_jsx","onCancel","saveLabel","title","label","onClick","type","_Fragment","onSelect","HierarchyDrawer","props","drawerSlug","refreshTree","createParentId","setCreateParentId","drawerContentRef","documentDrawerKey","setDocumentDrawerKey","documentDrawerSlug","DocumentDrawer","closeDocumentDrawer","openDrawer","openDocumentDrawer","handleCreateNew","parentId","setTimeout","handleDocumentSave","doc","undefined","refreshColumn","drawerContent","closeOnBlur","slug","initialData"],"sources":["../../../../src/elements/Hierarchy/Drawer/index.tsx"],"sourcesContent":["'use client'\nimport { getTranslation } from '@payloadcms/translations'\nimport React, {\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\nimport type { HierarchyColumnBrowserRef } from '../ColumnBrowser/index.js'\nimport type { HierarchyDrawerInternalProps, SelectionWithPath } from './types.js'\n\nimport { useEffectEvent } from '../../../hooks/useEffectEvent.js'\nimport { TagIcon } from '../../../icons/Tag/index.js'\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useHierarchy } from '../../../providers/Hierarchy/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { DialogModal } from '../../Dialog/index.js'\nimport { useDocumentDrawer } from '../../DocumentDrawer/index.js'\nimport { DrawerDepthProvider } from '../../Drawer/index.js'\nimport { DrawerActionHeader } from '../../DrawerActionHeader/index.js'\nimport { HierarchyColumnBrowser } from '../ColumnBrowser/index.js'\nimport { fetchAncestorPath } from './fetchAncestorPath.js'\nimport './index.css'\n\nexport const baseClass = 'hierarchy-drawer'\n\ntype HierarchyDrawerContentProps = {\n columnBrowserRef?: React.RefObject<HierarchyColumnBrowserRef | null>\n onCreateNew?: (params: { parentId: null | number | string }) => void\n} & HierarchyDrawerInternalProps\n\nexport type HierarchyDrawerContentRef = {\n selectItem: (id: number | string) => void\n}\n\nexport const HierarchyDrawerContent = function HierarchyDrawerContent({\n baseFilter,\n closeDrawer,\n columnBrowserRef,\n disabledIds,\n filterByCollection,\n hasMany = false,\n hierarchyCollectionSlug,\n Icon,\n initialSelections,\n onCreateNew,\n onMoveToRoot,\n onSave,\n parentFieldName,\n ref,\n showMoveToRoot,\n useAsTitle,\n}: { ref?: React.RefObject<HierarchyDrawerContentRef | null> } & HierarchyDrawerContentProps) {\n const { i18n, t } = useTranslation()\n // NOTE: Do NOT use useModal() here - it causes re-renders when any modal state changes\n // Use closeDrawer prop instead which already handles closing the modal\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const collectionConfig = getEntityConfig({ collectionSlug: hierarchyCollectionSlug })\n const collectionLabel = collectionConfig\n ? getTranslation(collectionConfig.labels?.plural || hierarchyCollectionSlug, i18n)\n : hierarchyCollectionSlug\n\n const parentFieldName_internal =\n collectionConfig?.hierarchy && typeof collectionConfig.hierarchy === 'object'\n ? collectionConfig.hierarchy.parentFieldName\n : parentFieldName\n\n const [initialExpandedPath, setInitialExpandedPath] = useState<(number | string)[] | undefined>()\n const [isLoadingPath, setIsLoadingPath] = useState(Boolean(initialSelections?.length))\n const hasLoadedPathRef = React.useRef(false)\n const firstSelection = initialSelections?.[0]\n\n const loadAncestorPath = useEffectEvent(async (itemId?: number | string) => {\n if (!itemId) {\n setIsLoadingPath(false)\n return\n }\n\n try {\n const path = await fetchAncestorPath({\n api,\n collectionSlug: hierarchyCollectionSlug,\n itemId,\n parentFieldName: parentFieldName_internal,\n serverURL,\n })\n setInitialExpandedPath(path)\n } catch {\n // Silently handle fetch errors - will just start at root\n } finally {\n setIsLoadingPath(false)\n }\n })\n\n // Load ancestor path on mount\n useEffect(() => {\n if (hasLoadedPathRef.current) {\n return\n }\n hasLoadedPathRef.current = true\n void loadAncestorPath(firstSelection)\n }, [firstSelection])\n\n const [selections, setSelections] = useState<Map<number | string, SelectionWithPath>>(() => {\n const map = new Map<number | string, SelectionWithPath>()\n\n if (initialSelections) {\n for (const id of initialSelections) {\n map.set(id, { id, path: [] })\n }\n }\n\n return map\n })\n\n const selectedIds = useMemo(() => new Set(selections.keys()), [selections])\n\n // For now, ancestorsWithSelections is empty - will be computed when we have path tracking\n const ancestorsWithSelections = useMemo(() => new Set<number | string>(), [])\n\n const handleCancel = useCallback(() => {\n closeDrawer()\n }, [closeDrawer])\n\n const handleSave = useCallback(() => {\n onSave({ closeDrawer, selections })\n }, [onSave, selections, closeDrawer])\n\n const handleSelect = useCallback(\n ({\n id,\n path,\n }: {\n id: number | string\n path: Array<{ id: number | string; title: string }>\n }) => {\n setSelections((prev) => {\n const next = new Map(prev)\n\n if (next.has(id)) {\n next.delete(id)\n } else {\n if (!hasMany) {\n // Single select: clear previous selections\n next.clear()\n }\n next.set(id, { id, path })\n }\n\n return next\n })\n },\n [hasMany],\n )\n\n const handleClearAll = useCallback(() => {\n setSelections(new Map())\n }, [])\n\n // Expose selectItem for programmatic selection (e.g., after creating a new item)\n useImperativeHandle(\n ref,\n () => ({\n selectItem: (id: number | string) => {\n setSelections((prev) => {\n const next = new Map(prev)\n if (!hasMany) {\n next.clear()\n }\n // Path will be empty for newly created items - could be enhanced later\n next.set(id, { id, path: [] })\n return next\n })\n },\n }),\n [hasMany],\n )\n\n const selectionCount = selections.size\n\n return (\n <div className={`${baseClass}__content`}>\n <DrawerActionHeader\n onCancel={handleCancel}\n onSave={handleSave}\n saveLabel={t('general:select')}\n title={t('general:selectValue', { label: collectionLabel })}\n />\n <div className={`${baseClass}__subheader`}>\n <div className={`${baseClass}__subheader-left`}>\n {Icon || <TagIcon />}\n <h4>{collectionLabel}</h4>\n </div>\n <div className={`${baseClass}__subheader-right`}>\n {showMoveToRoot && onMoveToRoot && (\n <button className={`${baseClass}__move-to-root`} onClick={onMoveToRoot} type=\"button\">\n {t('hierarchy:moveToRoot')}\n </button>\n )}\n {selectionCount > 0 && (\n <>\n <span className={`${baseClass}__selection-info`}>{selectionCount} selected</span>\n <span>—</span>\n <button className={`${baseClass}__clear-all`} onClick={handleClearAll} type=\"button\">\n {t('general:clearAll')}\n </button>\n </>\n )}\n </div>\n </div>\n <div className={`${baseClass}__columns`}>\n <HierarchyColumnBrowser\n ancestorsWithSelections={ancestorsWithSelections}\n baseFilter={baseFilter}\n disabledIds={disabledIds}\n filterByCollection={filterByCollection}\n hierarchyCollectionSlug={hierarchyCollectionSlug}\n initialExpandedPath={initialExpandedPath}\n isLoadingPath={isLoadingPath}\n onCreateNew={onCreateNew}\n onSelect={handleSelect}\n parentFieldName={parentFieldName}\n ref={columnBrowserRef}\n selectedIds={selectedIds}\n useAsTitle={useAsTitle}\n />\n </div>\n </div>\n )\n}\n\nexport const HierarchyDrawer: React.FC<HierarchyDrawerInternalProps> = (props) => {\n const { drawerSlug, hierarchyCollectionSlug, parentFieldName } = props\n\n const { refreshTree } = useHierarchy()\n\n // Get parentFieldName from hierarchy config\n const { getEntityConfig } = useConfig()\n const collectionConfig = getEntityConfig({ collectionSlug: hierarchyCollectionSlug })\n const parentFieldName_internal =\n collectionConfig?.hierarchy && typeof collectionConfig.hierarchy === 'object'\n ? collectionConfig.hierarchy.parentFieldName\n : parentFieldName\n\n // Track which parentId is being used for the document drawer - use state to trigger re-render\n const [createParentId, setCreateParentId] = useState<null | number | string>(null)\n\n // Ref to access column browser's refresh function\n const columnBrowserRef = useRef<HierarchyColumnBrowserRef | null>(null)\n\n // Ref to access drawer content's selectItem function\n const drawerContentRef = useRef<HierarchyDrawerContentRef | null>(null)\n\n // Key for DocumentDrawer to force remount when parentId changes\n const [documentDrawerKey, setDocumentDrawerKey] = useState(0)\n\n // Stable drawer slug for the document drawer - must not change on remount\n const documentDrawerSlug = `${drawerSlug}-create-doc`\n\n // Document drawer for creating new items - rendered OUTSIDE the Drawer to avoid nested modal issues\n const [DocumentDrawer, , { closeDrawer: closeDocumentDrawer, openDrawer: openDocumentDrawer }] =\n useDocumentDrawer({\n collectionSlug: hierarchyCollectionSlug,\n drawerSlug: documentDrawerSlug,\n })\n\n const handleCreateNew = useCallback(\n ({ parentId }: { parentId: null | number | string }) => {\n // Increment key to force DocumentDrawer remount with new initialData\n setDocumentDrawerKey((prev) => prev + 1)\n setCreateParentId(parentId)\n // Use setTimeout to ensure state update triggers re-render before opening drawer\n setTimeout(() => {\n openDocumentDrawer()\n }, 0)\n },\n [openDocumentDrawer],\n )\n\n // Refresh the column, select the new item, and close the document drawer after creation\n const handleDocumentSave = useCallback<\n NonNullable<React.ComponentProps<typeof DocumentDrawer>['onSave']>\n >(\n ({ doc }) => {\n if (columnBrowserRef.current && createParentId !== undefined) {\n void columnBrowserRef.current.refreshColumn(createParentId)\n }\n if (drawerContentRef.current && doc?.id) {\n drawerContentRef.current.selectItem(doc.id)\n }\n refreshTree(hierarchyCollectionSlug)\n closeDocumentDrawer()\n },\n [closeDocumentDrawer, createParentId, hierarchyCollectionSlug, refreshTree],\n )\n\n // Memoize the content - only depends on stable values\n const drawerContent = useMemo(\n () => (\n <HierarchyDrawerContent\n {...props}\n columnBrowserRef={columnBrowserRef}\n onCreateNew={handleCreateNew}\n ref={drawerContentRef}\n />\n ),\n [handleCreateNew, props],\n )\n\n return (\n <>\n <DialogModal className={baseClass} closeOnBlur size=\"large\" slug={drawerSlug}>\n {drawerContent}\n </DialogModal>\n <DrawerDepthProvider>\n <DocumentDrawer\n initialData={\n createParentId !== null ? { [parentFieldName_internal]: createParentId } : undefined\n }\n key={documentDrawerKey}\n onSave={handleDocumentSave}\n />\n </DrawerDepthProvider>\n </>\n )\n}\n"],"mappings":"AAAA;;;AACA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IACLC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH;AAKP,SAASC,cAAc,QAAQ;AAC/B,SAASC,OAAO,QAAQ;AACxB,SAASC,SAAS,QAAQ;AAC1B,SAASC,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,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/elements/Hierarchy/Drawer/types.ts"],"sourcesContent":["import type { Where } from 'payload'\nimport type React from 'react'\nimport type { HTMLAttributes } from 'react'\n\nexport type SelectionWithPath = {\n id: number | string\n path: Array<{ id: number | string; title: string }>\n}\n\nexport type UseHierarchyDrawerArgs = {\n /** IDs that should be disabled (e.g., items being moved can't be selected as destination) */\n disabledIds?: Set<number | string>\n /**\n * When provided, filters hierarchy items to only show those that accept these collections.\n * Used with collectionSpecific hierarchy config.\n */\n filterByCollection?: string[]\n hierarchyCollectionSlug: string\n Icon?: React.ReactNode\n}\n\nexport type HierarchyDrawerProps = {\n readonly hasMany?: boolean\n readonly initialSelections?: (number | string)[]\n readonly onMoveToRoot?: () => void\n readonly onSave: (params: {\n closeDrawer: () => void\n selections: Map<number | string, SelectionWithPath>\n }) => void\n readonly showMoveToRoot?: boolean\n}\n\nexport type HierarchyDrawerInternalProps = {\n /** Base filter constraint (e.g., tenant filter) to apply to all queries */\n readonly baseFilter?: null | Where\n readonly closeDrawer: () => void\n /** IDs that should be disabled (e.g., items being moved can't be selected as destination) */\n readonly disabledIds?: Set<number | string>\n readonly drawerSlug: string\n /**\n * When provided, filters hierarchy items to only show those that accept these collections.\n * Used with collectionSpecific hierarchy config.\n */\n readonly filterByCollection?: string[]\n readonly hierarchyCollectionSlug: string\n readonly Icon?: React.ReactNode\n readonly parentFieldName: string\n readonly useAsTitle?: string\n} & HierarchyDrawerProps\n\nexport type HierarchyDrawerTogglerProps = {\n children?: React.ReactNode\n className?: string\n disabled?: boolean\n drawerSlug?: string\n} & HTMLAttributes<HTMLButtonElement>\n\nexport type UseHierarchyDrawer = (args: UseHierarchyDrawerArgs) => [\n React.FC<HierarchyDrawerProps>,\n React.FC<Omit<HierarchyDrawerTogglerProps, 'drawerSlug'>>,\n {\n closeDrawer: () => void\n drawerDepth: number\n drawerSlug: string\n isDrawerOpen: boolean\n openDrawer: () => void\n toggleDrawer: () => void\n },\n]\n\n// Re-export column browser types for backwards compatibility\nexport type { ColumnItemData } from '../ColumnBrowser/types.js'\n"],"mappings":"AAsEA;AACA","ignoreList":[]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { HierarchyDrawerTogglerProps, UseHierarchyDrawer } from './types.js';
|
|
3
|
-
export * from './types.js';
|
|
4
|
-
export declare const formatHierarchyDrawerSlug: ({ depth, uuid, }: {
|
|
5
|
-
depth: number;
|
|
6
|
-
uuid: string;
|
|
7
|
-
}) => string;
|
|
8
|
-
export declare const HierarchyDrawerToggler: React.FC<HierarchyDrawerTogglerProps>;
|
|
9
|
-
/**
|
|
10
|
-
* Hook for using a hierarchy drawer for selecting hierarchy items.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* const [HierarchyDrawer, HierarchyDrawerToggler, { closeDrawer, openDrawer }] = useHierarchyDrawer({
|
|
15
|
-
* collectionSlug: 'categories',
|
|
16
|
-
* })
|
|
17
|
-
*
|
|
18
|
-
* return (
|
|
19
|
-
* <>
|
|
20
|
-
* <HierarchyDrawer
|
|
21
|
-
* onSave={(selections) => console.log(selections)}
|
|
22
|
-
* hasMany={true}
|
|
23
|
-
* />
|
|
24
|
-
* <HierarchyDrawerToggler>Select Categories</HierarchyDrawerToggler>
|
|
25
|
-
* </>
|
|
26
|
-
* )
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare const useHierarchyDrawer: UseHierarchyDrawer;
|
|
30
|
-
//# sourceMappingURL=useHierarchyDrawer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHierarchyDrawer.d.ts","sourceRoot":"","sources":["../../../../src/elements/Hierarchy/Drawer/useHierarchyDrawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8C,MAAM,OAAO,CAAA;AAElE,OAAO,KAAK,EAEV,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,YAAY,CAAA;AAEnB,cAAc,YAAY,CAAA;AAQ1B,eAAO,MAAM,yBAAyB,GAAI,kBAGvC;IACD,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb,KAAG,MAA6C,CAAA;AAEjD,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAmBxE,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAiHhC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHierarchyDrawer.js","names":["useModal","React","useCallback","useId","useMemo","useRef","useConfig","useEditDepth","useHierarchy","DrawerToggler","baseClass","HierarchyDrawer","formatHierarchyDrawerSlug","depth","uuid","HierarchyDrawerToggler","children","className","disabled","drawerSlug","onClick","rest","_jsx","filter","Boolean","join","slug","useHierarchyDrawer","disabledIds","filterByCollection","filterByCollectionProp","hierarchyCollectionSlug","Icon","getEntityConfig","allowedCollections","baseFilter","collectionConfig","collectionSlug","useAsTitle","admin","hierarchyConfig","hierarchy","undefined","parentFieldName","map","c","drawerDepth","closeModal","openModal","toggleModal","closeModalRef","openModalRef","toggleModalRef","current","toggleDrawer","closeDrawer","openDrawer","MemoizedDrawer","DrawerComponent","props","_createElement","key","MemoizedDrawerToggler","TogglerComponent","MemoizedDrawerState","isDrawerOpen"],"sources":["../../../../src/elements/Hierarchy/Drawer/useHierarchyDrawer.tsx"],"sourcesContent":["'use client'\nimport { useModal } from '@faceless-ui/modal'\nimport React, { useCallback, useId, useMemo, useRef } from 'react'\n\nimport type {\n HierarchyDrawerProps,\n HierarchyDrawerTogglerProps,\n UseHierarchyDrawer,\n} from './types.js'\n\nexport * from './types.js'\n\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useEditDepth } from '../../../providers/EditDepth/index.js'\nimport { useHierarchy } from '../../../providers/Hierarchy/index.js'\nimport { DrawerToggler } from '../../Drawer/index.js'\nimport { baseClass, HierarchyDrawer } from './index.js'\n\nexport const formatHierarchyDrawerSlug = ({\n depth,\n uuid,\n}: {\n depth: number\n uuid: string\n}): string => `hierarchy-drawer_${depth}_${uuid}`\n\nexport const HierarchyDrawerToggler: React.FC<HierarchyDrawerTogglerProps> = ({\n children,\n className,\n disabled,\n drawerSlug,\n onClick,\n ...rest\n}) => {\n return (\n <DrawerToggler\n className={[className, `${baseClass}__toggler`].filter(Boolean).join(' ')}\n disabled={disabled}\n onClick={onClick}\n slug={drawerSlug}\n {...rest}\n >\n {children}\n </DrawerToggler>\n )\n}\n\n/**\n * Hook for using a hierarchy drawer for selecting hierarchy items.\n *\n * @example\n * ```tsx\n * const [HierarchyDrawer, HierarchyDrawerToggler, { closeDrawer, openDrawer }] = useHierarchyDrawer({\n * collectionSlug: 'categories',\n * })\n *\n * return (\n * <>\n * <HierarchyDrawer\n * onSave={(selections) => console.log(selections)}\n * hasMany={true}\n * />\n * <HierarchyDrawerToggler>Select Categories</HierarchyDrawerToggler>\n * </>\n * )\n * ```\n */\nexport const useHierarchyDrawer: UseHierarchyDrawer = ({\n disabledIds,\n filterByCollection: filterByCollectionProp,\n hierarchyCollectionSlug,\n Icon,\n}) => {\n const { getEntityConfig } = useConfig()\n const { allowedCollections, baseFilter } = useHierarchy()\n const collectionConfig = getEntityConfig({ collectionSlug: hierarchyCollectionSlug })\n\n const useAsTitle = collectionConfig?.admin?.useAsTitle\n const hierarchyConfig =\n collectionConfig?.hierarchy && typeof collectionConfig.hierarchy === 'object'\n ? collectionConfig.hierarchy\n : undefined\n const parentFieldName = hierarchyConfig?.parentFieldName\n\n // Use explicit prop if provided, otherwise fall back to allowedCollections from context\n // - allowedCollections is null/undefined: no filtering (undefined)\n // - allowedCollections is []: folder accepts everything, show only unrestricted destinations ([])\n // - allowedCollections has values: show folders accepting those types\n // Memoize to prevent new array references on every render\n const filterByCollection = useMemo(() => {\n if (filterByCollectionProp !== undefined) {\n return filterByCollectionProp\n }\n return allowedCollections !== null ? allowedCollections.map((c) => c.slug) : undefined\n }, [filterByCollectionProp, allowedCollections])\n\n const drawerDepth = useEditDepth()\n const uuid = useId()\n const { closeModal, openModal, toggleModal } = useModal()\n\n const drawerSlug = formatHierarchyDrawerSlug({\n depth: drawerDepth,\n uuid,\n })\n\n // Store modal functions in refs to ensure stable callbacks\n // This prevents re-renders when other modals (like DocumentDrawer) change state\n const closeModalRef = useRef(closeModal)\n const openModalRef = useRef(openModal)\n const toggleModalRef = useRef(toggleModal)\n closeModalRef.current = closeModal\n openModalRef.current = openModal\n toggleModalRef.current = toggleModal\n\n // Stable callbacks using refs - these will NEVER change\n const toggleDrawer = useCallback(() => {\n toggleModalRef.current(drawerSlug)\n }, [drawerSlug])\n\n const closeDrawer = useCallback(() => {\n closeModalRef.current(drawerSlug)\n }, [drawerSlug])\n\n const openDrawer = useCallback(() => {\n openModalRef.current(drawerSlug)\n }, [drawerSlug])\n\n const MemoizedDrawer = useMemo(() => {\n const DrawerComponent: React.FC<HierarchyDrawerProps> = (props) => (\n <HierarchyDrawer\n {...props}\n baseFilter={baseFilter}\n closeDrawer={closeDrawer}\n disabledIds={disabledIds}\n drawerSlug={drawerSlug}\n filterByCollection={filterByCollection}\n hierarchyCollectionSlug={hierarchyCollectionSlug}\n Icon={Icon}\n key={drawerSlug}\n parentFieldName={parentFieldName}\n useAsTitle={useAsTitle}\n />\n )\n\n return DrawerComponent\n }, [\n baseFilter,\n drawerSlug,\n closeDrawer,\n disabledIds,\n filterByCollection,\n Icon,\n parentFieldName,\n hierarchyCollectionSlug,\n useAsTitle,\n ])\n\n const MemoizedDrawerToggler = useMemo(() => {\n const TogglerComponent: React.FC<Omit<HierarchyDrawerTogglerProps, 'drawerSlug'>> = (props) => (\n <HierarchyDrawerToggler {...props} drawerSlug={drawerSlug} />\n )\n\n return TogglerComponent\n }, [drawerSlug])\n\n const MemoizedDrawerState = useMemo(\n () => ({\n closeDrawer,\n drawerDepth,\n drawerSlug,\n // Note: Not tracking isDrawerOpen to prevent re-renders when other modals change state\n // Consumers needing this can use useModal() directly\n isDrawerOpen: false,\n openDrawer,\n toggleDrawer,\n }),\n [drawerDepth, drawerSlug, toggleDrawer, closeDrawer, openDrawer],\n )\n\n return [MemoizedDrawer, MemoizedDrawerToggler, MemoizedDrawerState]\n}\n"],"mappings":"AAAA;;;;AACA,SAASA,QAAQ,QAAQ;AACzB,OAAOC,KAAA,IAASC,WAAW,EAAEC,KAAK,EAAEC,OAAO,EAAEC,MAAM,QAAQ;AAQ3D,cAAc;AAEd,SAASC,SAAS,QAAQ;AAC1B,SAASC,YAAY,QAAQ;AAC7B,SAASC,YAAY,QAAQ;AAC7B,SAASC,aAAa,QAAQ;AAC9B,SAASC,SAAS,EAAEC,eAAe,QAAQ;AAE3C,OAAO,MAAMC,yBAAA,GAA4BA,CAAC;EACxCC,KAAK;EACLC;AAAI,CAIL,KAAa,oBAAoBD,KAAA,IAASC,IAAA,EAAM;AAEjD,OAAO,MAAMC,sBAAA,GAAgEA,CAAC;EAC5EC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,UAAU;EACVC,OAAO;EACP,GAAGC;AAAA,CACJ;EACC,oBACEC,IAAA,CAACb,aAAA;IACCQ,SAAA,EAAW,CAACA,SAAA,EAAW,GAAGP,SAAA,WAAoB,CAAC,CAACa,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;IACrEP,QAAA,EAAUA,QAAA;IACVE,OAAA,EAASA,OAAA;IACTM,IAAA,EAAMP,UAAA;IACL,GAAGE,IAAI;cAEPL;;AAGP;AAEA;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMW,kBAAA,GAAyCA,CAAC;EACrDC,WAAW;EACXC,kBAAA,EAAoBC,sBAAsB;EAC1CC,uBAAuB;EACvBC;AAAI,CACL;EACC,MAAM;IAAEC;EAAe,CAAE,GAAG3B,SAAA;EAC5B,MAAM;IAAE4B,kBAAkB;IAAEC;EA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