@uipath/apollo-wind 2.67.0 → 2.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/forms/metadata-form.cjs +40 -44
- package/dist/components/forms/metadata-form.js +40 -44
- package/dist/components/ui/index.cjs +72 -61
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/json-tree-view/JsonTree.types.d.ts +26 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.cjs +13 -10
- package/dist/components/ui/json-tree-view/JsonTreeRow.js +14 -11
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.cjs +22 -11
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.d.ts +6 -1
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.js +22 -11
- package/dist/components/ui/json-tree-view/NodeKey.cjs +4 -0
- package/dist/components/ui/json-tree-view/NodeKey.js +4 -0
- package/dist/components/ui/json-tree-view/RowActions.cjs +23 -17
- package/dist/components/ui/json-tree-view/RowActions.d.ts +4 -1
- package/dist/components/ui/json-tree-view/RowActions.js +23 -17
- package/dist/components/ui/json-tree-view/buildJsonTree.cjs +99 -44
- package/dist/components/ui/json-tree-view/buildJsonTree.d.ts +15 -2
- package/dist/components/ui/json-tree-view/buildJsonTree.js +97 -45
- package/dist/components/ui/panel-tabs.cjs +99 -0
- package/dist/components/ui/panel-tabs.d.ts +34 -0
- package/dist/components/ui/panel-tabs.js +53 -0
- package/dist/components/ui/tree-view.cjs +19 -5
- package/dist/components/ui/tree-view.js +19 -5
- package/dist/index.cjs +29 -10
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -2
- package/dist/styles.css +33 -0
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ const external_react_hook_form_namespaceObject = require("react-hook-form");
|
|
|
44
44
|
const v4_namespaceObject = require("zod/v4");
|
|
45
45
|
const accordion_cjs_namespaceObject = require("../ui/accordion.cjs");
|
|
46
46
|
const button_cjs_namespaceObject = require("../ui/button.cjs");
|
|
47
|
-
const
|
|
47
|
+
const panel_tabs_cjs_namespaceObject = require("../ui/panel-tabs.cjs");
|
|
48
48
|
const tooltip_cjs_namespaceObject = require("../ui/tooltip.cjs");
|
|
49
49
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
50
50
|
const external_data_fetcher_cjs_namespaceObject = require("./data-fetcher.cjs");
|
|
@@ -470,53 +470,48 @@ function TabbedStepForm({ schema, context, customComponents, disabled, sectionVa
|
|
|
470
470
|
if (0 === visibleSteps.length) return null;
|
|
471
471
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
472
472
|
children: [
|
|
473
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
473
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(panel_tabs_cjs_namespaceObject.PanelTabs, {
|
|
474
474
|
value: currentTab,
|
|
475
475
|
onValueChange: selectTab,
|
|
476
|
-
className: "flex min-h-0 flex-1 flex-col gap-1",
|
|
477
476
|
children: [
|
|
478
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
errorCount
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
className: "grid h-4 min-w-4 place-items-center rounded-full bg-error px-1 text-[10px] font-semibold leading-none text-error-background",
|
|
495
|
-
children: errorCount
|
|
496
|
-
})
|
|
497
|
-
]
|
|
498
|
-
}, step.id);
|
|
499
|
-
})
|
|
477
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(panel_tabs_cjs_namespaceObject.PanelTabsList, {
|
|
478
|
+
children: visibleSteps.map((step)=>{
|
|
479
|
+
const errorCount = errorCountByStepId[step.id] ?? 0;
|
|
480
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(panel_tabs_cjs_namespaceObject.PanelTabsTrigger, {
|
|
481
|
+
value: step.id,
|
|
482
|
+
children: [
|
|
483
|
+
step.title,
|
|
484
|
+
errorCount > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
485
|
+
role: "img",
|
|
486
|
+
"aria-label": `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
487
|
+
title: `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
488
|
+
className: "grid h-4 min-w-4 place-items-center rounded-full bg-error px-1 text-[10px] font-semibold leading-none text-error-background",
|
|
489
|
+
children: errorCount
|
|
490
|
+
})
|
|
491
|
+
]
|
|
492
|
+
}, step.id);
|
|
500
493
|
})
|
|
501
494
|
}),
|
|
502
495
|
visibleSteps.map((step)=>{
|
|
503
496
|
const stepSections = step.sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
504
|
-
|
|
497
|
+
const showEmptyState = 0 === stepSections.length && void 0 !== step.emptyState;
|
|
498
|
+
const selfPadded = !showEmptyState && 'plain' === sectionVariant;
|
|
499
|
+
const sections = stepSections.map((section, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(metadata_form_FormSection, {
|
|
500
|
+
section: section,
|
|
501
|
+
context: context,
|
|
502
|
+
customComponents: customComponents,
|
|
503
|
+
disabled: disabled,
|
|
504
|
+
sectionVariant: sectionVariant,
|
|
505
|
+
afterTabs: 0 === index
|
|
506
|
+
}, section.id));
|
|
507
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(panel_tabs_cjs_namespaceObject.PanelTabsContent, {
|
|
505
508
|
value: step.id,
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
children: stepSections.map((section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(metadata_form_FormSection, {
|
|
513
|
-
section: section,
|
|
514
|
-
context: context,
|
|
515
|
-
customComponents: customComponents,
|
|
516
|
-
disabled: disabled,
|
|
517
|
-
sectionVariant: sectionVariant
|
|
518
|
-
}, section.id))
|
|
519
|
-
})
|
|
509
|
+
padded: !selfPadded,
|
|
510
|
+
innerClassName: showEmptyState ? 'text-sm text-muted-foreground' : 'space-y-2',
|
|
511
|
+
children: showEmptyState ? step.emptyState : selfPadded ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
512
|
+
className: "pb-6 [padding-inline:var(--mf-content-inset,0px)]",
|
|
513
|
+
children: sections
|
|
514
|
+
}) : sections
|
|
520
515
|
}, step.id);
|
|
521
516
|
})
|
|
522
517
|
]
|
|
@@ -530,13 +525,14 @@ function TabbedStepForm({ schema, context, customComponents, disabled, sectionVa
|
|
|
530
525
|
]
|
|
531
526
|
});
|
|
532
527
|
}
|
|
533
|
-
const metadata_form_FormSection = /*#__PURE__*/ external_react_default().memo(function({ section, context, customComponents, disabled, sectionVariant = 'card' }) {
|
|
528
|
+
const metadata_form_FormSection = /*#__PURE__*/ external_react_default().memo(function({ section, context, customComponents, disabled, sectionVariant = 'card', afterTabs = false }) {
|
|
534
529
|
const gridColumns = context.schema.layout?.columns || 1;
|
|
535
530
|
const gap = context.schema.layout?.gap || 4;
|
|
536
531
|
const isPlain = 'plain' === sectionVariant;
|
|
537
532
|
const dividerClassName = 'border-t first:border-t-0';
|
|
538
533
|
const wrapperClassName = isPlain ? 'border-b-0' : 'border rounded-lg px-3';
|
|
539
|
-
const
|
|
534
|
+
const plainTopClassName = afterTabs ? 'pt-1.5' : 'pt-4';
|
|
535
|
+
const triggerClassName = isPlain ? `${plainTopClassName} pb-4 text-sm font-semibold hover:no-underline` : 'text-sm font-medium';
|
|
540
536
|
const fieldsGrid = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
541
537
|
className: "grid",
|
|
542
538
|
style: {
|
|
@@ -551,7 +547,7 @@ const metadata_form_FormSection = /*#__PURE__*/ external_react_default().memo(fu
|
|
|
551
547
|
}, field.name))
|
|
552
548
|
});
|
|
553
549
|
if (!section.title) return isPlain ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
554
|
-
className: `${dividerClassName} pb-4
|
|
550
|
+
className: `${dividerClassName} pb-4 ${plainTopClassName}`,
|
|
555
551
|
children: fieldsGrid
|
|
556
552
|
}) : fieldsGrid;
|
|
557
553
|
const innerContent = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
@@ -593,7 +589,7 @@ const metadata_form_FormSection = /*#__PURE__*/ external_react_default().memo(fu
|
|
|
593
589
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
594
590
|
className: "flex",
|
|
595
591
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
596
|
-
className: isPlain ?
|
|
592
|
+
className: isPlain ? `flex flex-1 items-center justify-start gap-2 pb-4 text-sm font-semibold ${plainTopClassName}` : 'flex flex-1 items-center justify-between py-4 text-sm font-medium',
|
|
597
593
|
children: section.title
|
|
598
594
|
})
|
|
599
595
|
}),
|
|
@@ -5,7 +5,7 @@ import { FormProvider, useForm, useFormState, useWatch } from "react-hook-form";
|
|
|
5
5
|
import { z } from "zod/v4";
|
|
6
6
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../ui/accordion.js";
|
|
7
7
|
import { Button } from "../ui/button.js";
|
|
8
|
-
import {
|
|
8
|
+
import { PanelTabs, PanelTabsContent, PanelTabsList, PanelTabsTrigger } from "../ui/panel-tabs.js";
|
|
9
9
|
import { TooltipProvider } from "../ui/tooltip.js";
|
|
10
10
|
import { deepEqual, get } from "../../lib/index.js";
|
|
11
11
|
import { DataFetcher } from "./data-fetcher.js";
|
|
@@ -431,53 +431,48 @@ function TabbedStepForm({ schema, context, customComponents, disabled, sectionVa
|
|
|
431
431
|
if (0 === visibleSteps.length) return null;
|
|
432
432
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
433
433
|
children: [
|
|
434
|
-
/*#__PURE__*/ jsxs(
|
|
434
|
+
/*#__PURE__*/ jsxs(PanelTabs, {
|
|
435
435
|
value: currentTab,
|
|
436
436
|
onValueChange: selectTab,
|
|
437
|
-
className: "flex min-h-0 flex-1 flex-col gap-1",
|
|
438
437
|
children: [
|
|
439
|
-
/*#__PURE__*/ jsx(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
errorCount
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
className: "grid h-4 min-w-4 place-items-center rounded-full bg-error px-1 text-[10px] font-semibold leading-none text-error-background",
|
|
456
|
-
children: errorCount
|
|
457
|
-
})
|
|
458
|
-
]
|
|
459
|
-
}, step.id);
|
|
460
|
-
})
|
|
438
|
+
/*#__PURE__*/ jsx(PanelTabsList, {
|
|
439
|
+
children: visibleSteps.map((step)=>{
|
|
440
|
+
const errorCount = errorCountByStepId[step.id] ?? 0;
|
|
441
|
+
return /*#__PURE__*/ jsxs(PanelTabsTrigger, {
|
|
442
|
+
value: step.id,
|
|
443
|
+
children: [
|
|
444
|
+
step.title,
|
|
445
|
+
errorCount > 0 && /*#__PURE__*/ jsx("span", {
|
|
446
|
+
role: "img",
|
|
447
|
+
"aria-label": `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
448
|
+
title: `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
449
|
+
className: "grid h-4 min-w-4 place-items-center rounded-full bg-error px-1 text-[10px] font-semibold leading-none text-error-background",
|
|
450
|
+
children: errorCount
|
|
451
|
+
})
|
|
452
|
+
]
|
|
453
|
+
}, step.id);
|
|
461
454
|
})
|
|
462
455
|
}),
|
|
463
456
|
visibleSteps.map((step)=>{
|
|
464
457
|
const stepSections = step.sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
465
|
-
|
|
458
|
+
const showEmptyState = 0 === stepSections.length && void 0 !== step.emptyState;
|
|
459
|
+
const selfPadded = !showEmptyState && 'plain' === sectionVariant;
|
|
460
|
+
const sections = stepSections.map((section, index)=>/*#__PURE__*/ jsx(metadata_form_FormSection, {
|
|
461
|
+
section: section,
|
|
462
|
+
context: context,
|
|
463
|
+
customComponents: customComponents,
|
|
464
|
+
disabled: disabled,
|
|
465
|
+
sectionVariant: sectionVariant,
|
|
466
|
+
afterTabs: 0 === index
|
|
467
|
+
}, section.id));
|
|
468
|
+
return /*#__PURE__*/ jsx(PanelTabsContent, {
|
|
466
469
|
value: step.id,
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
children: stepSections.map((section)=>/*#__PURE__*/ jsx(metadata_form_FormSection, {
|
|
474
|
-
section: section,
|
|
475
|
-
context: context,
|
|
476
|
-
customComponents: customComponents,
|
|
477
|
-
disabled: disabled,
|
|
478
|
-
sectionVariant: sectionVariant
|
|
479
|
-
}, section.id))
|
|
480
|
-
})
|
|
470
|
+
padded: !selfPadded,
|
|
471
|
+
innerClassName: showEmptyState ? 'text-sm text-muted-foreground' : 'space-y-2',
|
|
472
|
+
children: showEmptyState ? step.emptyState : selfPadded ? /*#__PURE__*/ jsx("div", {
|
|
473
|
+
className: "pb-6 [padding-inline:var(--mf-content-inset,0px)]",
|
|
474
|
+
children: sections
|
|
475
|
+
}) : sections
|
|
481
476
|
}, step.id);
|
|
482
477
|
})
|
|
483
478
|
]
|
|
@@ -491,13 +486,14 @@ function TabbedStepForm({ schema, context, customComponents, disabled, sectionVa
|
|
|
491
486
|
]
|
|
492
487
|
});
|
|
493
488
|
}
|
|
494
|
-
const metadata_form_FormSection = /*#__PURE__*/ react.memo(function({ section, context, customComponents, disabled, sectionVariant = 'card' }) {
|
|
489
|
+
const metadata_form_FormSection = /*#__PURE__*/ react.memo(function({ section, context, customComponents, disabled, sectionVariant = 'card', afterTabs = false }) {
|
|
495
490
|
const gridColumns = context.schema.layout?.columns || 1;
|
|
496
491
|
const gap = context.schema.layout?.gap || 4;
|
|
497
492
|
const isPlain = 'plain' === sectionVariant;
|
|
498
493
|
const dividerClassName = 'border-t first:border-t-0';
|
|
499
494
|
const wrapperClassName = isPlain ? 'border-b-0' : 'border rounded-lg px-3';
|
|
500
|
-
const
|
|
495
|
+
const plainTopClassName = afterTabs ? 'pt-1.5' : 'pt-4';
|
|
496
|
+
const triggerClassName = isPlain ? `${plainTopClassName} pb-4 text-sm font-semibold hover:no-underline` : 'text-sm font-medium';
|
|
501
497
|
const fieldsGrid = /*#__PURE__*/ jsx("div", {
|
|
502
498
|
className: "grid",
|
|
503
499
|
style: {
|
|
@@ -512,7 +508,7 @@ const metadata_form_FormSection = /*#__PURE__*/ react.memo(function({ section, c
|
|
|
512
508
|
}, field.name))
|
|
513
509
|
});
|
|
514
510
|
if (!section.title) return isPlain ? /*#__PURE__*/ jsx("div", {
|
|
515
|
-
className: `${dividerClassName} pb-4
|
|
511
|
+
className: `${dividerClassName} pb-4 ${plainTopClassName}`,
|
|
516
512
|
children: fieldsGrid
|
|
517
513
|
}) : fieldsGrid;
|
|
518
514
|
const innerContent = /*#__PURE__*/ jsxs("div", {
|
|
@@ -554,7 +550,7 @@ const metadata_form_FormSection = /*#__PURE__*/ react.memo(function({ section, c
|
|
|
554
550
|
/*#__PURE__*/ jsx("div", {
|
|
555
551
|
className: "flex",
|
|
556
552
|
children: /*#__PURE__*/ jsx("div", {
|
|
557
|
-
className: isPlain ?
|
|
553
|
+
className: isPlain ? `flex flex-1 items-center justify-start gap-2 pb-4 text-sm font-semibold ${plainTopClassName}` : 'flex flex-1 items-center justify-between py-4 text-sm font-medium',
|
|
558
554
|
children: section.title
|
|
559
555
|
})
|
|
560
556
|
}),
|