@dxos/plugin-navtree 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d
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/lib/browser/{app-graph-builder-5J4LRWDX.mjs → app-graph-builder-6JDBQ25U.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-5J4LRWDX.mjs.map → app-graph-builder-6JDBQ25U.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-TZA65AKW.mjs → chunk-SNGLGBFJ.mjs} +211 -170
- package/dist/lib/browser/chunk-SNGLGBFJ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +4 -5
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-3XYN2CBU.mjs → intent-resolver-N35ZIHFD.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-3XYN2CBU.mjs.map → intent-resolver-N35ZIHFD.mjs.map} +3 -3
- package/dist/lib/browser/{keyboard-QRS6WOQH.mjs → keyboard-HMTMA33N.mjs} +1 -1
- package/dist/lib/{node-esm/keyboard-MOZWHFUM.mjs.map → browser/keyboard-HMTMA33N.mjs.map} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-N2HPMYCU.mjs → react-surface-WKWXMM2N.mjs} +2 -2
- package/dist/lib/browser/{react-surface-N2HPMYCU.mjs.map → react-surface-WKWXMM2N.mjs.map} +1 -1
- package/dist/lib/browser/{state-54DY3DOY.mjs → state-P5DGL7KS.mjs} +1 -1
- package/dist/lib/browser/state-P5DGL7KS.mjs.map +7 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.d.ts +2 -2
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +5 -6
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +12 -0
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +2 -2
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.d.ts +5 -5
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +1 -2
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -40
- package/src/NavTreePlugin.tsx +5 -5
- package/src/capabilities/app-graph-builder.ts +2 -2
- package/src/capabilities/intent-resolver.ts +1 -1
- package/src/capabilities/keyboard.ts +2 -2
- package/src/capabilities/react-surface.tsx +1 -1
- package/src/capabilities/state.ts +3 -2
- package/src/components/CommandsDialog/CommandsDialog.tsx +2 -2
- package/src/components/CommandsDialog/CommandsTrigger.tsx +3 -5
- package/src/components/NavTree/NavTree.stories.tsx +3 -3
- package/src/components/NavTree/NavTree.tsx +3 -3
- package/src/components/NavTreeContainer.tsx +39 -16
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +6 -6
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +7 -7
- package/src/components/Sidebar/L0Menu.tsx +2 -2
- package/src/components/Sidebar/L1Panel.tsx +72 -92
- package/src/components/Sidebar/L1Tabs.tsx +58 -0
- package/src/components/Sidebar/index.ts +1 -0
- package/src/components/index.ts +1 -1
- package/src/components/types.ts +3 -2
- package/src/experimental/Tree.stories.tsx +8 -8
- package/src/experimental/Tree.tsx +15 -16
- package/src/testing/app-graph-builder.ts +1 -1
- package/src/translations.ts +1 -0
- package/src/util.ts +2 -20
- package/dist/lib/browser/chunk-TZA65AKW.mjs.map +0 -7
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs.map +0 -7
- package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs +0 -46
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs +0 -1429
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs +0 -18
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs +0 -16
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -150
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs +0 -48
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs.map +0 -7
- package/dist/lib/node-esm/keyboard-MOZWHFUM.mjs +0 -52
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs +0 -52
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs.map +0 -7
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs +0 -118
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs.map +0 -7
|
@@ -4,17 +4,18 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
COMMANDS_DIALOG,
|
|
6
6
|
KEY_BINDING,
|
|
7
|
-
NAVTREE_PLUGIN
|
|
7
|
+
NAVTREE_PLUGIN,
|
|
8
|
+
meta
|
|
8
9
|
} from "./chunk-ERDGQTH5.mjs";
|
|
9
10
|
|
|
10
11
|
// src/components/CommandsDialog/CommandsDialog.tsx
|
|
11
12
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
12
13
|
import React, { useMemo, useState } from "react";
|
|
13
|
-
import {
|
|
14
|
+
import { LayoutAction, createIntent, useAppGraph, useIntentDispatcher } from "@dxos/app-framework";
|
|
14
15
|
import { isAction, isActionGroup } from "@dxos/app-graph";
|
|
15
16
|
import { Keyboard, keySymbols } from "@dxos/keyboard";
|
|
16
17
|
import { useActions } from "@dxos/plugin-graph";
|
|
17
|
-
import { Button, Dialog, Icon,
|
|
18
|
+
import { Button, Dialog, Icon, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
18
19
|
import { SearchList } from "@dxos/react-ui-searchlist";
|
|
19
20
|
import { cardDialogContent, cardDialogHeader, cardDialogPaddedOverflow, cardDialogSearchListRoot } from "@dxos/react-ui-stack";
|
|
20
21
|
import { descriptionText, mx } from "@dxos/react-ui-theme";
|
|
@@ -119,11 +120,9 @@ var CommandsDialogContent = ({ selected: initial }) => {
|
|
|
119
120
|
|
|
120
121
|
// src/components/CommandsDialog/CommandsTrigger.tsx
|
|
121
122
|
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
122
|
-
import { MagnifyingGlass } from "@phosphor-icons/react";
|
|
123
123
|
import React2 from "react";
|
|
124
|
-
import {
|
|
125
|
-
import { Button as Button2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
126
|
-
import { getSize } from "@dxos/react-ui-theme";
|
|
124
|
+
import { LayoutAction as LayoutAction2, createIntent as createIntent2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
|
|
125
|
+
import { Button as Button2, Icon as Icon2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
127
126
|
var CommandsTrigger = () => {
|
|
128
127
|
var _effect = _useSignals2();
|
|
129
128
|
try {
|
|
@@ -140,8 +139,9 @@ var CommandsTrigger = () => {
|
|
|
140
139
|
}))
|
|
141
140
|
}, /* @__PURE__ */ React2.createElement("span", {
|
|
142
141
|
className: "text-description font-normal grow text-start"
|
|
143
|
-
}, t("command list input placeholder")), /* @__PURE__ */ React2.createElement(
|
|
144
|
-
|
|
142
|
+
}, t("command list input placeholder")), /* @__PURE__ */ React2.createElement(Icon2, {
|
|
143
|
+
icon: "ph--magnifying-glass--regular",
|
|
144
|
+
size: 5
|
|
145
145
|
}));
|
|
146
146
|
} finally {
|
|
147
147
|
_effect.f();
|
|
@@ -149,7 +149,7 @@ var CommandsTrigger = () => {
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
// src/util.ts
|
|
152
|
-
import {
|
|
152
|
+
import { isActionLike } from "@dxos/app-graph";
|
|
153
153
|
import { isNonNullable } from "@dxos/util";
|
|
154
154
|
var getParent = (graph, node, path) => {
|
|
155
155
|
const parentId = path[path.length - 2];
|
|
@@ -199,22 +199,6 @@ var getChildren = (graph, node, path = []) => {
|
|
|
199
199
|
return nextPath.includes(n.id) ? void 0 : n;
|
|
200
200
|
}).filter(isNonNullable);
|
|
201
201
|
};
|
|
202
|
-
var getActions = (graph, node) => {
|
|
203
|
-
return graph.getActions(node.id).reduce((acc, arg) => {
|
|
204
|
-
if (arg.properties.disposition === "item") {
|
|
205
|
-
return acc;
|
|
206
|
-
}
|
|
207
|
-
acc.actions.push(arg);
|
|
208
|
-
if (!isAction2(arg)) {
|
|
209
|
-
const actionGroup = graph.getActions(arg.id);
|
|
210
|
-
acc.groupedActions[arg.id] = actionGroup;
|
|
211
|
-
}
|
|
212
|
-
return acc;
|
|
213
|
-
}, {
|
|
214
|
-
actions: [],
|
|
215
|
-
groupedActions: {}
|
|
216
|
-
});
|
|
217
|
-
};
|
|
218
202
|
var l0ItemType = (item) => {
|
|
219
203
|
if (item.properties.disposition === "collection") {
|
|
220
204
|
return "collection";
|
|
@@ -228,23 +212,31 @@ var l0ItemType = (item) => {
|
|
|
228
212
|
};
|
|
229
213
|
|
|
230
214
|
// src/components/NavTreeContainer.tsx
|
|
231
|
-
import { useSignals as
|
|
215
|
+
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
232
216
|
import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
233
217
|
import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
|
234
218
|
import { untracked } from "@preact/signals-core";
|
|
235
|
-
import
|
|
236
|
-
import {
|
|
237
|
-
import { isAction as
|
|
219
|
+
import React10, { memo as memo2, useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo6 } from "react";
|
|
220
|
+
import { LayoutAction as LayoutAction3, Surface, createIntent as createIntent3, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3, useLayout } from "@dxos/app-framework";
|
|
221
|
+
import { ROOT_ID, isAction as isAction3, isActionLike as isActionLike2 } from "@dxos/app-graph";
|
|
238
222
|
import { PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
|
|
239
|
-
import { useConnections } from "@dxos/plugin-graph";
|
|
223
|
+
import { useConnections, useActions as useGraphActions } from "@dxos/plugin-graph";
|
|
240
224
|
import { useMediaQuery as useMediaQuery2, useSidebars } from "@dxos/react-ui";
|
|
241
225
|
import { isTreeData } from "@dxos/react-ui-list";
|
|
242
|
-
import { mx as
|
|
226
|
+
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
243
227
|
import { arrayMove as arrayMove2, byPosition } from "@dxos/util";
|
|
244
228
|
|
|
229
|
+
// src/capabilities/index.ts
|
|
230
|
+
import { lazy } from "@dxos/app-framework";
|
|
231
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-6JDBQ25U.mjs"));
|
|
232
|
+
var IntentResolver = lazy(() => import("./intent-resolver-N35ZIHFD.mjs"));
|
|
233
|
+
var Keyboard2 = lazy(() => import("./keyboard-HMTMA33N.mjs"));
|
|
234
|
+
var ReactSurface = lazy(() => import("./react-surface-WKWXMM2N.mjs"));
|
|
235
|
+
var State = lazy(() => import("./state-P5DGL7KS.mjs"));
|
|
236
|
+
|
|
245
237
|
// src/components/NavTree/NavTree.tsx
|
|
246
|
-
import { useSignals as
|
|
247
|
-
import
|
|
238
|
+
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
239
|
+
import React9, { useMemo as useMemo5 } from "react";
|
|
248
240
|
import { Tabs as Tabs3 } from "@dxos/react-ui-tabs";
|
|
249
241
|
|
|
250
242
|
// src/hooks.ts
|
|
@@ -295,8 +287,8 @@ import { scrollJustEnoughIntoView } from "@atlaskit/pragmatic-drag-and-drop/elem
|
|
|
295
287
|
import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
296
288
|
import React4, { forwardRef, useCallback, useLayoutEffect, useMemo as useMemo2, useRef, useState as useState2 } from "react";
|
|
297
289
|
import { invariant } from "@dxos/invariant";
|
|
298
|
-
import { Icon as
|
|
299
|
-
import {
|
|
290
|
+
import { Icon as Icon3, ListItem, ScrollArea, Tooltip, toLocalizedString as toLocalizedString3, useMediaQuery, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
291
|
+
import { DropdownMenu, MenuProvider } from "@dxos/react-ui-menu";
|
|
300
292
|
import { Tabs } from "@dxos/react-ui-tabs";
|
|
301
293
|
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
302
294
|
import { arrayMove, getFirstTwoRenderableChars } from "@dxos/util";
|
|
@@ -561,7 +553,7 @@ var ItemAvatar = ({ item }) => {
|
|
|
561
553
|
color: `var(--dx-${hue}SurfaceText)`
|
|
562
554
|
}
|
|
563
555
|
};
|
|
564
|
-
return /* @__PURE__ */ React4.createElement(
|
|
556
|
+
return /* @__PURE__ */ React4.createElement(Icon3, {
|
|
565
557
|
icon: item.properties.icon,
|
|
566
558
|
size: 5,
|
|
567
559
|
...hueFgStyle
|
|
@@ -654,7 +646,7 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
|
|
|
654
646
|
}, /* @__PURE__ */ React4.createElement("div", {
|
|
655
647
|
role: "none",
|
|
656
648
|
className: mx2(l0ItemContent, "is-[--rail-action] bs-[--rail-action] group-hover/l0item:bg-hoverSurface")
|
|
657
|
-
}, /* @__PURE__ */ React4.createElement(
|
|
649
|
+
}, /* @__PURE__ */ React4.createElement(Icon3, {
|
|
658
650
|
icon: "ph--list--regular",
|
|
659
651
|
size: 5
|
|
660
652
|
})))))), /* @__PURE__ */ React4.createElement(ScrollArea.Root, null, /* @__PURE__ */ React4.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React4.createElement("div", {
|
|
@@ -720,17 +712,17 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
|
|
|
720
712
|
// src/components/Sidebar/L1Panel.tsx
|
|
721
713
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
722
714
|
import React7, { useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
723
|
-
import {
|
|
715
|
+
import { IconButton as IconButton2, toLocalizedString as toLocalizedString6, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
724
716
|
import { Tree } from "@dxos/react-ui-list";
|
|
725
717
|
import { Tabs as Tabs2 } from "@dxos/react-ui-tabs";
|
|
726
|
-
import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem as hoverableOpenControlItem2
|
|
718
|
+
import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem as hoverableOpenControlItem2 } from "@dxos/react-ui-theme";
|
|
727
719
|
|
|
728
720
|
// src/components/NavTreeItem/NavTreeItemAction.tsx
|
|
729
721
|
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
730
722
|
import React5 from "react";
|
|
731
|
-
import {
|
|
723
|
+
import { IconButton, toLocalizedString as toLocalizedString4, useDensityContext, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
732
724
|
import { DropdownMenu as DropdownMenu2, MenuProvider as MenuProvider2 } from "@dxos/react-ui-menu";
|
|
733
|
-
import { hoverableControlItem, hoverableOpenControlItem
|
|
725
|
+
import { hoverableControlItem, hoverableOpenControlItem } from "@dxos/react-ui-theme";
|
|
734
726
|
var fallbackIcon = "ph--placeholder--regular";
|
|
735
727
|
var fineActionButtonProps = {
|
|
736
728
|
size: 4,
|
|
@@ -753,7 +745,11 @@ var NavTreeItemActionDropdownMenu = ({ parent, label, icon, testId, menuActions,
|
|
|
753
745
|
asChild: true
|
|
754
746
|
}, /* @__PURE__ */ React5.createElement(IconButton, {
|
|
755
747
|
...density === "coarse" ? coarseActionButtonProps : fineActionButtonProps,
|
|
756
|
-
classNames:
|
|
748
|
+
classNames: [
|
|
749
|
+
"shrink-0 pli-2 pointer-fine:pli-1",
|
|
750
|
+
hoverableControlItem,
|
|
751
|
+
hoverableOpenControlItem
|
|
752
|
+
],
|
|
757
753
|
variant: "ghost",
|
|
758
754
|
icon: icon ?? fallbackIcon,
|
|
759
755
|
iconOnly: true,
|
|
@@ -773,7 +769,12 @@ var NavTreeItemMonolithicAction = ({ parent, properties: { disabled, caller, tes
|
|
|
773
769
|
return /* @__PURE__ */ React5.createElement(IconButton, {
|
|
774
770
|
...density === "coarse" ? coarseActionButtonProps : fineActionButtonProps,
|
|
775
771
|
variant,
|
|
776
|
-
classNames:
|
|
772
|
+
classNames: [
|
|
773
|
+
"shrink-0",
|
|
774
|
+
hoverableControlItem,
|
|
775
|
+
hoverableOpenControlItem,
|
|
776
|
+
iconOnly ? "pli-2 pointer-fine:pli-1" : "p-2 pointer-fine:p-2 mie-1"
|
|
777
|
+
],
|
|
777
778
|
icon: icon ?? fallbackIcon,
|
|
778
779
|
iconOnly,
|
|
779
780
|
label: baseLabel,
|
|
@@ -820,17 +821,17 @@ var NavTreeItemAction = ({ monolithic, menuActions, parent: node, ...props }) =>
|
|
|
820
821
|
// src/components/NavTreeItem/NavTreeItemColumns.tsx
|
|
821
822
|
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
822
823
|
import React6, { Fragment, memo } from "react";
|
|
823
|
-
import { isAction as
|
|
824
|
-
import { DensityProvider, Popover, toLocalizedString as toLocalizedString5,
|
|
824
|
+
import { isAction as isAction2 } from "@dxos/app-graph";
|
|
825
|
+
import { DensityProvider, Popover, Treegrid, toLocalizedString as toLocalizedString5, useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
825
826
|
var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fine" }) => {
|
|
826
827
|
var _effect = _useSignals6();
|
|
827
828
|
try {
|
|
828
829
|
const { t } = useTranslation6(NAVTREE_PLUGIN);
|
|
829
|
-
const {
|
|
830
|
+
const { useActions: useActions3, renderItemEnd: ItemEnd, popoverAnchorId } = useNavTreeContext();
|
|
830
831
|
const level = path.length - 2;
|
|
831
|
-
const { actions: _actions, groupedActions } =
|
|
832
|
-
const [primaryAction, ...secondaryActions] = _actions.toSorted((a,
|
|
833
|
-
const actions = (primaryAction?.properties?.disposition === "list-item-primary" ? secondaryActions : _actions).flatMap((action) =>
|
|
832
|
+
const { actions: _actions, groupedActions } = useActions3(item);
|
|
833
|
+
const [primaryAction, ...secondaryActions] = _actions.toSorted((a, _b) => a.properties?.disposition === "list-item-primary" ? -1 : 1);
|
|
834
|
+
const actions = (primaryAction?.properties?.disposition === "list-item-primary" ? secondaryActions : _actions).flatMap((action) => isAction2(action) ? [
|
|
834
835
|
action
|
|
835
836
|
] : []).filter((a) => [
|
|
836
837
|
"list-item",
|
|
@@ -838,7 +839,7 @@ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fi
|
|
|
838
839
|
].includes(a.properties?.disposition));
|
|
839
840
|
const ActionRoot = popoverAnchorId === `dxos.org/ui/${NAV_TREE_ITEM}/${item.id}` ? Popover.Anchor : Fragment;
|
|
840
841
|
useLoadDescendents(item);
|
|
841
|
-
useLoadDescendents(primaryAction && !
|
|
842
|
+
useLoadDescendents(primaryAction && !isAction2(primaryAction) ? primaryAction : void 0);
|
|
842
843
|
return /* @__PURE__ */ React6.createElement(DensityProvider, {
|
|
843
844
|
density
|
|
844
845
|
}, /* @__PURE__ */ React6.createElement("div", {
|
|
@@ -849,8 +850,8 @@ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fi
|
|
|
849
850
|
label: toLocalizedString5(primaryAction.properties?.label, t),
|
|
850
851
|
icon: primaryAction.properties?.icon ?? "ph--placeholder--regular",
|
|
851
852
|
parent: item,
|
|
852
|
-
monolithic:
|
|
853
|
-
menuActions:
|
|
853
|
+
monolithic: isAction2(primaryAction),
|
|
854
|
+
menuActions: isAction2(primaryAction) ? [
|
|
854
855
|
primaryAction
|
|
855
856
|
] : groupedActions[primaryAction.id],
|
|
856
857
|
menuType: primaryAction.properties?.menuType,
|
|
@@ -873,30 +874,14 @@ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fi
|
|
|
873
874
|
});
|
|
874
875
|
|
|
875
876
|
// src/components/Sidebar/L1Panel.tsx
|
|
876
|
-
var
|
|
877
|
-
var TitleButton = ({ title, onClick }) => {
|
|
877
|
+
var L1Panel = ({ open, path, item, currentItemId, onBack }) => {
|
|
878
878
|
var _effect = _useSignals7();
|
|
879
879
|
try {
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
icon: "ph--caret-left--bold",
|
|
886
|
-
size: 3
|
|
887
|
-
}), /* @__PURE__ */ React7.createElement("span", {
|
|
888
|
-
className: mx4(headingBackButtonLabel)
|
|
889
|
-
}, title));
|
|
890
|
-
} finally {
|
|
891
|
-
_effect.f();
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
895
|
-
var _effect = _useSignals7();
|
|
896
|
-
try {
|
|
897
|
-
const { isAlternateTree, setAlternateTree, ...navTreeContext } = useNavTreeContext();
|
|
898
|
-
const { t } = useTranslation7(NAVTREE_PLUGIN);
|
|
899
|
-
const alternateTree = navTreeContext.useItems(item, {
|
|
880
|
+
const { t } = useTranslation7(meta.id);
|
|
881
|
+
const { isAlternateTree, ...navTreeContext } = useNavTreeContext();
|
|
882
|
+
const { useItems: useItems2 } = navTreeContext;
|
|
883
|
+
const title = toLocalizedString6(item.properties.label, t);
|
|
884
|
+
const alternateTree = useItems2(item, {
|
|
900
885
|
disposition: "alternate-tree"
|
|
901
886
|
})[0];
|
|
902
887
|
const alternatePath = useMemo3(() => [
|
|
@@ -906,34 +891,16 @@ var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
|
906
891
|
item.id,
|
|
907
892
|
path
|
|
908
893
|
]);
|
|
909
|
-
const handleOpen = useCallback2(() => setAlternateTree?.(alternatePath, true), [
|
|
910
|
-
alternatePath,
|
|
911
|
-
setAlternateTree
|
|
912
|
-
]);
|
|
913
894
|
const isAlternate = isAlternateTree?.(alternatePath, item) ?? false;
|
|
914
895
|
const useAlternateItems = useCallback2((node, { disposition } = {}) => {
|
|
915
|
-
return
|
|
896
|
+
return useItems2(node, {
|
|
916
897
|
disposition,
|
|
917
898
|
sort: node?.id === alternateTree.id
|
|
918
899
|
});
|
|
919
900
|
}, [
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
]);
|
|
923
|
-
const handleBack = useCallback2(() => {
|
|
924
|
-
if (isAlternate) {
|
|
925
|
-
setAlternateTree?.(alternatePath, false);
|
|
926
|
-
} else {
|
|
927
|
-
onBack?.();
|
|
928
|
-
}
|
|
929
|
-
}, [
|
|
930
|
-
isAlternate,
|
|
931
|
-
onBack,
|
|
932
|
-
alternatePath,
|
|
933
|
-
setAlternateTree
|
|
901
|
+
alternateTree,
|
|
902
|
+
useItems2
|
|
934
903
|
]);
|
|
935
|
-
const title = toLocalizedString6(item.properties.label, t);
|
|
936
|
-
const backCapable = item.id.startsWith("!") || isAlternate;
|
|
937
904
|
return /* @__PURE__ */ React7.createElement(Tabs2.Tabpanel, {
|
|
938
905
|
key: item.id,
|
|
939
906
|
value: item.id,
|
|
@@ -948,28 +915,12 @@ var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
|
948
915
|
...!open && {
|
|
949
916
|
inert: "true"
|
|
950
917
|
}
|
|
951
|
-
}, item.id === currentItemId && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(
|
|
952
|
-
className: "flex items-center border-be border-subduedSeparator app-drag pli-1 density-coarse"
|
|
953
|
-
}, backCapable ? /* @__PURE__ */ React7.createElement(TitleButton, {
|
|
954
|
-
title,
|
|
955
|
-
onClick: handleBack
|
|
956
|
-
}) : /* @__PURE__ */ React7.createElement("span", {
|
|
957
|
-
className: "flex-1 truncate min-is-0 pis-6"
|
|
958
|
-
}, title), alternateTree && !isAlternate && /* @__PURE__ */ React7.createElement(IconButton2, {
|
|
959
|
-
variant: "ghost",
|
|
960
|
-
classNames: mx4("shrink-0", hoverableControlItem2, hoverableOpenControlItem2, "pli-2 pointer-fine:pli-1"),
|
|
961
|
-
iconOnly: true,
|
|
962
|
-
size: 5,
|
|
963
|
-
icon: alternateTree.properties.icon ?? "ph--placeholder--regular",
|
|
964
|
-
label: toLocalizedString6(alternateTree.properties.label ?? alternateTree.id, t),
|
|
965
|
-
"data-testid": "treeView.alternateTreeButton",
|
|
966
|
-
onClick: handleOpen
|
|
967
|
-
}), /* @__PURE__ */ React7.createElement(NavTreeItemColumns, {
|
|
918
|
+
}, item.id === currentItemId && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(L1PanelHeader, {
|
|
968
919
|
path,
|
|
969
920
|
item,
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
})
|
|
921
|
+
currentItemId,
|
|
922
|
+
onBack
|
|
923
|
+
}), /* @__PURE__ */ React7.createElement("div", {
|
|
973
924
|
role: "none",
|
|
974
925
|
className: "overflow-y-auto"
|
|
975
926
|
}, isAlternate ? /* @__PURE__ */ React7.createElement(Tree, {
|
|
@@ -995,48 +946,106 @@ var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
|
995
946
|
_effect.f();
|
|
996
947
|
}
|
|
997
948
|
};
|
|
998
|
-
var
|
|
949
|
+
var L1PanelHeader = ({ item, path, onBack }) => {
|
|
999
950
|
var _effect = _useSignals7();
|
|
1000
951
|
try {
|
|
1001
|
-
const {
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
const
|
|
952
|
+
const { t } = useTranslation7(meta.id);
|
|
953
|
+
const { isAlternateTree, setAlternateTree, ...navTreeContext } = useNavTreeContext();
|
|
954
|
+
const title = toLocalizedString6(item.properties.label, t);
|
|
955
|
+
const alternateTree = navTreeContext.useItems(item, {
|
|
956
|
+
disposition: "alternate-tree"
|
|
957
|
+
})[0];
|
|
958
|
+
const alternatePath = useMemo3(() => [
|
|
1005
959
|
...path,
|
|
1006
960
|
item.id
|
|
1007
961
|
], [
|
|
1008
962
|
item.id,
|
|
1009
963
|
path
|
|
1010
964
|
]);
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
965
|
+
const isAlternate = isAlternateTree?.(alternatePath, item) ?? false;
|
|
966
|
+
const backCapable = item.id.startsWith("!") || isAlternate;
|
|
967
|
+
const handleOpen = useCallback2(() => {
|
|
968
|
+
setAlternateTree?.(alternatePath, true);
|
|
969
|
+
}, [
|
|
970
|
+
alternatePath,
|
|
971
|
+
setAlternateTree
|
|
972
|
+
]);
|
|
973
|
+
const handleBack = useCallback2(() => {
|
|
974
|
+
if (isAlternate) {
|
|
975
|
+
setAlternateTree?.(alternatePath, false);
|
|
976
|
+
} else {
|
|
977
|
+
onBack?.();
|
|
978
|
+
}
|
|
979
|
+
}, [
|
|
980
|
+
isAlternate,
|
|
981
|
+
alternatePath,
|
|
982
|
+
setAlternateTree,
|
|
983
|
+
onBack
|
|
984
|
+
]);
|
|
985
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
986
|
+
className: "flex is-full items-center border-be border-subduedSeparator app-drag density-coarse"
|
|
987
|
+
}, /* @__PURE__ */ React7.createElement("div", {
|
|
988
|
+
className: "is-6"
|
|
989
|
+
}), /* @__PURE__ */ React7.createElement("h2", {
|
|
990
|
+
className: "flex-1 truncate min-is-0"
|
|
991
|
+
}, title), /* @__PURE__ */ React7.createElement("div", null, backCapable && /* @__PURE__ */ React7.createElement(IconButton2, {
|
|
992
|
+
variant: "ghost",
|
|
993
|
+
icon: "ph--arrow-u-down-left--regular",
|
|
994
|
+
iconOnly: true,
|
|
995
|
+
size: 5,
|
|
996
|
+
label: t("button back"),
|
|
997
|
+
classNames: [
|
|
998
|
+
hoverableControlItem2,
|
|
999
|
+
hoverableOpenControlItem2,
|
|
1000
|
+
"pointer-fine:pli-1"
|
|
1001
|
+
],
|
|
1002
|
+
onClick: handleBack
|
|
1003
|
+
}) || alternateTree && !isAlternate && /* @__PURE__ */ React7.createElement(IconButton2, {
|
|
1004
|
+
"data-testid": "treeView.alternateTreeButton",
|
|
1005
|
+
variant: "ghost",
|
|
1006
|
+
icon: alternateTree.properties.icon ?? "ph--placeholder--regular",
|
|
1007
|
+
iconOnly: true,
|
|
1008
|
+
size: 5,
|
|
1009
|
+
label: toLocalizedString6(alternateTree.properties.label ?? alternateTree.id, t),
|
|
1010
|
+
classNames: [
|
|
1011
|
+
hoverableControlItem2,
|
|
1012
|
+
hoverableOpenControlItem2,
|
|
1013
|
+
"pointer-fine:pli-1"
|
|
1014
|
+
],
|
|
1015
|
+
onClick: handleOpen
|
|
1016
|
+
}) || /* @__PURE__ */ React7.createElement("div", null)), /* @__PURE__ */ React7.createElement(NavTreeItemColumns, {
|
|
1017
|
+
open: true,
|
|
1018
|
+
path,
|
|
1019
|
+
item,
|
|
1020
|
+
density: "coarse"
|
|
1021
|
+
}));
|
|
1017
1022
|
} finally {
|
|
1018
1023
|
_effect.f();
|
|
1019
1024
|
}
|
|
1020
1025
|
};
|
|
1021
|
-
|
|
1022
|
-
|
|
1026
|
+
|
|
1027
|
+
// src/components/Sidebar/L1Tabs.tsx
|
|
1028
|
+
import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
|
|
1029
|
+
import React8, { useMemo as useMemo4 } from "react";
|
|
1030
|
+
var L1Tabs = ({ topLevelItems, onBack, ...props }) => {
|
|
1031
|
+
var _effect = _useSignals8();
|
|
1023
1032
|
try {
|
|
1024
|
-
return /* @__PURE__ */
|
|
1033
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, topLevelItems.map((item) => {
|
|
1025
1034
|
const type = l0ItemType(item);
|
|
1026
1035
|
switch (type) {
|
|
1027
|
-
case "collection":
|
|
1028
|
-
return /* @__PURE__ */ React7.createElement(L1PanelCollection, {
|
|
1029
|
-
key: item.id,
|
|
1030
|
-
item,
|
|
1031
|
-
...props
|
|
1032
|
-
});
|
|
1033
1036
|
case "tab":
|
|
1034
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ React8.createElement(L1Panel, {
|
|
1035
1038
|
key: item.id,
|
|
1036
1039
|
item,
|
|
1037
1040
|
...props,
|
|
1038
1041
|
onBack
|
|
1039
1042
|
});
|
|
1043
|
+
case "collection":
|
|
1044
|
+
return /* @__PURE__ */ React8.createElement(L1PanelCollection, {
|
|
1045
|
+
key: item.id,
|
|
1046
|
+
item,
|
|
1047
|
+
...props
|
|
1048
|
+
});
|
|
1040
1049
|
default:
|
|
1041
1050
|
return null;
|
|
1042
1051
|
}
|
|
@@ -1045,11 +1054,34 @@ var L1Panels = ({ topLevelItems, onBack, ...props }) => {
|
|
|
1045
1054
|
_effect.f();
|
|
1046
1055
|
}
|
|
1047
1056
|
};
|
|
1057
|
+
var L1PanelCollection = ({ item, path, ...props }) => {
|
|
1058
|
+
var _effect = _useSignals8();
|
|
1059
|
+
try {
|
|
1060
|
+
const { useItems: useItems2 } = useNavTreeContext();
|
|
1061
|
+
useLoadDescendents(item);
|
|
1062
|
+
const collectionItems = useItems2(item);
|
|
1063
|
+
const groupPath = useMemo4(() => [
|
|
1064
|
+
...path,
|
|
1065
|
+
item.id
|
|
1066
|
+
], [
|
|
1067
|
+
item.id,
|
|
1068
|
+
path
|
|
1069
|
+
]);
|
|
1070
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, collectionItems.filter((item2) => l0ItemType(item2) === "tab").map((item2) => /* @__PURE__ */ React8.createElement(L1Panel, {
|
|
1071
|
+
key: item2.id,
|
|
1072
|
+
item: item2,
|
|
1073
|
+
path: groupPath,
|
|
1074
|
+
...props
|
|
1075
|
+
})));
|
|
1076
|
+
} finally {
|
|
1077
|
+
_effect.f();
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1048
1080
|
|
|
1049
1081
|
// src/components/NavTree/NavTree.tsx
|
|
1050
1082
|
var NAV_TREE_ITEM = "NavTreeItem";
|
|
1051
1083
|
var NavTree = ({ id, root, ...props }) => {
|
|
1052
|
-
var _effect =
|
|
1084
|
+
var _effect = _useSignals9();
|
|
1053
1085
|
try {
|
|
1054
1086
|
const { tab, useItems: useItems2, onBack } = useNavTreeContext();
|
|
1055
1087
|
const topLevelActions = useItems2(root, {
|
|
@@ -1065,7 +1097,7 @@ var NavTree = ({ id, root, ...props }) => {
|
|
|
1065
1097
|
const topLevelNavigation = useItems2(root, {
|
|
1066
1098
|
disposition: "navigation"
|
|
1067
1099
|
});
|
|
1068
|
-
const l0Items =
|
|
1100
|
+
const l0Items = useMemo5(() => [
|
|
1069
1101
|
// prettier-ignore
|
|
1070
1102
|
...topLevelCollections,
|
|
1071
1103
|
...topLevelWorkspaces,
|
|
@@ -1082,7 +1114,7 @@ var NavTree = ({ id, root, ...props }) => {
|
|
|
1082
1114
|
const userAccountItem = useItems2(root, {
|
|
1083
1115
|
disposition: "user-account"
|
|
1084
1116
|
})[0];
|
|
1085
|
-
const topLevelItems =
|
|
1117
|
+
const topLevelItems = useMemo5(() => [
|
|
1086
1118
|
// prettier-ignore
|
|
1087
1119
|
...l0Items,
|
|
1088
1120
|
...pinnedItems,
|
|
@@ -1095,24 +1127,24 @@ var NavTree = ({ id, root, ...props }) => {
|
|
|
1095
1127
|
userAccountItem
|
|
1096
1128
|
]);
|
|
1097
1129
|
useLoadDescendents(root);
|
|
1098
|
-
const path =
|
|
1130
|
+
const path = useMemo5(() => [
|
|
1099
1131
|
id
|
|
1100
1132
|
], [
|
|
1101
1133
|
id
|
|
1102
1134
|
]);
|
|
1103
|
-
return /* @__PURE__ */
|
|
1135
|
+
return /* @__PURE__ */ React9.createElement(Tabs3.Root, {
|
|
1104
1136
|
value: tab,
|
|
1105
1137
|
orientation: "vertical",
|
|
1106
1138
|
verticalVariant: "stateless",
|
|
1107
1139
|
classNames: "relative"
|
|
1108
|
-
}, /* @__PURE__ */
|
|
1140
|
+
}, /* @__PURE__ */ React9.createElement(L0Menu, {
|
|
1109
1141
|
menuActions: topLevelActions,
|
|
1110
1142
|
topLevelItems: l0Items,
|
|
1111
1143
|
pinnedItems,
|
|
1112
1144
|
userAccountItem,
|
|
1113
1145
|
path,
|
|
1114
1146
|
parent: root
|
|
1115
|
-
}), /* @__PURE__ */
|
|
1147
|
+
}), /* @__PURE__ */ React9.createElement(L1Tabs, {
|
|
1116
1148
|
topLevelItems,
|
|
1117
1149
|
path,
|
|
1118
1150
|
currentItemId: tab,
|
|
@@ -1124,17 +1156,9 @@ var NavTree = ({ id, root, ...props }) => {
|
|
|
1124
1156
|
}
|
|
1125
1157
|
};
|
|
1126
1158
|
|
|
1127
|
-
// src/capabilities/index.ts
|
|
1128
|
-
import { lazy } from "@dxos/app-framework";
|
|
1129
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-5J4LRWDX.mjs"));
|
|
1130
|
-
var IntentResolver = lazy(() => import("./intent-resolver-3XYN2CBU.mjs"));
|
|
1131
|
-
var Keyboard2 = lazy(() => import("./keyboard-QRS6WOQH.mjs"));
|
|
1132
|
-
var ReactSurface = lazy(() => import("./react-surface-N2HPMYCU.mjs"));
|
|
1133
|
-
var State = lazy(() => import("./state-54DY3DOY.mjs"));
|
|
1134
|
-
|
|
1135
1159
|
// src/components/NavTreeContainer.tsx
|
|
1136
1160
|
var NODE_TYPE = "dxos/app-graph/node";
|
|
1137
|
-
var renderItemEnd = ({ node, open }) => /* @__PURE__ */
|
|
1161
|
+
var renderItemEnd = ({ node, open }) => /* @__PURE__ */ React10.createElement(Surface, {
|
|
1138
1162
|
role: "navtree-item-end",
|
|
1139
1163
|
data: {
|
|
1140
1164
|
id: node.id,
|
|
@@ -1148,7 +1172,7 @@ var filterItems = (node, disposition) => {
|
|
|
1148
1172
|
if (!disposition && (node.properties.disposition === "hidden" || node.properties.disposition === "alternate-tree")) {
|
|
1149
1173
|
return false;
|
|
1150
1174
|
} else if (!disposition) {
|
|
1151
|
-
const action =
|
|
1175
|
+
const action = isAction3(node);
|
|
1152
1176
|
return !action || node.properties.disposition === "item";
|
|
1153
1177
|
} else {
|
|
1154
1178
|
return node.properties.disposition === disposition;
|
|
@@ -1159,11 +1183,32 @@ var getItems = (graph, node, disposition) => {
|
|
|
1159
1183
|
};
|
|
1160
1184
|
var useItems = (node, options) => {
|
|
1161
1185
|
const { graph } = useAppGraph2();
|
|
1162
|
-
const connections = useConnections(graph, node?.id ?? ROOT_ID)
|
|
1163
|
-
|
|
1186
|
+
const connections = useConnections(graph, node?.id ?? ROOT_ID);
|
|
1187
|
+
const filtered = connections.filter((node2) => filterItems(node2, options?.disposition));
|
|
1188
|
+
return options?.sort ? filtered.toSorted((a, b) => byPosition(a.properties, b.properties)) : filtered;
|
|
1189
|
+
};
|
|
1190
|
+
var useActions2 = (node) => {
|
|
1191
|
+
const { graph } = useAppGraph2();
|
|
1192
|
+
const actions = useGraphActions(graph, node.id);
|
|
1193
|
+
return useMemo6(() => actions.reduce((acc, arg) => {
|
|
1194
|
+
if (arg.properties.disposition === "item") {
|
|
1195
|
+
return acc;
|
|
1196
|
+
}
|
|
1197
|
+
acc.actions.push(arg);
|
|
1198
|
+
if (!isAction3(arg)) {
|
|
1199
|
+
const actionGroup = graph.getActions(arg.id);
|
|
1200
|
+
acc.groupedActions[arg.id] = actionGroup;
|
|
1201
|
+
}
|
|
1202
|
+
return acc;
|
|
1203
|
+
}, {
|
|
1204
|
+
actions: [],
|
|
1205
|
+
groupedActions: {}
|
|
1206
|
+
}), [
|
|
1207
|
+
actions
|
|
1208
|
+
]);
|
|
1164
1209
|
};
|
|
1165
1210
|
var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar }) => {
|
|
1166
|
-
var _effect =
|
|
1211
|
+
var _effect = _useSignals10();
|
|
1167
1212
|
try {
|
|
1168
1213
|
const [isLg] = useMediaQuery2("lg", {
|
|
1169
1214
|
ssr: false
|
|
@@ -1173,9 +1218,6 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1173
1218
|
const { isOpen, isCurrent, isAlternateTree, setItem } = useCapability(NavTreeCapabilities.State);
|
|
1174
1219
|
const layout = useLayout();
|
|
1175
1220
|
const { navigationSidebarState } = useSidebars(NAVTREE_PLUGIN);
|
|
1176
|
-
const getActions2 = useCallback3((node) => getActions(graph, node), [
|
|
1177
|
-
graph
|
|
1178
|
-
]);
|
|
1179
1221
|
const getProps = useCallback3((node, path) => {
|
|
1180
1222
|
const children = getChildren(graph, node, path).filter(getChildrenFilter);
|
|
1181
1223
|
const parentOf = children.length > 0 ? children.map(({ id }) => id) : node.properties.role === "branch" ? [] : void 0;
|
|
@@ -1185,7 +1227,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1185
1227
|
parentOf,
|
|
1186
1228
|
icon: node.properties.icon,
|
|
1187
1229
|
disabled: node.properties.disabled,
|
|
1188
|
-
className:
|
|
1230
|
+
className: mx3(node.properties.modified && "italic", node.properties.className),
|
|
1189
1231
|
headingClassName: node.properties.headingClassName,
|
|
1190
1232
|
testId: node.properties.testId
|
|
1191
1233
|
};
|
|
@@ -1242,7 +1284,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1242
1284
|
if (!node.data) {
|
|
1243
1285
|
return;
|
|
1244
1286
|
}
|
|
1245
|
-
if (
|
|
1287
|
+
if (isAction3(node)) {
|
|
1246
1288
|
const [parent] = graph.getConnections(node.id, "inbound");
|
|
1247
1289
|
void (parent && node.data({
|
|
1248
1290
|
parent,
|
|
@@ -1278,7 +1320,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1278
1320
|
}));
|
|
1279
1321
|
}
|
|
1280
1322
|
const defaultAction = graph.getActions(node.id).find((action) => action.properties?.disposition === "default");
|
|
1281
|
-
if (
|
|
1323
|
+
if (isAction3(defaultAction)) {
|
|
1282
1324
|
void defaultAction.data();
|
|
1283
1325
|
}
|
|
1284
1326
|
if (!isLg) {
|
|
@@ -1358,10 +1400,10 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1358
1400
|
}, [
|
|
1359
1401
|
setItem
|
|
1360
1402
|
]);
|
|
1361
|
-
const navTreeContextValue =
|
|
1403
|
+
const navTreeContextValue = useMemo6(() => ({
|
|
1362
1404
|
useItems,
|
|
1363
1405
|
tab,
|
|
1364
|
-
|
|
1406
|
+
useActions: useActions2,
|
|
1365
1407
|
loadDescendents,
|
|
1366
1408
|
renderItemEnd,
|
|
1367
1409
|
popoverAnchorId,
|
|
@@ -1378,7 +1420,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1378
1420
|
onBack: handleBack
|
|
1379
1421
|
}), [
|
|
1380
1422
|
tab,
|
|
1381
|
-
|
|
1423
|
+
useActions2,
|
|
1382
1424
|
loadDescendents,
|
|
1383
1425
|
renderItemEnd,
|
|
1384
1426
|
popoverAnchorId,
|
|
@@ -1394,9 +1436,9 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1394
1436
|
handleSelect,
|
|
1395
1437
|
handleBack
|
|
1396
1438
|
]);
|
|
1397
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ React10.createElement(NavTreeContext.Provider, {
|
|
1398
1440
|
value: navTreeContextValue
|
|
1399
|
-
}, /* @__PURE__ */
|
|
1441
|
+
}, /* @__PURE__ */ React10.createElement(NavTree, {
|
|
1400
1442
|
id: ROOT_ID,
|
|
1401
1443
|
root: graph.root,
|
|
1402
1444
|
open: layout.sidebarOpen
|
|
@@ -1414,7 +1456,6 @@ export {
|
|
|
1414
1456
|
resolveMigrationOperation,
|
|
1415
1457
|
sortActions,
|
|
1416
1458
|
getChildren,
|
|
1417
|
-
getActions,
|
|
1418
1459
|
l0ItemType,
|
|
1419
1460
|
NODE_TYPE,
|
|
1420
1461
|
NavTreeContainer,
|
|
@@ -1425,4 +1466,4 @@ export {
|
|
|
1425
1466
|
ReactSurface,
|
|
1426
1467
|
State
|
|
1427
1468
|
};
|
|
1428
|
-
//# sourceMappingURL=chunk-
|
|
1469
|
+
//# sourceMappingURL=chunk-SNGLGBFJ.mjs.map
|