@manta-eu/react 0.1.7 → 0.1.9
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/README.md +2 -0
- package/dist/components/chart/AreaChart.d.ts.map +1 -1
- package/dist/components/chart/AreaChart.js +4 -6
- package/dist/components/chart/BarChart.d.ts.map +1 -1
- package/dist/components/chart/BarChart.js +5 -6
- package/dist/components/chart/ComposedChart.d.ts.map +1 -1
- package/dist/components/chart/ComposedChart.js +15 -7
- package/dist/components/chart/LineChart.d.ts.map +1 -1
- package/dist/components/chart/LineChart.js +4 -6
- package/dist/components/chart/annotations.d.ts +4 -0
- package/dist/components/chart/annotations.d.ts.map +1 -1
- package/dist/components/chart/annotations.js +10 -2
- package/dist/components/chart/chart-schemas.d.ts +1960 -54
- package/dist/components/chart/chart-schemas.d.ts.map +1 -1
- package/dist/components/chart/chart-schemas.js +137 -15
- package/dist/components/chart/series.d.ts +28 -0
- package/dist/components/chart/series.d.ts.map +1 -0
- package/dist/components/chart/series.js +61 -0
- package/dist/components/chart/stacks.d.ts +9 -0
- package/dist/components/chart/stacks.d.ts.map +1 -0
- package/dist/components/chart/stacks.js +11 -0
- package/dist/components/chat-view/ChatHeaders.d.ts.map +1 -1
- package/dist/components/chat-view/ChatHeaders.js +2 -2
- package/dist/components/layouts/Sidebar.d.ts.map +1 -1
- package/dist/components/layouts/Sidebar.js +14 -3
- package/dist/components/planning/ActioningView.d.ts +1 -0
- package/dist/components/planning/ActioningView.d.ts.map +1 -1
- package/dist/components/planning/ActioningView.js +15 -52
- package/dist/components/planning/ExecutionSectionItem.d.ts +6 -4
- package/dist/components/planning/ExecutionSectionItem.d.ts.map +1 -1
- package/dist/components/planning/ExecutionSectionItem.js +2 -2
- package/dist/components/planning/ExecutionSections.d.ts +6 -4
- package/dist/components/planning/ExecutionSections.d.ts.map +1 -1
- package/dist/components/planning/ExecutionSections.js +2 -2
- package/dist/components/planning/ManualActionCard.d.ts +14 -8
- package/dist/components/planning/ManualActionCard.d.ts.map +1 -1
- package/dist/components/planning/ManualActionCard.js +44 -24
- package/dist/components/planning/ManualActionList.d.ts +22 -0
- package/dist/components/planning/ManualActionList.d.ts.map +1 -0
- package/dist/components/planning/ManualActionList.js +35 -0
- package/dist/components/planning/manual-action-targets.d.ts +4 -0
- package/dist/components/planning/manual-action-targets.d.ts.map +1 -0
- package/dist/components/planning/manual-action-targets.js +19 -0
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +4 -1
- package/dist/components/sidebar/index.d.ts +2 -0
- package/dist/components/sidebar/index.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +1 -0
- package/dist/components/sidebar/nav-user.d.ts +1 -1
- package/dist/components/sidebar/nav-user.d.ts.map +1 -1
- package/dist/components/sidebar/nav-user.js +3 -3
- package/dist/components/sidebar/user-avatar.d.ts +7 -0
- package/dist/components/sidebar/user-avatar.d.ts.map +1 -0
- package/dist/components/sidebar/user-avatar.js +9 -0
- package/dist/globals.css +6 -13
- package/dist/hooks/use-connection-problems.d.ts.map +1 -1
- package/dist/hooks/use-manual-actions.d.ts +13 -3
- package/dist/hooks/use-manual-actions.d.ts.map +1 -1
- package/dist/hooks/use-manual-actions.js +16 -10
- package/dist/hooks/useAuth.d.ts +1 -0
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +7 -1
- package/dist/hooks/useConversations.d.ts +1 -0
- package/dist/hooks/useConversations.d.ts.map +1 -1
- package/dist/hooks/useResolveManualAction.d.ts +14 -0
- package/dist/hooks/useResolveManualAction.d.ts.map +1 -0
- package/dist/hooks/useResolveManualAction.js +47 -0
- package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
- package/dist/ldo-ui.d.ts +2 -1
- package/dist/ldo-ui.d.ts.map +1 -1
- package/dist/ldo-ui.js +2 -1
- package/dist/lib/build-config.d.ts +2 -0
- package/dist/lib/build-config.d.ts.map +1 -1
- package/dist/lib/build-config.js +2 -0
- package/dist/lib/chat-types.d.ts +1 -0
- package/dist/lib/chat-types.d.ts.map +1 -1
- package/dist/lib/datastore-route-table.d.ts +2 -0
- package/dist/lib/datastore-route-table.d.ts.map +1 -1
- package/dist/lib/datastore-route-table.js +3 -1
- package/dist/lib/datastore-routes.d.ts +7 -1
- package/dist/lib/datastore-routes.d.ts.map +1 -1
- package/dist/lib/datastore-routes.js +7 -2
- package/dist/lib/decode-chart-entities.d.ts.map +1 -1
- package/dist/lib/decode-chart-entities.js +5 -1
- package/dist/lib/manual-actions.d.ts +1 -0
- package/dist/lib/manual-actions.d.ts.map +1 -1
- package/dist/lib/manual-actions.js +4 -1
- package/dist/lib/structured-data/types.d.ts +7 -2
- package/dist/lib/structured-data/types.d.ts.map +1 -1
- package/dist/providers/ChatManagerProvider.d.ts.map +1 -1
- package/dist/providers/ChatManagerProvider.js +18 -16
- package/dist/providers/NavExtrasProvider.d.ts +23 -0
- package/dist/providers/NavExtrasProvider.d.ts.map +1 -0
- package/dist/providers/NavExtrasProvider.js +10 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +1 -0
- package/dist/routes/explain/ExplainEmpty.d.ts.map +1 -1
- package/dist/routes/explain/ExplainEmpty.js +2 -1
- package/dist/routes/integrations/catalog-shape.d.ts +2 -1
- package/dist/routes/integrations/catalog-shape.d.ts.map +1 -1
- package/dist/routes/integrations/components/AddIntegrationModal.d.ts.map +1 -1
- package/dist/routes/integrations/components/AddIntegrationModal.js +1 -1
- package/dist/routes/integrations/components/MantaSyncPluginDownload.d.ts +13 -0
- package/dist/routes/integrations/components/MantaSyncPluginDownload.d.ts.map +1 -0
- package/dist/routes/integrations/components/MantaSyncPluginDownload.js +23 -0
- package/dist/routes/integrations/components/connect-forms/ConnectFormHeader.d.ts +1 -1
- package/dist/routes/integrations/components/connect-forms/ConnectFormHeader.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/ConnectWizardShell.d.ts +1 -1
- package/dist/routes/integrations/components/connect-forms/ConnectWizardShell.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/ConnectionStringInput.d.ts +11 -0
- package/dist/routes/integrations/components/connect-forms/ConnectionStringInput.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/ConnectionStringInput.js +49 -0
- package/dist/routes/integrations/components/connect-forms/DashConnectForm.d.ts +7 -0
- package/dist/routes/integrations/components/connect-forms/DashConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/DashConnectForm.js +87 -0
- package/dist/routes/integrations/components/connect-forms/DataConnectionConnectForm.d.ts +20 -0
- package/dist/routes/integrations/components/connect-forms/DataConnectionConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/DataConnectionConnectForm.js +144 -0
- package/dist/routes/integrations/components/connect-forms/DataConnectionFieldInputs.d.ts +8 -0
- package/dist/routes/integrations/components/connect-forms/DataConnectionFieldInputs.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/DataConnectionFieldInputs.js +44 -0
- package/dist/routes/integrations/components/connect-forms/FigmaConnectForm.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/FigmaConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/FigmaConnectForm.js +20 -0
- package/dist/routes/integrations/components/connect-forms/GmailConnectForm.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/GmailConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/GmailConnectForm.js +11 -0
- package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.js +37 -0
- package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.js +37 -0
- package/dist/routes/integrations/components/connect-forms/ImportStartedNotice.d.ts +21 -0
- package/dist/routes/integrations/components/connect-forms/ImportStartedNotice.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/ImportStartedNotice.js +25 -0
- package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts +45 -0
- package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.js +188 -0
- package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.d.ts +6 -0
- package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.js +68 -0
- package/dist/routes/integrations/components/connect-forms/LinkedinConnectForm.d.ts +10 -0
- package/dist/routes/integrations/components/connect-forms/LinkedinConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/LinkedinConnectForm.js +124 -0
- package/dist/routes/integrations/components/connect-forms/MetaAdsConnectForm.d.ts +14 -0
- package/dist/routes/integrations/components/connect-forms/MetaAdsConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/MetaAdsConnectForm.js +183 -0
- package/dist/routes/integrations/components/connect-forms/OAuthConnectLink.d.ts +10 -0
- package/dist/routes/integrations/components/connect-forms/OAuthConnectLink.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/OAuthConnectLink.js +17 -0
- package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts +45 -0
- package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.js +136 -0
- package/dist/routes/integrations/components/connect-forms/OAuthSingleAccountConnectForm.d.ts +23 -0
- package/dist/routes/integrations/components/connect-forms/OAuthSingleAccountConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/OAuthSingleAccountConnectForm.js +63 -0
- package/dist/routes/integrations/components/connect-forms/ShopifyConnectForm.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/ShopifyConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/ShopifyConnectForm.js +14 -0
- package/dist/routes/integrations/components/connect-forms/SlackConnectForm.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/SlackConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/SlackConnectForm.js +10 -0
- package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.d.ts +5 -0
- package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.js +35 -0
- package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.d.ts +5 -0
- package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.js +47 -0
- package/dist/routes/integrations/components/connect-forms/connection-string-fields.d.ts +13 -0
- package/dist/routes/integrations/components/connect-forms/connection-string-fields.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/connection-string-fields.js +110 -0
- package/dist/routes/integrations/components/connect-forms/dash-folder-tree.d.ts +6 -0
- package/dist/routes/integrations/components/connect-forms/dash-folder-tree.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/dash-folder-tree.js +14 -0
- package/dist/routes/integrations/components/connect-forms/data-connection-fields.d.ts +35 -0
- package/dist/routes/integrations/components/connect-forms/data-connection-fields.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/data-connection-fields.js +88 -0
- package/dist/routes/integrations/components/connect-forms/google-ads-account-tree.d.ts +11 -0
- package/dist/routes/integrations/components/connect-forms/google-ads-account-tree.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/google-ads-account-tree.js +36 -0
- package/dist/routes/integrations/components/connect-forms/google-analytics-property-tree.d.ts +6 -0
- package/dist/routes/integrations/components/connect-forms/google-analytics-property-tree.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/google-analytics-property-tree.js +34 -0
- package/dist/routes/integrations/components/connect-forms/oauth-setup-phase.d.ts +12 -0
- package/dist/routes/integrations/components/connect-forms/oauth-setup-phase.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/oauth-setup-phase.js +33 -0
- package/dist/routes/integrations/components/connect-forms/setup-account-unavailable-reason.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/setup-account-unavailable-reason.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/setup-account-unavailable-reason.js +8 -0
- package/dist/routes/integrations/components/connect-forms/types.d.ts +5 -1
- package/dist/routes/integrations/components/connect-forms/types.d.ts.map +1 -1
- package/dist/routes/integrations/components/connect-forms/useConnectWizard.d.ts +19 -0
- package/dist/routes/integrations/components/connect-forms/useConnectWizard.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/useConnectWizard.js +28 -0
- package/dist/routes/integrations/components/connect-forms/useConnectedExternalIds.d.ts +4 -0
- package/dist/routes/integrations/components/connect-forms/useConnectedExternalIds.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/useConnectedExternalIds.js +17 -0
- package/dist/routes/integrations/components/connect-forms/useWindowFocusPoll.d.ts +7 -0
- package/dist/routes/integrations/components/connect-forms/useWindowFocusPoll.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/useWindowFocusPoll.js +18 -0
- package/dist/routes/integrations/connect-forms.d.ts +16 -0
- package/dist/routes/integrations/connect-forms.d.ts.map +1 -0
- package/dist/routes/integrations/connect-forms.js +14 -0
- package/dist/routes/integrations/filter-connected-providers.d.ts +3 -0
- package/dist/routes/integrations/filter-connected-providers.d.ts.map +1 -0
- package/dist/routes/integrations/filter-connected-providers.js +15 -0
- package/dist/routes/integrations/overview.d.ts +3 -0
- package/dist/routes/integrations/overview.d.ts.map +1 -0
- package/dist/routes/integrations/overview.js +2 -0
- package/dist/routes/integrations/use-connected-account-entities.d.ts +10 -0
- package/dist/routes/integrations/use-connected-account-entities.d.ts.map +1 -0
- package/dist/routes/integrations/use-connected-account-entities.js +29 -0
- package/dist/routes/memories/components/EmptyStates.d.ts.map +1 -1
- package/dist/routes/memories/components/EmptyStates.js +2 -1
- package/dist/routes/plans/components/ActionPlanPage.d.ts +1 -0
- package/dist/routes/plans/components/ActionPlanPage.d.ts.map +1 -1
- package/dist/routes/plans/components/ActionPlanPage.js +9 -5
- package/dist/routes/plans/components/actionPlansTableConfig.d.ts +12 -12
- package/dist/rules/datalog-ast/DatalogBodyFormulaComponent.d.ts.map +1 -1
- package/dist/rules/datalog-ast/DatalogBodyFormulaComponent.js +4 -1
- package/dist/rules/rule-narrative-aggregates.d.ts +1 -0
- package/dist/rules/rule-narrative-aggregates.d.ts.map +1 -1
- package/dist/rules/rule-narrative-aggregates.js +20 -0
- package/dist/rules/rule-narrative-context.d.ts.map +1 -1
- package/dist/rules/rule-narrative-context.js +3 -9
- package/dist/rules/rule-narrative-format.d.ts +1 -1
- package/dist/rules/rule-narrative.d.ts.map +1 -1
- package/dist/rules/rule-narrative.js +22 -7
- package/package.json +47 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EntityTypeEntry } from "./ActionPlanDetailView.js";
|
|
2
2
|
import { type SectionStatus } from "./execution-section-model.js";
|
|
3
|
-
import { type
|
|
4
|
-
import type { ExecutionProvenanceActivity, ManualAction, ManualActionResolution } from "#ldo-ui";
|
|
3
|
+
import { type ManualActionTarget } from "./ManualActionCard.js";
|
|
4
|
+
import type { ExecutionProvenanceActivity, ManualAction, ManualActionResolution, ManualActionResolving } from "#ldo-ui";
|
|
5
5
|
export type ExecutionSectionItemProps = {
|
|
6
6
|
entry: EntityTypeEntry;
|
|
7
7
|
activities: ExecutionProvenanceActivity[];
|
|
@@ -10,9 +10,11 @@ export type ExecutionSectionItemProps = {
|
|
|
10
10
|
isExpanded: boolean;
|
|
11
11
|
onToggle: () => void;
|
|
12
12
|
manualActions?: ManualAction[];
|
|
13
|
-
manualActionEntities?: Map<string,
|
|
13
|
+
manualActionEntities?: Map<string, ManualActionTarget[]>;
|
|
14
14
|
onManualActionResolve?: (subjectIri: string, resolution: ManualActionResolution) => void;
|
|
15
|
-
|
|
15
|
+
resolvingManualAction?: ManualActionResolving;
|
|
16
|
+
canResolveManualAction?: boolean;
|
|
17
|
+
manualActionDisabledReason?: string;
|
|
16
18
|
};
|
|
17
19
|
export declare function ExecutionSectionItem(props: ExecutionSectionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
//# sourceMappingURL=ExecutionSectionItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionSectionItem.d.ts","sourceRoot":"","sources":["../../../src/components/planning/ExecutionSectionItem.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAoD,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEjH,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ExecutionSectionItem.d.ts","sourceRoot":"","sources":["../../../src/components/planning/ExecutionSectionItem.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAoD,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEjH,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAIxH,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,2BAA2B,EAAE,CAAC;IAC1C,MAAM,EAAE,aAAa,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACzD,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACzF,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAwFpE"}
|
|
@@ -12,11 +12,11 @@ import { ManualActionCard } from "./ManualActionCard.js";
|
|
|
12
12
|
import { getPendingManualActions, getResolvedManualActions } from "#lib/manual-actions";
|
|
13
13
|
import { cn } from "#lib/utils";
|
|
14
14
|
export function ExecutionSectionItem(props) {
|
|
15
|
-
const { entry, activities, status, fallbackStartedAtMs = null, isExpanded, onToggle, manualActions = [], manualActionEntities, onManualActionResolve,
|
|
15
|
+
const { entry, activities, status, fallbackStartedAtMs = null, isExpanded, onToggle, manualActions = [], manualActionEntities, onManualActionResolve, resolvingManualAction, canResolveManualAction, manualActionDisabledReason, } = props;
|
|
16
16
|
const pendingManualActions = getPendingManualActions(manualActions);
|
|
17
17
|
const resolvedManualActions = getResolvedManualActions(manualActions);
|
|
18
18
|
const hasContent = isPresent(activities) || isPresent(pendingManualActions);
|
|
19
|
-
return (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: onToggle, className: "flex w-full items-center gap-3 pl-2 pr-3 py-3 text-left transition-colors hover:bg-muted/30", children: [_jsx("div", { className: "flex shrink-0 items-center p-1.5 rounded-lg", children: _jsx(ChevronDown, { className: cn("size-5 shrink-0 text-muted-foreground transition-transform", !isExpanded && "-rotate-90") }) }), _jsx("div", { className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-faint", children: resolveStepIcon(entry.typeName, "size-5 text-muted-foreground") }), _jsxs("div", { className: "flex-1 min-w-0 flex flex-col gap-0.5", children: [_jsx("span", { className: cn("typography-small-medium block truncate", status === "pending" ? "text-muted-foreground" : "text-default-foreground"), children: entry.typeName }), entry.description && (_jsx("span", { className: "typography-tiny text-muted-foreground block truncate", children: entry.description }))] }), _jsxs("div", { className: "flex items-center gap-3 shrink-0", children: [_jsx(SectionElapsed, { activities: activities, status: status, estimatedTime: entry.estimatedTime ?? null, fallbackStartedAtMs: fallbackStartedAtMs }), _jsx(SectionStatusIcon, { status: status })] })] }), isExpanded && hasContent && (_jsxs("div", { className: "bg-faint border-t border-default-border py-1.5", children: [activities.map((activity) => (_jsx(ExecutionActivityRow, { activity: activity, manualActionStatus: findResolvedManualActionStatus(activity, resolvedManualActions) }, activity.iri))), pendingManualActions.map((ma) => (_jsx(ManualActionCard, { manualAction: ma, entities: manualActionEntities?.get(ma.subjectIri) ?? [], description: ma.description ?? entry.description ?? undefined,
|
|
19
|
+
return (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: onToggle, className: "flex w-full items-center gap-3 pl-2 pr-3 py-3 text-left transition-colors hover:bg-muted/30", children: [_jsx("div", { className: "flex shrink-0 items-center p-1.5 rounded-lg", children: _jsx(ChevronDown, { className: cn("size-5 shrink-0 text-muted-foreground transition-transform", !isExpanded && "-rotate-90") }) }), _jsx("div", { className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-faint", children: resolveStepIcon(entry.typeName, "size-5 text-muted-foreground") }), _jsxs("div", { className: "flex-1 min-w-0 flex flex-col gap-0.5", children: [_jsx("span", { className: cn("typography-small-medium block truncate", status === "pending" ? "text-muted-foreground" : "text-default-foreground"), children: entry.typeName }), entry.description && (_jsx("span", { className: "typography-tiny text-muted-foreground block truncate", children: entry.description }))] }), _jsxs("div", { className: "flex items-center gap-3 shrink-0", children: [_jsx(SectionElapsed, { activities: activities, status: status, estimatedTime: entry.estimatedTime ?? null, fallbackStartedAtMs: fallbackStartedAtMs }), _jsx(SectionStatusIcon, { status: status })] })] }), isExpanded && hasContent && (_jsxs("div", { className: "bg-faint border-t border-default-border py-1.5", children: [activities.map((activity) => (_jsx(ExecutionActivityRow, { activity: activity, manualActionStatus: findResolvedManualActionStatus(activity, resolvedManualActions) }, activity.iri))), pendingManualActions.map((ma) => (_jsx(ManualActionCard, { manualAction: ma, entities: manualActionEntities?.get(ma.subjectIri) ?? [], description: ma.description ?? entry.description ?? undefined, resolving: resolvingManualAction, onResolve: (resolution) => onManualActionResolve?.(ma.subjectIri, resolution), canResolve: canResolveManualAction, disabledReason: manualActionDisabledReason }, ma.subjectIri)))] }))] }));
|
|
20
20
|
}
|
|
21
21
|
function SectionStatusIcon(props) {
|
|
22
22
|
return match(props.status)
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { EntityTypeEntry } from "./ActionPlanDetailView.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type { ActionPlanExecutionProvenanceResult, ManualAction, ManualActionResolution } from "#ldo-ui";
|
|
2
|
+
import type { ManualActionTarget } from "./ManualActionCard.js";
|
|
3
|
+
import type { ActionPlanExecutionProvenanceResult, ManualAction, ManualActionResolution, ManualActionResolving } from "#ldo-ui";
|
|
4
4
|
export type ExecutionSectionsProps = {
|
|
5
5
|
entityTypes: EntityTypeEntry[];
|
|
6
6
|
provenance: ActionPlanExecutionProvenanceResult | null;
|
|
7
7
|
manualActions?: ManualAction[];
|
|
8
|
-
manualActionEntities?: Map<string,
|
|
8
|
+
manualActionEntities?: Map<string, ManualActionTarget[]>;
|
|
9
9
|
activeStartedAtMs?: number | null;
|
|
10
10
|
onManualActionResolve?: (subjectIri: string, resolution: ManualActionResolution) => void;
|
|
11
|
-
|
|
11
|
+
resolvingManualAction?: ManualActionResolving;
|
|
12
|
+
canResolveManualAction?: boolean;
|
|
13
|
+
manualActionDisabledReason?: string;
|
|
12
14
|
};
|
|
13
15
|
export declare function ExecutionSections(props: ExecutionSectionsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
//# sourceMappingURL=ExecutionSections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionSections.d.ts","sourceRoot":"","sources":["../../../src/components/planning/ExecutionSections.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ExecutionSections.d.ts","sourceRoot":"","sources":["../../../src/components/planning/ExecutionSections.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EACV,mCAAmC,EACnC,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,mCAAmC,GAAG,IAAI,CAAC;IACvD,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACzD,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACzF,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAsE9D"}
|
|
@@ -5,7 +5,7 @@ import { buildSections, matchesManualActionSection } from "./execution-section-m
|
|
|
5
5
|
import { ExecutionActivityRow } from "./ExecutionActivityRow.js";
|
|
6
6
|
import { ExecutionSectionItem } from "./ExecutionSectionItem.js";
|
|
7
7
|
export function ExecutionSections(props) {
|
|
8
|
-
const { entityTypes, provenance, manualActions = [], manualActionEntities, activeStartedAtMs = null, onManualActionResolve,
|
|
8
|
+
const { entityTypes, provenance, manualActions = [], manualActionEntities, activeStartedAtMs = null, onManualActionResolve, resolvingManualAction, canResolveManualAction, manualActionDisabledReason, } = props;
|
|
9
9
|
const [expandedIndex, setExpandedIndex] = useState(0);
|
|
10
10
|
const [lastAutoExpandedRunning, setLastAutoExpandedRunning] = useState(-1);
|
|
11
11
|
const activities = provenance?.activities ?? [];
|
|
@@ -26,6 +26,6 @@ export function ExecutionSections(props) {
|
|
|
26
26
|
const effectiveStatus = activeFallbackApplies ? "running" : section.status;
|
|
27
27
|
const fallbackStartedAtMs = activeFallbackApplies ? activeStartedAtMs : null;
|
|
28
28
|
const sectionManualActions = manualActions.filter((manualAction) => matchesManualActionSection(manualAction, section.entry, sections.length));
|
|
29
|
-
return (_jsx(ExecutionSectionItem, { entry: section.entry, activities: section.activities, status: effectiveStatus, fallbackStartedAtMs: fallbackStartedAtMs, isExpanded: expandedIndex === index, onToggle: () => setExpandedIndex((prev) => (prev === index ? null : index)), manualActions: sectionManualActions, manualActionEntities: manualActionEntities, onManualActionResolve: onManualActionResolve,
|
|
29
|
+
return (_jsx(ExecutionSectionItem, { entry: section.entry, activities: section.activities, status: effectiveStatus, fallbackStartedAtMs: fallbackStartedAtMs, isExpanded: expandedIndex === index, onToggle: () => setExpandedIndex((prev) => (prev === index ? null : index)), manualActions: sectionManualActions, manualActionEntities: manualActionEntities, onManualActionResolve: onManualActionResolve, resolvingManualAction: resolvingManualAction, canResolveManualAction: canResolveManualAction, manualActionDisabledReason: manualActionDisabledReason }, section.key));
|
|
30
30
|
}) }));
|
|
31
31
|
}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import type { ManualAction, ManualActionResolution } from "#ldo-ui";
|
|
2
|
-
export type
|
|
1
|
+
import type { ManualAction, ManualActionResolution, ManualActionResolving } from "#ldo-ui";
|
|
2
|
+
export type ManualActionTarget = {
|
|
3
3
|
subjectIri: string;
|
|
4
4
|
label: string;
|
|
5
|
-
properties:
|
|
5
|
+
properties: ManualActionPropertyChange[];
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type ManualActionPropertyChange = {
|
|
8
8
|
label: string;
|
|
9
9
|
oldValue: string | null;
|
|
10
10
|
newValue: string | null;
|
|
11
11
|
};
|
|
12
|
-
type ManualActionCardProps = {
|
|
12
|
+
export type ManualActionCardProps = {
|
|
13
13
|
manualAction: ManualAction;
|
|
14
|
-
entities
|
|
14
|
+
entities?: ManualActionTarget[];
|
|
15
15
|
description?: string | null;
|
|
16
|
-
|
|
16
|
+
resolving?: ManualActionResolving;
|
|
17
17
|
onResolve: (resolution: ManualActionResolution) => void;
|
|
18
|
+
canResolve?: boolean;
|
|
19
|
+
disabledReason?: string;
|
|
18
20
|
};
|
|
19
21
|
export declare function ManualActionCard(props: ManualActionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export type ManualActionCardSkeletonProps = {
|
|
23
|
+
titleClassName?: string;
|
|
24
|
+
instructionClassName?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function ManualActionCardSkeleton(props: ManualActionCardSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
27
|
export declare function resolutionChoices(retryable: boolean, defaultResolution: "COMPLETED" | "RETRY"): ManualActionResolution[];
|
|
21
|
-
export {};
|
|
22
28
|
//# sourceMappingURL=ManualActionCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManualActionCard.d.ts","sourceRoot":"","sources":["../../../src/components/planning/ManualActionCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ManualActionCard.d.ts","sourceRoot":"","sources":["../../../src/components/planning/ManualActionCard.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAI3F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,0BAA0B,EAAE,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,SAAS,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CA+C5D;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,2CAyB5E;AAsID,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,OAAO,EAClB,iBAAiB,EAAE,WAAW,GAAG,OAAO,GACvC,sBAAsB,EAAE,CAI1B"}
|
|
@@ -1,27 +1,56 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { isPresent } from "@manta-eu/lib/present";
|
|
3
3
|
import { addAll } from "@manta-eu/lib/set";
|
|
4
|
-
import { CircleCheck, Hand, MessageSquareWarning, RotateCcw } from "lucide-react";
|
|
4
|
+
import { CircleCheck, Clock, Hand, MessageSquareWarning, RotateCcw } from "lucide-react";
|
|
5
|
+
import { match } from "ts-pattern";
|
|
6
|
+
import { Badge } from "#components/badge/index";
|
|
7
|
+
import { Button } from "#components/button/index";
|
|
8
|
+
import { DisabledActionTooltip } from "#components/disabled-action-tooltip/index";
|
|
9
|
+
import { Skeleton } from "#components/skeleton/index";
|
|
10
|
+
import { isUnstartedManualAction } from "#lib/manual-actions";
|
|
5
11
|
import { cn } from "#lib/utils";
|
|
6
12
|
export function ManualActionCard(props) {
|
|
7
|
-
const { manualAction, entities, description,
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
13
|
+
const { manualAction, entities = [], description, resolving, onResolve, canResolve = true, disabledReason } = props;
|
|
14
|
+
const instruction = description ?? manualAction.description ?? null;
|
|
15
|
+
const title = manualAction.label ?? instruction ?? buildManualActionTitle(manualAction);
|
|
16
|
+
const body = title === instruction ? null : instruction;
|
|
17
|
+
const state = manualActionState(manualAction);
|
|
18
|
+
return (_jsx("div", { className: "mx-2 my-2", children: _jsxs("div", { className: "overflow-hidden rounded-xl border border-dashed border-active-border/50 bg-card shadow-sm", children: [_jsx(CardHeader, { title: title, state: state }), (isPresent(body) || isPresent(manualAction.observedValue)) && (_jsxs("div", { className: "flex flex-col gap-1.5 border-b border-default-border px-3 py-3", children: [isPresent(body) && _jsx("p", { className: "typography-tiny text-default-foreground", children: body }), isPresent(manualAction.observedValue) && (_jsxs("p", { className: "typography-tiny text-muted-foreground", children: ["Observed: ", _jsx("span", { className: "font-mono", children: manualAction.observedValue })] }))] })), isPresent(entities) && _jsx(EntityTable, { entities: entities }), state === "pending" && (_jsx(CardFooter, { isResolving: isPresent(resolving), resolvingChoice: resolving?.subjectIri === manualAction.subjectIri ? resolving.resolution : undefined, retryable: manualAction.retryable ?? false, defaultResolution: manualAction.defaultResolution ?? "COMPLETED", onResolve: onResolve, canResolve: canResolve, disabledReason: disabledReason })), state === "unstarted" && (_jsxs("div", { className: "flex items-center gap-2 bg-muted px-3 py-3 typography-tiny text-muted-foreground", children: [_jsx(Clock, { className: "size-4" }), "Someone can act on this once the plan runs and reaches it."] }))] }) }));
|
|
11
19
|
}
|
|
20
|
+
export function ManualActionCardSkeleton(props) {
|
|
21
|
+
const { titleClassName = "w-2/5", instructionClassName = "w-4/5" } = props;
|
|
22
|
+
return (_jsx("div", { className: "mx-2 my-2", "aria-hidden": true, children: _jsxs("div", { className: "overflow-hidden rounded-xl border border-dashed border-active-border/50 bg-card shadow-sm", children: [_jsxs("div", { className: "flex items-center gap-2 border-b border-default-border bg-faint px-3 py-3", children: [_jsx(Skeleton, { className: "size-4 shrink-0 rounded-sm-v4" }), _jsx(Skeleton, { className: cn("h-3.5", titleClassName) }), _jsx(Skeleton, { className: "ml-auto h-6 w-24 shrink-0 rounded-full" })] }), _jsxs("div", { className: "flex flex-col gap-2 border-b border-default-border px-3 py-3.5", children: [_jsx(Skeleton, { className: "h-3 w-full" }), _jsx(Skeleton, { className: cn("h-3", instructionClassName) })] }), _jsx("div", { className: "border-b border-default-border px-3 py-3.5", children: _jsx(Skeleton, { className: "h-3 w-1/4" }) }), _jsxs("div", { className: "flex items-center gap-2 bg-muted px-3 py-3", children: [_jsx(Skeleton, { className: "h-8 w-24 rounded-lg-v4" }), _jsx(Skeleton, { className: "h-8 w-20 rounded-lg-v4" })] })] }) }));
|
|
23
|
+
}
|
|
24
|
+
function manualActionState(manualAction) {
|
|
25
|
+
if (isUnstartedManualAction(manualAction))
|
|
26
|
+
return "unstarted";
|
|
27
|
+
return match(manualAction.status)
|
|
28
|
+
.returnType()
|
|
29
|
+
.with("PENDING", null, () => "pending")
|
|
30
|
+
.with("COMPLETED", "REJECTED", "RETRY", (resolved) => resolved.toLowerCase())
|
|
31
|
+
.exhaustive();
|
|
32
|
+
}
|
|
33
|
+
const stateBadges = {
|
|
34
|
+
pending: { label: "Needs a person", variant: "warning" },
|
|
35
|
+
unstarted: { label: "Not started", variant: "secondary" },
|
|
36
|
+
completed: { label: "Done", variant: "success" },
|
|
37
|
+
rejected: { label: "Rejected", variant: "destructive" },
|
|
38
|
+
retry: { label: "Retrying", variant: "info" },
|
|
39
|
+
};
|
|
12
40
|
function CardHeader(props) {
|
|
13
|
-
const { title } = props;
|
|
14
|
-
|
|
41
|
+
const { title, state } = props;
|
|
42
|
+
const badge = stateBadges[state];
|
|
43
|
+
return (_jsxs("div", { className: "flex items-center gap-2 border-b border-default-border bg-faint px-3 py-3", children: [_jsx(Hand, { className: "size-4 shrink-0 text-primary" }), _jsx("span", { className: "typography-tiny-medium min-w-0 flex-1 text-default-foreground", children: title }), _jsx(Badge, { size: "sm", variant: badge.variant, children: badge.label })] }));
|
|
15
44
|
}
|
|
16
45
|
function EntityTable(props) {
|
|
17
46
|
const { entities } = props;
|
|
18
47
|
const hasProperties = entities.some((e) => isPresent(e.properties));
|
|
19
48
|
const propertyLabels = hasProperties ? collectPropertyLabels(entities) : [];
|
|
20
|
-
return (_jsxs("div", { children: [hasProperties && (_jsxs("div", { className: "flex items-center gap-3 border-b border-default-border bg-muted px-3 py-2.5", children: [_jsx("span", { className: "typography-tiny w-[240px] text-muted-foreground", children: "Entity" }), propertyLabels.map((label) => (_jsx("span", { className: "typography-tiny flex-1 text-right text-muted-foreground", children: label }, label)))
|
|
49
|
+
return (_jsxs("div", { children: [hasProperties && (_jsxs("div", { className: "flex items-center gap-3 border-b border-default-border bg-muted px-3 py-2.5", children: [_jsx("span", { className: "typography-tiny w-[240px] text-muted-foreground", children: "Entity" }), propertyLabels.map((label) => (_jsx("span", { className: "typography-tiny flex-1 text-right text-muted-foreground", children: label }, label)))] })), entities.map((entity) => (_jsx(EntityRow, { entity: entity, propertyLabels: propertyLabels }, entity.subjectIri)))] }));
|
|
21
50
|
}
|
|
22
51
|
function EntityRow(props) {
|
|
23
52
|
const { entity, propertyLabels } = props;
|
|
24
|
-
return (_jsxs("div", { className: "flex items-center gap-3 border-b border-default-border bg-card px-3 py-3 last:border-b-0", children: [_jsx("div", { className: "flex items-center gap-2
|
|
53
|
+
return (_jsxs("div", { className: "flex items-center gap-3 border-b border-default-border bg-card px-3 py-3 last:border-b-0", children: [_jsx("div", { className: "flex w-[240px] items-center gap-2", children: _jsx("span", { className: "typography-tiny truncate text-default-foreground", children: entity.label || "Manual action" }) }), propertyLabels.map((label) => {
|
|
25
54
|
const change = entity.properties.find((p) => p.label === label);
|
|
26
55
|
if (!change) {
|
|
27
56
|
return (_jsx("span", { className: "typography-tiny flex-1 text-right text-muted-foreground", children: "\u2014" }, label));
|
|
@@ -39,27 +68,25 @@ function PropertyChangePills(props) {
|
|
|
39
68
|
}
|
|
40
69
|
return (_jsxs("div", { className: "flex flex-1 items-center justify-end gap-1.5", children: [_jsx("span", { className: "rounded-[5px] bg-accent px-1.5 py-0.5 font-mono text-[11px] leading-4 text-muted-foreground", children: change.oldValue }), _jsx("span", { className: "font-mono text-[11px] text-muted-foreground", children: "\u2192" }), _jsx("span", { className: "rounded-[5px] bg-success px-1.5 py-0.5 font-mono text-[11px] leading-4 text-success-foreground", children: change.newValue })] }));
|
|
41
70
|
}
|
|
42
|
-
const primaryButton = cn("flex h-8 items-center gap-1.5 rounded-lg bg-success px-3", "typography-tiny text-success-foreground", "hover:bg-success/80 transition-colors", "disabled:opacity-50 disabled:cursor-not-allowed");
|
|
43
|
-
const secondaryButton = cn("flex h-8 items-center gap-1.5 rounded-lg border border-default-border bg-card px-3", "typography-tiny text-default-foreground", "hover:bg-muted-border transition-colors", "disabled:opacity-50 disabled:cursor-not-allowed");
|
|
44
71
|
export function resolutionChoices(retryable, defaultResolution) {
|
|
45
72
|
const positive = retryable ? ["COMPLETED", "RETRY"] : ["COMPLETED"];
|
|
46
73
|
const ordered = retryable && defaultResolution === "RETRY" ? [...positive].reverse() : positive;
|
|
47
74
|
return [...ordered, "REJECTED"];
|
|
48
75
|
}
|
|
49
76
|
const choiceLabels = {
|
|
50
|
-
COMPLETED: "Done
|
|
77
|
+
COMPLETED: "Done",
|
|
51
78
|
RETRY: "Retry",
|
|
52
79
|
REJECTED: "Reject",
|
|
53
80
|
};
|
|
54
81
|
const choiceIcons = {
|
|
55
|
-
COMPLETED:
|
|
56
|
-
RETRY:
|
|
57
|
-
REJECTED:
|
|
82
|
+
COMPLETED: CircleCheck,
|
|
83
|
+
RETRY: RotateCcw,
|
|
84
|
+
REJECTED: MessageSquareWarning,
|
|
58
85
|
};
|
|
59
86
|
function CardFooter(props) {
|
|
60
|
-
const { isResolving, retryable, defaultResolution, onResolve } = props;
|
|
87
|
+
const { isResolving, resolvingChoice, retryable, defaultResolution, onResolve, canResolve, disabledReason } = props;
|
|
61
88
|
const choices = resolutionChoices(retryable, defaultResolution);
|
|
62
|
-
return (_jsx("div", { className: "flex items-center
|
|
89
|
+
return (_jsx("div", { className: "flex items-center bg-muted px-3 py-3", children: _jsx(DisabledActionTooltip, { reason: canResolve ? undefined : disabledReason, children: _jsx("div", { className: "flex flex-wrap items-center gap-2", children: choices.map((choice, index) => (_jsx(Button, { size: "sm", rounded: "lg", variant: index === 0 ? "primary" : "tertiary", icon: choiceIcons[choice], label: choiceLabels[choice], disabled: !canResolve || isResolving, isLoading: isResolving && resolvingChoice === choice, onClick: () => onResolve(choice) }, choice))) }) }) }));
|
|
63
90
|
}
|
|
64
91
|
function buildManualActionTitle(manualAction) {
|
|
65
92
|
const subject = manualAction.subjectLabel || manualAction.typeName;
|
|
@@ -68,13 +95,6 @@ function buildManualActionTitle(manualAction) {
|
|
|
68
95
|
}
|
|
69
96
|
return "Manual action needs approval";
|
|
70
97
|
}
|
|
71
|
-
function buildFallbackEntity(manualAction) {
|
|
72
|
-
return {
|
|
73
|
-
subjectIri: manualAction.subjectIri,
|
|
74
|
-
label: manualAction.subjectLabel || manualAction.typeName || "Manual action",
|
|
75
|
-
properties: [],
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
98
|
function collectPropertyLabels(entities) {
|
|
79
99
|
const labels = new Set();
|
|
80
100
|
for (const entity of entities) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ManualActionTarget } from "./ManualActionCard.js";
|
|
3
|
+
import { type ManualAction, type ManualActionResolution, type ManualActionResolving } from "#hooks/use-manual-actions";
|
|
4
|
+
export type ManualActionListViewProps = {
|
|
5
|
+
actions: ManualAction[];
|
|
6
|
+
targetsBySubject?: Map<string, ManualActionTarget[]>;
|
|
7
|
+
onResolve: (action: ManualAction, resolution: ManualActionResolution) => void;
|
|
8
|
+
resolving?: ManualActionResolving;
|
|
9
|
+
canResolve?: boolean;
|
|
10
|
+
disabledReason?: string;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
failed?: boolean;
|
|
13
|
+
emptyFallback?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export declare function ManualActionListView(props: ManualActionListViewProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export type PlanManualActionsProps = Omit<ManualActionListViewProps, "actions" | "targetsBySubject" | "isLoading" | "failed"> & {
|
|
17
|
+
planGraphIri: string;
|
|
18
|
+
includeUnstarted?: boolean;
|
|
19
|
+
refetchIntervalMs?: number | false;
|
|
20
|
+
};
|
|
21
|
+
export declare function PlanManualActions(props: PlanManualActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=ManualActionList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManualActionList.d.ts","sourceRoot":"","sources":["../../../src/components/planning/ManualActionList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAA8C,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACrD,SAAS,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC9E,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAQF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,wTA6DpE;AAED,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,yBAAyB,EACzB,SAAS,GAAG,kBAAkB,GAAG,WAAW,GAAG,QAAQ,CACxD,GAAG;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACpC,CAAC;AAIF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAoB9D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { isPresent } from "@manta-eu/lib/present";
|
|
3
|
+
import { useManualActionTargets } from "./manual-action-targets.js";
|
|
4
|
+
import { ManualActionCard, ManualActionCardSkeleton } from "./ManualActionCard.js";
|
|
5
|
+
import { useManualActions, } from "#hooks/use-manual-actions";
|
|
6
|
+
const skeletonShapes = [
|
|
7
|
+
{ title: "w-2/5", instruction: "w-4/5" },
|
|
8
|
+
{ title: "w-1/2", instruction: "w-3/5" },
|
|
9
|
+
{ title: "w-1/3", instruction: "w-2/3" },
|
|
10
|
+
];
|
|
11
|
+
export function ManualActionListView(props) {
|
|
12
|
+
const { actions, targetsBySubject, onResolve, resolving, canResolve, disabledReason, isLoading = false, failed = false, emptyFallback, } = props;
|
|
13
|
+
if (isLoading) {
|
|
14
|
+
return (_jsxs("div", { role: "status", "aria-busy": "true", className: "flex flex-col", children: [_jsx("span", { className: "sr-only", children: "Loading manual steps" }), skeletonShapes.map((shape) => (_jsx(ManualActionCardSkeleton, { titleClassName: shape.title, instructionClassName: shape.instruction }, shape.title)))] }));
|
|
15
|
+
}
|
|
16
|
+
if (failed) {
|
|
17
|
+
return (_jsx("div", { className: "rounded-xl border border-error-border bg-card px-4 py-6 typography-small text-error-foreground", children: "This plan's manual steps could not be read." }));
|
|
18
|
+
}
|
|
19
|
+
if (!isPresent(actions)) {
|
|
20
|
+
return (emptyFallback ?? (_jsx("div", { className: "rounded-xl border border-muted-border bg-card px-4 py-6 typography-small text-muted-foreground", children: "No manual steps in this plan." })));
|
|
21
|
+
}
|
|
22
|
+
return (_jsx("div", { className: "flex flex-col", children: actions.map((action) => (_jsx(ManualActionCard, { manualAction: action, entities: targetsBySubject?.get(action.subjectIri) ?? [], resolving: resolving, onResolve: (resolution) => onResolve(action, resolution), canResolve: canResolve, disabledReason: disabledReason }, action.subjectIri))) }));
|
|
23
|
+
}
|
|
24
|
+
const noActions = [];
|
|
25
|
+
export function PlanManualActions(props) {
|
|
26
|
+
const { planGraphIri, includeUnstarted = true, refetchIntervalMs = false, ...view } = props;
|
|
27
|
+
const { data, isLoading, isError } = useManualActions({
|
|
28
|
+
planGraphIri,
|
|
29
|
+
includeUnstarted,
|
|
30
|
+
refetchIntervalMs,
|
|
31
|
+
});
|
|
32
|
+
const actions = data ?? noActions;
|
|
33
|
+
const targetsBySubject = useManualActionTargets(actions);
|
|
34
|
+
return (_jsx(ManualActionListView, { actions: actions, targetsBySubject: targetsBySubject, isLoading: isLoading, failed: isError && data === undefined, ...view }));
|
|
35
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ManualActionTarget } from "./ManualActionCard.js";
|
|
2
|
+
import type { ManualAction } from "#hooks/use-manual-actions";
|
|
3
|
+
export declare function useManualActionTargets(actions: readonly ManualAction[]): Map<string, ManualActionTarget[]>;
|
|
4
|
+
//# sourceMappingURL=manual-action-targets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual-action-targets.d.ts","sourceRoot":"","sources":["../../../src/components/planning/manual-action-targets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAgB1G"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { humanizeEntityName } from "@manta-eu/client/shared/agent-mode";
|
|
2
|
+
import { iriLocalName } from "@manta-eu/client/shared/rdf-namespaces";
|
|
3
|
+
import { isPresent } from "@manta-eu/lib/present";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { useInstanceLabels } from "#hooks/use-instance-labels";
|
|
6
|
+
export function useManualActionTargets(actions) {
|
|
7
|
+
const aboutIris = useMemo(() => actions.flatMap(({ aboutIri }) => (isPresent(aboutIri) ? [aboutIri] : [])), [actions]);
|
|
8
|
+
const labels = useInstanceLabels(aboutIris);
|
|
9
|
+
return useMemo(() => {
|
|
10
|
+
const targets = new Map();
|
|
11
|
+
for (const action of actions) {
|
|
12
|
+
if (!isPresent(action.aboutIri))
|
|
13
|
+
continue;
|
|
14
|
+
const label = labels.get(action.aboutIri) ?? humanizeEntityName(iriLocalName(action.aboutIri));
|
|
15
|
+
targets.set(action.subjectIri, [{ subjectIri: action.aboutIri, label, properties: [] }]);
|
|
16
|
+
}
|
|
17
|
+
return targets;
|
|
18
|
+
}, [actions, labels]);
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAM,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAEjE,eAAO,MAAM,YAAY;;;;;;;;;;;;CAoBxB,CAAC;AAOF,wBAAgB,qBAAqB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,GAAG,SAAS,GAAG,MAAM,CAErG;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;AAEzE,QAAA,MAAM,MAAM,iDAAuB,CAAC;AAIpC,QAAA,MAAM,WAAW,6HAAwB,CAAC;AAE1C,QAAA,MAAM,WAAW,8HAAwB,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,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AAU;;;AA6BnB,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,GAAG;IAC9F,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B,CAAC;AAEF,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CASnD;kBATQ,eAAe;;;AAYxB,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAC"}
|
|
@@ -39,7 +39,10 @@ const SelectValue = SelectPrimitive.Value;
|
|
|
39
39
|
function SelectTrigger(props) {
|
|
40
40
|
const { className, children, size = "base", hideChevron, label, error, hiddenLabel, required, ref, "aria-invalid": ariaInvalid, ...otherProps } = props;
|
|
41
41
|
const errorId = `${otherProps.id}-error`;
|
|
42
|
-
return (_jsxs("div", { className: "flex w-full flex-col gap-1.5", children: [label && (_jsx("div", { className: cn("flex justify-between items-end gap-2", hiddenLabel && "sr-only"), children: _jsxs("label", { htmlFor: otherProps.id, className: "typography-small text-default-foreground",
|
|
42
|
+
return (_jsxs("div", { className: "flex w-full flex-col gap-1.5", children: [label && (_jsx("div", { className: cn("flex justify-between items-end gap-2", hiddenLabel && "sr-only"), children: _jsxs("label", { htmlFor: otherProps.id, className: "typography-small text-default-foreground", onClick: (event) => {
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
event.currentTarget.control?.focus();
|
|
45
|
+
}, children: [label, required && _jsx("span", { className: "text-error-foreground ml-1", children: "*" })] }) })), _jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn(createSelectClassName({ size }), className), "aria-invalid": ariaInvalid ?? (error ? true : undefined), "aria-errormessage": error ? errorId : undefined, ...otherProps, children: [_jsx("span", { className: "flex-1 min-w-0 truncate", children: children }), _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: cn("size-4 shrink-0 text-muted-foreground", hideChevron && "hidden") }) })] }), error && (_jsx("p", { id: errorId, className: "typography-small text-error-foreground", children: error }))] }));
|
|
43
46
|
}
|
|
44
47
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
45
48
|
function SelectScrollUpButton(props) {
|
|
@@ -63,9 +63,11 @@ export { Initials } from "./initials.js";
|
|
|
63
63
|
export { NavMenu, type NavItem, type NavMenuLinkProps, type NavSubItem } from "./nav-menu.js";
|
|
64
64
|
export { useIsMobile } from "./use-mobile.js";
|
|
65
65
|
export { NavUser } from "./nav-user.js";
|
|
66
|
+
export { UserAvatar } from "./user-avatar.js";
|
|
66
67
|
export { sidebarStorageKey };
|
|
67
68
|
export type { CompanyPickerProps } from "./company-picker.js";
|
|
68
69
|
export type { InitialsArgs } from "./initials.js";
|
|
70
|
+
export type { UserAvatarArgs } from "./user-avatar.js";
|
|
69
71
|
export type { NavItemBase, NavLeafItem, NavMenuArgs, NavMenuLinkComponent, NavMenuSubmenuVariant, NavSubmenuItem, } from "./nav-menu.js";
|
|
70
72
|
export type { NavUserArgs } from "./nav-user.js";
|
|
71
73
|
export type { SidebarContextProps } from "./sidebar-context.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAyD,KAAK,cAAc,EAAsB,MAAM,OAAO,CAAC;AACvH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,OAAO,EAAW,cAAc,EAAmB,MAAM,YAAY,CAAC;AACtE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI7E,QAAA,MAAM,iBAAiB,kBAAkB,CAAC;AAM1C,iBAAS,UAAU,wBAOlB;AAED,iBAAS,eAAe,CAAC,EACvB,WAAkB,EAClB,IAAI,EAA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,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -264,4 +264,5 @@ export { Initials } from "./initials.js";
|
|
|
264
264
|
export { NavMenu } from "./nav-menu.js";
|
|
265
265
|
export { useIsMobile } from "./use-mobile.js";
|
|
266
266
|
export { NavUser } from "./nav-user.js";
|
|
267
|
+
export { UserAvatar } from "./user-avatar.js";
|
|
267
268
|
export { sidebarStorageKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-user.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/nav-user.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"nav-user.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/nav-user.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gBAAgB,EAAE;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,2CAmFxC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronsUpDown, LogOut } from "lucide-react";
|
|
4
4
|
import { Dropdown, DropdownContent, DropdownGroup, DropdownItem, DropdownSeparator, DropdownTrigger, preventPointerFocus, } from "../dropdown/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { UserAvatar } from "./user-avatar.js";
|
|
6
6
|
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from "./index.js";
|
|
7
7
|
export function NavUser(args) {
|
|
8
|
-
const { children, topSlot, accountExtraSlot, className, name, currentDatastore, pickerSlot, onNavigateToAccount, onLogout, onCloseAutoFocus, } = args;
|
|
8
|
+
const { children, topSlot, accountExtraSlot, className, name, picture, currentDatastore, pickerSlot, onNavigateToAccount, onLogout, onCloseAutoFocus, } = args;
|
|
9
9
|
const { isMobile } = useSidebar();
|
|
10
|
-
return (_jsx(SidebarMenu, { className: className, children: _jsx(SidebarMenuItem, { children: _jsxs(Dropdown, { children: [_jsx(DropdownTrigger, { asChild: true, children: _jsxs(SidebarMenuButton, { "data-testid": "user-menu-trigger", className: "data-[state=open]:bg-muted data-[state=open]:text-default-foreground w-full group-data-[collapsible=icon]:p-0", tooltip:
|
|
10
|
+
return (_jsx(SidebarMenu, { className: className, children: _jsx(SidebarMenuItem, { children: _jsxs(Dropdown, { children: [_jsx(DropdownTrigger, { asChild: true, children: _jsxs(SidebarMenuButton, { "data-testid": "user-menu-trigger", className: "data-[state=open]:bg-muted data-[state=open]:text-default-foreground w-full group-data-[collapsible=icon]:p-0", tooltip: `${name} · ${currentDatastore.name}`, children: [_jsx(UserAvatar, { className: "shrink-0 rounded-full transition-[width,height] duration-200 ease-linear group-data-[collapsible=icon]:p-0", name: name, picture: picture }), _jsxs("div", { className: "flex flex-col min-w-0 flex-1 transition-[opacity,max-width] duration-200 ease-linear max-w-full group-data-[collapsible=icon]:max-w-0 group-data-[collapsible=icon]:hidden", children: [_jsx("span", { "data-testid": "user-display-name", className: "truncate typography-small-medium text-left", children: name }), _jsx("span", { className: "truncate typography-tiny text-muted-foreground text-left", children: currentDatastore.name })] }), _jsx(ChevronsUpDown, { className: "ml-auto size-4 shrink-0 my-auto transition-[opacity,max-width] duration-200 ease-linear group-data-[collapsible=icon]:max-w-0 group-data-[collapsible=icon]:hidden" })] }) }), _jsxs(DropdownContent, { className: "w-(--radix-dropdown-menu-trigger-width) min-w-60 rounded-lg px-0 bg-card border-muted shadow-md", side: isMobile ? "bottom" : "right", align: "end", sideOffset: 4, onCloseAutoFocus: onCloseAutoFocus, children: [pickerSlot, topSlot, (pickerSlot || topSlot) && _jsx(DropdownSeparator, {}), _jsxs(DropdownGroup, { className: "p-2", children: [_jsxs(DropdownItem, { className: "p-1.5 flex flex-row items-center gap-1.5 typography-caption h-11", onClick: onNavigateToAccount, onPointerMove: preventPointerFocus, onPointerLeave: preventPointerFocus, children: [_jsx(UserAvatar, { name: name, picture: picture }), _jsx("span", { className: "typography-caption", children: name })] }), accountExtraSlot] }), children, _jsx(DropdownSeparator, {}), _jsx(DropdownGroup, { className: "p-2", children: _jsxs(DropdownItem, { "data-testid": "logout-button", className: "p-1.5 flex flex-row items-center gap-1.5 h-11", onClick: onLogout, onPointerMove: preventPointerFocus, onPointerLeave: preventPointerFocus, children: [_jsx(LogOut, { className: "size-4" }), _jsx("span", { className: "my-auto typography-caption", children: "Sign out" })] }) })] })] }) }) }));
|
|
11
11
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-avatar.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/user-avatar.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CAe/C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { isPresent } from "@manta-eu/lib/present";
|
|
3
|
+
import { Initials } from "./initials.js";
|
|
4
|
+
import { Avatar, AvatarFallback, AvatarImage } from "#components/avatar/index";
|
|
5
|
+
import { cn } from "#style";
|
|
6
|
+
export function UserAvatar(props) {
|
|
7
|
+
const { name, picture, className } = props;
|
|
8
|
+
return (_jsx(Avatar, { asChild: true, className: cn("size-8 rounded-lg", className), children: _jsxs("div", { "data-testid": "user-avatar", "aria-hidden": true, children: [isPresent(picture) && (_jsx(AvatarImage, { src: picture, alt: "", referrerPolicy: "no-referrer", className: "object-cover" })), _jsx(AvatarFallback, { className: "bg-transparent", children: _jsx(Initials, { name: name, className: "size-full rounded-[inherit]" }) })] }) }));
|
|
9
|
+
}
|
package/dist/globals.css
CHANGED
|
@@ -699,6 +699,9 @@
|
|
|
699
699
|
.m-0\.5 {
|
|
700
700
|
margin: calc(var(--spacing) * 0.5);
|
|
701
701
|
}
|
|
702
|
+
.m-2 {
|
|
703
|
+
margin: calc(var(--spacing) * 2);
|
|
704
|
+
}
|
|
702
705
|
.m-4 {
|
|
703
706
|
margin: calc(var(--spacing) * 4);
|
|
704
707
|
}
|
|
@@ -1499,6 +1502,9 @@
|
|
|
1499
1502
|
.w-1\/2 {
|
|
1500
1503
|
width: calc(1/2 * 100%);
|
|
1501
1504
|
}
|
|
1505
|
+
.w-1\/3 {
|
|
1506
|
+
width: calc(1/3 * 100%);
|
|
1507
|
+
}
|
|
1502
1508
|
.w-1\/4 {
|
|
1503
1509
|
width: calc(1/4 * 100%);
|
|
1504
1510
|
}
|
|
@@ -5903,11 +5909,6 @@
|
|
|
5903
5909
|
background-color: var(--color-muted);
|
|
5904
5910
|
}
|
|
5905
5911
|
}
|
|
5906
|
-
.hover\:bg-muted-border {
|
|
5907
|
-
&:is(:hover, [data-state="hover"]) {
|
|
5908
|
-
background-color: var(--color-muted-border);
|
|
5909
|
-
}
|
|
5910
|
-
}
|
|
5911
5912
|
.hover\:bg-muted-foreground {
|
|
5912
5913
|
&:is(:hover, [data-state="hover"]) {
|
|
5913
5914
|
background-color: var(--color-muted-foreground);
|
|
@@ -5971,14 +5972,6 @@
|
|
|
5971
5972
|
background-color: var(--color-secondary-hover);
|
|
5972
5973
|
}
|
|
5973
5974
|
}
|
|
5974
|
-
.hover\:bg-success\/80 {
|
|
5975
|
-
&:is(:hover, [data-state="hover"]) {
|
|
5976
|
-
background-color: color-mix(in srgb, #dcfce7 80%, transparent);
|
|
5977
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
5978
|
-
background-color: color-mix(in oklab, var(--color-success) 80%, transparent);
|
|
5979
|
-
}
|
|
5980
|
-
}
|
|
5981
|
-
}
|
|
5982
5975
|
.hover\:bg-transparent {
|
|
5983
5976
|
&:is(:hover, [data-state="hover"]) {
|
|
5984
5977
|
background-color: transparent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-connection-problems.d.ts","sourceRoot":"","sources":["../../src/hooks/use-connection-problems.ts"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-connection-problems.d.ts","sourceRoot":"","sources":["../../src/hooks/use-connection-problems.ts"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB;;;;;;;;;kBAMgi2H,CAAC;;YAAsC,CAAC;;IAD5m2H"}
|