@pipe0/react 0.1.7 → 0.2.1
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/CHANGELOG.md +33 -0
- package/dist/components/compound/effect-catalog/card.d.mts +22 -0
- package/dist/components/compound/effect-catalog/card.d.mts.map +1 -0
- package/dist/components/compound/effect-catalog/card.mjs +82 -0
- package/dist/components/compound/effect-catalog/card.mjs.map +1 -0
- package/dist/components/compound/effect-catalog/category-filter.d.mts +27 -0
- package/dist/components/compound/effect-catalog/category-filter.d.mts.map +1 -0
- package/dist/components/compound/effect-catalog/category-filter.mjs +61 -0
- package/dist/components/compound/effect-catalog/category-filter.mjs.map +1 -0
- package/dist/components/compound/effect-catalog/empty.d.mts +17 -0
- package/dist/components/compound/effect-catalog/empty.d.mts.map +1 -0
- package/dist/components/compound/effect-catalog/empty.mjs +29 -0
- package/dist/components/compound/effect-catalog/empty.mjs.map +1 -0
- package/dist/components/compound/effect-catalog/index.d.mts +6 -0
- package/dist/components/compound/effect-catalog/list.d.mts +19 -0
- package/dist/components/compound/effect-catalog/list.d.mts.map +1 -0
- package/dist/components/compound/effect-catalog/list.mjs +33 -0
- package/dist/components/compound/effect-catalog/list.mjs.map +1 -0
- package/dist/components/compound/effect-catalog/root.d.mts +31 -0
- package/dist/components/compound/effect-catalog/root.d.mts.map +1 -0
- package/dist/components/compound/effect-catalog/root.mjs +67 -0
- package/dist/components/compound/effect-catalog/root.mjs.map +1 -0
- package/dist/components/compound/effect-catalog/search-filter.d.mts +21 -0
- package/dist/components/compound/effect-catalog/search-filter.d.mts.map +1 -0
- package/dist/components/compound/effect-catalog/search-filter.mjs +47 -0
- package/dist/components/compound/effect-catalog/search-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/card.mjs +1 -1
- package/dist/components/compound/pipe-catalog/category-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/provider-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/root.mjs +1 -1
- package/dist/components/compound/pipe-form/content.d.mts +6 -1
- package/dist/components/compound/pipe-form/content.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/content.mjs +3 -2
- package/dist/components/compound/pipe-form/content.mjs.map +1 -1
- package/dist/components/compound/pipe-form/errors.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/errors.mjs +5 -4
- package/dist/components/compound/pipe-form/errors.mjs.map +1 -1
- package/dist/components/compound/pipe-form/root.d.mts +3 -1
- package/dist/components/compound/pipe-form/root.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/root.mjs +5 -3
- package/dist/components/compound/pipe-form/root.mjs.map +1 -1
- package/dist/components/compound/search-catalog/active-filters.mjs +1 -1
- package/dist/components/compound/search-catalog/category-filter.mjs +1 -1
- package/dist/components/compound/search-catalog/provider-filter.mjs +1 -1
- package/dist/components/compound/search-form/content.d.mts +6 -1
- package/dist/components/compound/search-form/content.d.mts.map +1 -1
- package/dist/components/compound/search-form/content.mjs +3 -2
- package/dist/components/compound/search-form/content.mjs.map +1 -1
- package/dist/components/compound/search-form/errors.d.mts.map +1 -1
- package/dist/components/compound/search-form/errors.mjs +5 -4
- package/dist/components/compound/search-form/errors.mjs.map +1 -1
- package/dist/components/compound/search-form/root.d.mts +3 -1
- package/dist/components/compound/search-form/root.d.mts.map +1 -1
- package/dist/components/compound/search-form/root.mjs +5 -3
- package/dist/components/compound/search-form/root.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/active-filters.mjs +1 -1
- package/dist/components/compound/searches-catalog/category-filter.mjs +1 -1
- package/dist/components/compound/searches-catalog/provider-filter.mjs +1 -1
- package/dist/components/defaults/adapters/context-select-input.mjs +1 -1
- package/dist/components/defaults/adapters/context-select-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/exact-range-input.mjs +1 -1
- package/dist/components/defaults/adapters/index.d.mts.map +1 -1
- package/dist/components/defaults/adapters/index.mjs +8 -5
- package/dist/components/defaults/adapters/index.mjs.map +1 -1
- package/dist/components/defaults/adapters/int-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/json-extraction-input.mjs +1 -1
- package/dist/components/defaults/adapters/loose-object-input.mjs +111 -0
- package/dist/components/defaults/adapters/loose-object-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/pipes-run-if-input.mjs +69 -56
- package/dist/components/defaults/adapters/pipes-run-if-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/providers-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/search-payload-input.mjs +18 -0
- package/dist/components/defaults/adapters/search-payload-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/select-input.mjs +46 -27
- package/dist/components/defaults/adapters/select-input.mjs.map +1 -1
- package/dist/components/defaults/catalog/card-derived.d.mts +1 -1
- package/dist/components/defaults/catalog/card-derived.d.mts.map +1 -1
- package/dist/components/defaults/catalog/card-derived.mjs +12 -6
- package/dist/components/defaults/catalog/card-derived.mjs.map +1 -1
- package/dist/components/defaults/catalog/provider-avatars.mjs +3 -3
- package/dist/components/defaults/catalog/provider-avatars.mjs.map +1 -1
- package/dist/components/defaults/form/form-empty-state.mjs +23 -0
- package/dist/components/defaults/form/form-empty-state.mjs.map +1 -0
- package/dist/components/defaults/layout/field-wrapper.d.mts.map +1 -1
- package/dist/components/defaults/layout/field-wrapper.mjs +11 -5
- package/dist/components/defaults/layout/field-wrapper.mjs.map +1 -1
- package/dist/components/defaults/layout/group.mjs +1 -1
- package/dist/components/internal/LiquidEditor/LiquidEditor.mjs +2 -2
- package/dist/components/internal/LiquidEditor/LiquidEditor.mjs.map +1 -1
- package/dist/components/internal/form-level-errors.mjs +4 -3
- package/dist/components/internal/form-level-errors.mjs.map +1 -1
- package/dist/components/internal/icons.mjs +27 -1
- package/dist/components/internal/icons.mjs.map +1 -1
- package/dist/components/ui/alert.d.mts +47 -0
- package/dist/components/ui/alert.d.mts.map +1 -0
- package/dist/components/ui/alert.mjs +66 -0
- package/dist/components/ui/alert.mjs.map +1 -0
- package/dist/context/catalog-card-context.mjs +4 -2
- package/dist/context/catalog-card-context.mjs.map +1 -1
- package/dist/context/effect-catalog-card-context.d.mts +20 -0
- package/dist/context/effect-catalog-card-context.d.mts.map +1 -0
- package/dist/context/effect-catalog-card-context.mjs +13 -0
- package/dist/context/effect-catalog-card-context.mjs.map +1 -0
- package/dist/context/effect-catalog-context.d.mts +20 -0
- package/dist/context/effect-catalog-context.d.mts.map +1 -0
- package/dist/context/effect-catalog-context.mjs +13 -0
- package/dist/context/effect-catalog-context.mjs.map +1 -0
- package/dist/context/form-context.d.mts +21 -0
- package/dist/context/form-context.d.mts.map +1 -0
- package/dist/context/form-context.mjs +11 -1
- package/dist/context/form-context.mjs.map +1 -1
- package/dist/context/form-provider.d.mts +3 -1
- package/dist/context/form-provider.d.mts.map +1 -1
- package/dist/context/form-provider.mjs +8 -2
- package/dist/context/form-provider.mjs.map +1 -1
- package/dist/hooks/use-effect-catalog-table.d.mts +33 -0
- package/dist/hooks/use-effect-catalog-table.d.mts.map +1 -0
- package/dist/hooks/use-effect-catalog-table.mjs +104 -0
- package/dist/hooks/use-effect-catalog-table.mjs.map +1 -0
- package/dist/hooks/use-form-core.mjs +8 -5
- package/dist/hooks/use-form-core.mjs.map +1 -1
- package/dist/hooks/use-pipe-catalog-table.d.mts +8 -8
- package/dist/hooks/use-pipe-catalog-table.d.mts.map +1 -1
- package/dist/hooks/use-pipe-catalog-table.mjs +2 -2
- package/dist/hooks/use-pipe-catalog-table.mjs.map +1 -1
- package/dist/hooks/use-pipe-form.d.mts.map +1 -1
- package/dist/hooks/use-pipe-form.mjs +18 -19
- package/dist/hooks/use-pipe-form.mjs.map +1 -1
- package/dist/hooks/use-search-catalog-table.d.mts +6 -6
- package/dist/hooks/use-search-form.d.mts.map +1 -1
- package/dist/hooks/use-search-form.mjs +18 -18
- package/dist/hooks/use-search-form.mjs.map +1 -1
- package/dist/hooks/use-sheet-effect-form.d.mts +35 -0
- package/dist/hooks/use-sheet-effect-form.d.mts.map +1 -0
- package/dist/hooks/use-sheet-effect-form.mjs +103 -0
- package/dist/hooks/use-sheet-effect-form.mjs.map +1 -0
- package/dist/index.d.mts +15 -3
- package/dist/index.mjs +16 -4
- package/dist/styles/pipe0-form.css +1 -1
- package/dist/types/adapters.d.mts +22 -1
- package/dist/types/adapters.d.mts.map +1 -1
- package/dist/types/catalog-adapters.d.mts +23 -3
- package/dist/types/catalog-adapters.d.mts.map +1 -1
- package/dist/types/field-props.d.mts +15 -13
- package/dist/types/field-props.d.mts.map +1 -1
- package/dist/types/form-customization.d.mts +2 -25
- package/dist/utils/build-section-handlers.mjs +9 -75
- package/dist/utils/build-section-handlers.mjs.map +1 -1
- package/dist/utils/catalog-helpers.d.mts +1 -1
- package/dist/widgets/token-pricing-badge.d.mts +1 -0
- package/dist/widgets/token-pricing-badge.mjs +55 -0
- package/dist/widgets/token-pricing-badge.mjs.map +1 -0
- package/dist/widgets/widget-strip.d.mts.map +1 -1
- package/dist/widgets/widget-strip.mjs +1 -0
- package/dist/widgets/widget-strip.mjs.map +1 -1
- package/dist/widgets/widget-view.d.mts.map +1 -1
- package/dist/widgets/widget-view.mjs +6 -0
- package/dist/widgets/widget-view.mjs.map +1 -1
- package/package.json +15 -25
- package/dist/components/defaults/adapters/key-value-list-input.mjs +0 -102
- package/dist/components/defaults/adapters/key-value-list-input.mjs.map +0 -1
- package/dist/types/form-customization.d.mts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
|
|
2
2
|
import { PipeCatalogColumnFilter } from "./column-filter.mjs";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Building2 } from "lucide-react";
|
|
5
4
|
import { getProviderEntry } from "@pipe0/base";
|
|
5
|
+
import { Building2 } from "lucide-react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/compound/pipe-catalog/provider-filter.tsx
|
|
8
8
|
const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CatalogProvider, CatalogRoot, useCatalogConfig } from "../../../context/catalog-config-context.mjs";
|
|
2
2
|
import { PipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
|
|
3
|
+
import { DefaultCatalogRoot } from "../../defaults/catalog/layout.mjs";
|
|
3
4
|
import { PipeCatalogActiveFilters } from "./active-filters.mjs";
|
|
4
5
|
import { PipeCatalogCategoryFilter } from "./category-filter.mjs";
|
|
5
|
-
import { DefaultCatalogRoot } from "../../defaults/catalog/layout.mjs";
|
|
6
6
|
import { PipeCatalogColumnFilters } from "./column-filters.mjs";
|
|
7
7
|
import { PipeCatalogEmpty } from "./empty.mjs";
|
|
8
8
|
import { PipeCatalogList } from "./list.mjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormHandle, FormSectionHandle } from "../../../types/form-handle.mjs";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import * as _$react from "react";
|
|
4
|
+
import { ReactNode } from "react";
|
|
4
5
|
import { PipePayload } from "@pipe0/base";
|
|
5
6
|
|
|
6
7
|
//#region src/components/compound/pipe-form/content.d.ts
|
|
@@ -11,11 +12,15 @@ interface PipeFormContentState {
|
|
|
11
12
|
isFieldLoaderLoading: boolean;
|
|
12
13
|
form: FormHandle<PipePayload>;
|
|
13
14
|
}
|
|
14
|
-
interface PipeFormContentProps extends useRender.ComponentProps<"div", PipeFormContentState> {
|
|
15
|
+
interface PipeFormContentProps extends useRender.ComponentProps<"div", PipeFormContentState> {
|
|
16
|
+
/** Message shown when the form has no configurable fields. */
|
|
17
|
+
emptyMessage?: ReactNode;
|
|
18
|
+
}
|
|
15
19
|
declare function PipeFormContent({
|
|
16
20
|
children,
|
|
17
21
|
className,
|
|
18
22
|
render,
|
|
23
|
+
emptyMessage,
|
|
19
24
|
...props
|
|
20
25
|
}: PipeFormContentProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
21
26
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/content.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/content.tsx"],"mappings":";;;;;;;UAUiB,oBAAA;EACf,QAAA,EAAU,iBAAA;EACV,UAAA,EAAY,GAAA;EACZ,mBAAA;EACA,oBAAA;EACA,IAAA,EAAM,UAAA,CAAW,WAAA;AAAA;AAAA,UAGF,oBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,oBAAA;EAJvB;EAMjB,YAAA,GAAe,SAAA;AAAA;AAAA,iBAGD,eAAA,CAAA;EACd,QAAA;EACA,SAAA;EACA,MAAA;EACA,YAAA;EAAA,GACG;AAAA,GACF,oBAAA,GAAoB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
2
|
+
import { FormEmptyState } from "../../defaults/form/form-empty-state.mjs";
|
|
2
3
|
import { PipeFormErrors } from "./errors.mjs";
|
|
3
4
|
import { PipeFormSection } from "./section.mjs";
|
|
4
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
@@ -6,9 +7,9 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
|
|
8
9
|
//#region src/components/compound/pipe-form/content.tsx
|
|
9
|
-
function PipeFormContent({ children, className, render, ...props }) {
|
|
10
|
+
function PipeFormContent({ children, className, render, emptyMessage, ...props }) {
|
|
10
11
|
const { sections, fieldPaths, hasFieldLoaderError, isFieldLoaderLoading, form } = usePipeFormContext();
|
|
11
|
-
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [sections.map((section, idx) => {
|
|
12
|
+
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [sections.length === 0 ? /* @__PURE__ */ jsx(FormEmptyState, { children: emptyMessage ?? "This pipe has no config options." }) : sections.map((section, idx) => {
|
|
12
13
|
const prev = idx > 0 ? sections[idx - 1] : null;
|
|
13
14
|
return /* @__PURE__ */ jsx(PipeFormSection, {
|
|
14
15
|
section,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/content.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { PipePayload } from \"@pipe0/base\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport type { FormHandle, FormSectionHandle } from \"../../../types/form-handle.js\";\nimport { PipeFormErrors } from \"./errors.js\";\nimport { PipeFormSection } from \"./section.js\";\n\nexport interface PipeFormContentState {\n sections: FormSectionHandle[];\n fieldPaths: Set<string>;\n hasFieldLoaderError: boolean;\n isFieldLoaderLoading: boolean;\n form: FormHandle<PipePayload>;\n}\n\nexport interface PipeFormContentProps\n extends useRender.ComponentProps<\"div\", PipeFormContentState> {}\n\nexport function PipeFormContent({
|
|
1
|
+
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/content.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { PipePayload } from \"@pipe0/base\";\nimport type { ReactNode } from \"react\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport type { FormHandle, FormSectionHandle } from \"../../../types/form-handle.js\";\nimport { FormEmptyState } from \"../../defaults/form/form-empty-state.js\";\nimport { PipeFormErrors } from \"./errors.js\";\nimport { PipeFormSection } from \"./section.js\";\n\nexport interface PipeFormContentState {\n sections: FormSectionHandle[];\n fieldPaths: Set<string>;\n hasFieldLoaderError: boolean;\n isFieldLoaderLoading: boolean;\n form: FormHandle<PipePayload>;\n}\n\nexport interface PipeFormContentProps\n extends useRender.ComponentProps<\"div\", PipeFormContentState> {\n /** Message shown when the form has no configurable fields. */\n emptyMessage?: ReactNode;\n}\n\nexport function PipeFormContent({\n children,\n className,\n render,\n emptyMessage,\n ...props\n}: PipeFormContentProps) {\n const { sections, fieldPaths, hasFieldLoaderError, isFieldLoaderLoading, form } =\n usePipeFormContext();\n\n // Sections that share a label (e.g. several \"I/O & conditions\" sections)\n // render under one umbrella header. We hide the label on every section\n // except the first in each contiguous cluster.\n const defaultBody = (\n <>\n {sections.length === 0 ? (\n <FormEmptyState>{emptyMessage ?? \"This pipe has no config options.\"}</FormEmptyState>\n ) : (\n sections.map((section, idx) => {\n const prev = idx > 0 ? sections[idx - 1] : null;\n const hideLabel = !!(section.label && prev && prev.label === section.label);\n return <PipeFormSection key={section.key} section={section} hideLabel={hideLabel} />;\n })\n )}\n <PipeFormErrors />\n </>\n );\n\n return useRender({\n defaultTagName: \"div\",\n render,\n state: { sections, fieldPaths, hasFieldLoaderError, isFieldLoaderLoading, form },\n stateAttributesMapping: {\n sections: () => null,\n fieldPaths: () => null,\n form: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"form-content\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;;;AAwBA,SAAgB,gBAAgB,EAC9B,UACA,WACA,QACA,cACA,GAAG,SACoB;CACvB,MAAM,EAAE,UAAU,YAAY,qBAAqB,sBAAsB,SACvE,oBAAoB;CAKtB,MAAM,cACJ,4CACG,SAAS,WAAW,IACnB,oBAAC,gBAAD,YAAiB,gBAAgB,oCAAoD,IAErF,SAAS,KAAK,SAAS,QAAQ;EAC7B,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,KAAK;AAE3C,SAAO,oBAAC,iBAAD;GAA4C;GAAS,WAD1C,CAAC,EAAE,QAAQ,SAAS,QAAQ,KAAK,UAAU,QAAQ;GACe,EAAvD,QAAQ,IAA+C;GACpF,EAEJ,oBAAC,gBAAD,EAAkB,EACjB;AAGL,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAU;GAAY;GAAqB;GAAsB;GAAM;EAChF,wBAAwB;GACtB,gBAAgB;GAChB,kBAAkB;GAClB,YAAY;GACb;EACD,OAAO,WACL;GACE;GACA,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/errors.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"errors.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/errors.tsx"],"mappings":";;;;;;UASiB,mBAAA;EACf,mBAAA;EACA,UAAA,EAAY,GAAA;EACZ,IAAA,EAAM,UAAA,CAAW,WAAA;AAAA;AAAA,UAGF,mBAAA,SAA4B,SAAA,CAAU,cAAA,QAAsB,mBAAA;;;;;;;iBAQ7D,cAAA,CAAA;EAAiB,QAAA;EAAU,SAAA;EAAW,MAAA;EAAA,GAAW;AAAA,GAAS,mBAAA,GAAmB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
2
|
+
import { useFormAlert } from "../../../context/form-context.mjs";
|
|
2
3
|
import { asInternalForm } from "../../../utils/internal-form.mjs";
|
|
3
4
|
import { FormLevelErrors } from "../../internal/form-level-errors.mjs";
|
|
4
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
@@ -14,11 +15,11 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
15
|
*/
|
|
15
16
|
function PipeFormErrors({ children, className, render, ...props }) {
|
|
16
17
|
const { hasFieldLoaderError, fieldPaths, form } = usePipeFormContext();
|
|
17
|
-
const
|
|
18
|
+
const Alert = useFormAlert();
|
|
19
|
+
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [hasFieldLoaderError && /* @__PURE__ */ jsx(Alert, {
|
|
20
|
+
variant: "error",
|
|
18
21
|
"data-p0": "store-error",
|
|
19
|
-
|
|
20
|
-
className: "pz:flex pz:flex-col pz:gap-1 pz:rounded-md pz:border pz:border-destructive/50 pz:bg-destructive/5 pz:px-3 pz:py-2 pz:text-destructive pz:text-xs pz:font-medium",
|
|
21
|
-
children: /* @__PURE__ */ jsx("span", { children: "Failed to load options for one or more fields. Check that your connection is valid." })
|
|
22
|
+
children: "Failed to load options for one or more fields. Check that your connection is valid."
|
|
22
23
|
}), /* @__PURE__ */ jsx(FormLevelErrors, {
|
|
23
24
|
control: asInternalForm(form).control,
|
|
24
25
|
fieldPaths
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/errors.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { PipePayload } from \"@pipe0/base\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { asInternalForm } from \"../../../utils/internal-form.js\";\nimport { FormLevelErrors } from \"../../internal/form-level-errors.js\";\n\nexport interface PipeFormErrorsState {\n hasFieldLoaderError: boolean;\n fieldPaths: Set<string>;\n form: FormHandle<PipePayload>;\n}\n\nexport interface PipeFormErrorsProps extends useRender.ComponentProps<\"div\", PipeFormErrorsState> {}\n\n/**\n * Renders form-wide errors that don't belong to a specific visible field:\n * the field-loader banner (when a resolver fails to load options for a\n * field) and form-level validation errors (errors not attached to any\n * rendered field).\n */\nexport function PipeFormErrors({ children, className, render, ...props }: PipeFormErrorsProps) {\n const { hasFieldLoaderError, fieldPaths, form } = usePipeFormContext();\n\n const defaultBody = (\n <>\n {hasFieldLoaderError && (\n <
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/errors.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { PipePayload } from \"@pipe0/base\";\nimport { useFormAlert } from \"../../../context/form-context.js\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { asInternalForm } from \"../../../utils/internal-form.js\";\nimport { FormLevelErrors } from \"../../internal/form-level-errors.js\";\n\nexport interface PipeFormErrorsState {\n hasFieldLoaderError: boolean;\n fieldPaths: Set<string>;\n form: FormHandle<PipePayload>;\n}\n\nexport interface PipeFormErrorsProps extends useRender.ComponentProps<\"div\", PipeFormErrorsState> {}\n\n/**\n * Renders form-wide errors that don't belong to a specific visible field:\n * the field-loader banner (when a resolver fails to load options for a\n * field) and form-level validation errors (errors not attached to any\n * rendered field).\n */\nexport function PipeFormErrors({ children, className, render, ...props }: PipeFormErrorsProps) {\n const { hasFieldLoaderError, fieldPaths, form } = usePipeFormContext();\n const Alert = useFormAlert();\n\n const defaultBody = (\n <>\n {hasFieldLoaderError && (\n <Alert variant=\"error\" data-p0=\"store-error\">\n Failed to load options for one or more fields. Check that your connection is valid.\n </Alert>\n )}\n <FormLevelErrors control={asInternalForm(form).control} fieldPaths={fieldPaths} />\n </>\n );\n\n return useRender({\n defaultTagName: \"div\",\n render,\n state: { hasFieldLoaderError, fieldPaths, form },\n stateAttributesMapping: {\n fieldPaths: () => null,\n form: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"form-errors\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,SAAgB,eAAe,EAAE,UAAU,WAAW,QAAQ,GAAG,SAA8B;CAC7F,MAAM,EAAE,qBAAqB,YAAY,SAAS,oBAAoB;CACtE,MAAM,QAAQ,cAAc;CAE5B,MAAM,cACJ,4CACG,uBACC,oBAAC,OAAD;EAAO,SAAQ;EAAQ,WAAQ;YAAc;EAErC,GAEV,oBAAC,iBAAD;EAAiB,SAAS,eAAe,KAAK,CAAC;EAAqB;EAAc,EACjF;AAGL,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAqB;GAAY;GAAM;EAChD,wBAAwB;GACtB,kBAAkB;GAClB,YAAY;GACb;EACD,OAAO,WACL;GACE;GACA,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormHandle } from "../../../types/form-handle.mjs";
|
|
2
2
|
import { PipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
3
|
-
import { FieldAdapterMap, FormClassNames } from "../../../types/adapters.mjs";
|
|
3
|
+
import { FieldAdapterMap, FormClassNames, FormComponents } from "../../../types/adapters.mjs";
|
|
4
4
|
import { GroupMap, PathMap, SectionMap } from "../../../types/form-customization.mjs";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -13,6 +13,8 @@ type PipeFormSubmitHandler = (payload: PipePayload, ctx: {
|
|
|
13
13
|
interface RenderingProps {
|
|
14
14
|
classNames?: FormClassNames;
|
|
15
15
|
adapters?: FieldAdapterMap;
|
|
16
|
+
/** Whole-component overrides (e.g. `alert`). Forwarded to `FormProvider`. */
|
|
17
|
+
components?: FormComponents;
|
|
16
18
|
className?: string;
|
|
17
19
|
}
|
|
18
20
|
interface PipeFormInstanceProps extends RenderingProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"mappings":";;;;;;;;;KAoBY,qBAAA,IACV,OAAA,EAAS,WAAA,EACT,GAAA;EAAO,IAAA,EAAM,UAAA,CAAW,WAAA;AAAA,aACd,OAAA;AAAA,UAEF,cAAA;EACR,UAAA,GAAa,cAAA;EACb,QAAA,GAAW,eAAA;
|
|
1
|
+
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"mappings":";;;;;;;;;KAoBY,qBAAA,IACV,OAAA,EAAS,WAAA,EACT,GAAA;EAAO,IAAA,EAAM,UAAA,CAAW,WAAA;AAAA,aACd,OAAA;AAAA,UAEF,cAAA;EACR,UAAA,GAAa,cAAA;EACb,QAAA,GAAW,eAAA;EANF;EAQT,UAAA,GAAa,cAAA;EACb,SAAA;AAAA;AAAA,UAGe,qBAAA,SAA8B,cAAA;EAC7C,OAAA,EAAS,eAAA;EACT,QAAA,EAAU,qBAAA;EACV,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,uBAAA,SAAgC,cAAA;EAC/C,MAAA,EAAQ,MAAA;EACR,SAAA;EACA,QAAA,EAAU,qBAAA;EACV,aAAA,GAAgB,WAAA;EAChB,iBAAA,GAAoB,iBAAA;EACpB,SAAA,GAAY,aAAA;EApBU;;;;;EA0BtB,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,QAAA;EACX,OAAA,GAAU,OAAA;EA3BG;;;;EAgCb,MAAA;EA5BA;;;AAGF;EA8BE,MAAA;EACA,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,aAAA,GAAgB,qBAAA,GAAwB,uBAAA;;;;;;;;;;iBAWpC,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -27,7 +27,7 @@ function PipeFormZeroConfig({ pipeId, publicKey, defaultValues, onSubmit, resolv
|
|
|
27
27
|
config: { environment: "production" },
|
|
28
28
|
pipes: [],
|
|
29
29
|
input: []
|
|
30
|
-
}), children, classNames, adapters, className }) {
|
|
30
|
+
}), children, classNames, adapters, components, className }) {
|
|
31
31
|
return /* @__PURE__ */ jsx(PipeFormWithContext, {
|
|
32
32
|
context: usePipeForm({
|
|
33
33
|
pipeId,
|
|
@@ -45,11 +45,12 @@ function PipeFormZeroConfig({ pipeId, publicKey, defaultValues, onSubmit, resolv
|
|
|
45
45
|
className,
|
|
46
46
|
classNames,
|
|
47
47
|
adapters,
|
|
48
|
+
components,
|
|
48
49
|
children
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
function PipeFormWithContext({ context, onSubmit, children, className, classNames, adapters }) {
|
|
52
|
-
const hasLocalOverrides = classNames || adapters;
|
|
52
|
+
function PipeFormWithContext({ context, onSubmit, children, className, classNames, adapters, components }) {
|
|
53
|
+
const hasLocalOverrides = classNames || adapters || components;
|
|
53
54
|
const inner = /* @__PURE__ */ jsx(PipeFormContext.Provider, {
|
|
54
55
|
value: context,
|
|
55
56
|
children: /* @__PURE__ */ jsx(PipeFormShell, {
|
|
@@ -61,6 +62,7 @@ function PipeFormWithContext({ context, onSubmit, children, className, className
|
|
|
61
62
|
if (hasLocalOverrides) return /* @__PURE__ */ jsx(FormRoot, { children: /* @__PURE__ */ jsx(FormProvider, {
|
|
62
63
|
classNames,
|
|
63
64
|
adapters,
|
|
65
|
+
components,
|
|
64
66
|
children: inner
|
|
65
67
|
}) });
|
|
66
68
|
return /* @__PURE__ */ jsx(FormRoot, { children: inner });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"sourcesContent":["import {\n type FormResolvers,\n type PipeId,\n type PipePayload,\n type ValidationContext,\n validatePipesOrError,\n} from \"@pipe0/base\";\nimport { type ReactNode, useCallback, useState } from \"react\";\nimport { FormProvider, FormRoot } from \"../../../context/form-provider.js\";\nimport type { PipeFormContext as PipeFormContextValue } from \"../../../context/pipe-form-context.js\";\nimport { PipeFormContext, usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport { PortalContainerContext } from \"../../../context/portal-container-context.js\";\nimport { usePipeForm } from \"../../../hooks/use-pipe-form.js\";\nimport type { FieldAdapterMap, FormClassNames } from \"../../../types/adapters.js\";\nimport type { GroupMap, PathMap, SectionMap } from \"../../../types/form-customization.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { DefaultForm } from \"../../defaults/layout/form.js\";\nimport { PipeFormContent } from \"./content.js\";\nimport { PipeFormSubmitButton } from \"./submit-button.js\";\n\nexport type PipeFormSubmitHandler = (\n payload: PipePayload,\n ctx: { form: FormHandle<PipePayload> },\n) => void | Promise<void>;\n\ninterface RenderingProps {\n classNames?: FormClassNames;\n adapters?: FieldAdapterMap;\n className?: string;\n}\n\nexport interface PipeFormInstanceProps extends RenderingProps {\n context: PipeFormContextValue;\n onSubmit: PipeFormSubmitHandler;\n children?: ReactNode;\n}\n\nexport interface PipeFormZeroConfigProps extends RenderingProps {\n pipeId: PipeId;\n publicKey: string;\n onSubmit: PipeFormSubmitHandler;\n defaultValues?: PipePayload;\n validationContext?: ValidationContext;\n resolvers?: FormResolvers;\n /**\n * Hide / relabel / reorder sections by section key. `null` hides a section.\n * Forwarded to the internal `usePipeForm` call. For `<PipeForm context={...}>`,\n * pass these to `usePipeForm` directly instead.\n */\n sectionMap?: SectionMap;\n groupMap?: GroupMap;\n pathMap?: PathMap;\n /**\n * Form-level scope tags. Bundled into every `resolvers.getSecrets` call so\n * the backend can return only the secrets allowed in the declared scopes.\n */\n scopes?: string[];\n /**\n * Current team context. Bundled into every `resolvers.getSecrets` call so\n * the backend can restrict team-level secrets to this team only.\n */\n teamId?: string;\n children?: ReactNode;\n}\n\nexport type PipeFormProps = PipeFormInstanceProps | PipeFormZeroConfigProps;\n\n/**\n * Compound root for pipe forms.\n *\n * Two modes:\n * - Compound: `<PipeForm context={ctx} onSubmit={...}>...</PipeForm>` — pass the context from `usePipeForm`.\n * Visibility customization (`sectionMap`/`groupMap`/`pathMap`) lives on the hook in this mode.\n * - Zero-config: `<PipeForm pipeId=\"...\" publicKey=\"...\" onSubmit={...} />` — fresh hook created\n * internally; visibility maps may be passed as props and forward to that hook.\n */\nexport function PipeForm(props: PipeFormProps) {\n if (\"context\" in props) {\n return <PipeFormWithContext {...props} />;\n }\n return <PipeFormZeroConfig {...props} />;\n}\n\nfunction PipeFormZeroConfig({\n pipeId,\n publicKey,\n defaultValues,\n onSubmit,\n resolvers,\n scopes,\n teamId,\n sectionMap,\n groupMap,\n pathMap,\n validationContext = validatePipesOrError({\n config: { environment: \"production\" },\n pipes: [],\n input: [],\n }),\n children,\n classNames,\n adapters,\n className,\n}: PipeFormZeroConfigProps) {\n const context = usePipeForm({\n pipeId,\n publicKey,\n defaultValues,\n resolvers,\n scopes,\n teamId,\n validationContext,\n sectionMap,\n groupMap,\n pathMap,\n });\n\n return (\n <PipeFormWithContext\n context={context}\n onSubmit={onSubmit}\n className={className}\n classNames={classNames}\n adapters={adapters}\n >\n {children}\n </PipeFormWithContext>\n );\n}\n\nfunction PipeFormWithContext({\n context,\n onSubmit,\n children,\n className,\n classNames,\n adapters,\n}: PipeFormInstanceProps) {\n const hasLocalOverrides = classNames || adapters;\n\n const inner = (\n <PipeFormContext.Provider value={context}>\n <PipeFormShell className={className} onSubmit={onSubmit}>\n {children}\n </PipeFormShell>\n </PipeFormContext.Provider>\n );\n\n if (hasLocalOverrides) {\n return (\n <FormRoot>\n <FormProvider classNames={classNames} adapters={adapters}>\n {inner}\n </FormProvider>\n </FormRoot>\n );\n }\n\n return <FormRoot>{inner}</FormRoot>;\n}\n\nfunction PipeFormShell({\n children,\n className,\n onSubmit,\n}: {\n children?: ReactNode;\n className?: string;\n onSubmit: PipeFormSubmitHandler;\n}) {\n const context = usePipeFormContext();\n\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n const portalRef = useCallback((node: HTMLElement | null) => {\n setPortalContainer(node);\n }, []);\n\n const body = children ?? (\n <>\n <PipeFormContent />\n <PipeFormSubmitButton />\n </>\n );\n\n const handleFormSubmit = context.form.handleSubmit(async (values) => {\n await onSubmit(values, { form: context.form });\n });\n\n return (\n <DefaultForm\n onSubmit={handleFormSubmit}\n ref={portalRef}\n data-p0=\"form\"\n data-p0-pipe={context.id}\n className={className}\n >\n <PortalContainerContext.Provider value={portalContainer}>\n {body}\n </PortalContainerContext.Provider>\n </DefaultForm>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"sourcesContent":["import {\n type FormResolvers,\n type PipeId,\n type PipePayload,\n type ValidationContext,\n validatePipesOrError,\n} from \"@pipe0/base\";\nimport { type ReactNode, useCallback, useState } from \"react\";\nimport { FormProvider, FormRoot } from \"../../../context/form-provider.js\";\nimport type { PipeFormContext as PipeFormContextValue } from \"../../../context/pipe-form-context.js\";\nimport { PipeFormContext, usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport { PortalContainerContext } from \"../../../context/portal-container-context.js\";\nimport { usePipeForm } from \"../../../hooks/use-pipe-form.js\";\nimport type { FieldAdapterMap, FormClassNames, FormComponents } from \"../../../types/adapters.js\";\nimport type { GroupMap, PathMap, SectionMap } from \"../../../types/form-customization.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { DefaultForm } from \"../../defaults/layout/form.js\";\nimport { PipeFormContent } from \"./content.js\";\nimport { PipeFormSubmitButton } from \"./submit-button.js\";\n\nexport type PipeFormSubmitHandler = (\n payload: PipePayload,\n ctx: { form: FormHandle<PipePayload> },\n) => void | Promise<void>;\n\ninterface RenderingProps {\n classNames?: FormClassNames;\n adapters?: FieldAdapterMap;\n /** Whole-component overrides (e.g. `alert`). Forwarded to `FormProvider`. */\n components?: FormComponents;\n className?: string;\n}\n\nexport interface PipeFormInstanceProps extends RenderingProps {\n context: PipeFormContextValue;\n onSubmit: PipeFormSubmitHandler;\n children?: ReactNode;\n}\n\nexport interface PipeFormZeroConfigProps extends RenderingProps {\n pipeId: PipeId;\n publicKey: string;\n onSubmit: PipeFormSubmitHandler;\n defaultValues?: PipePayload;\n validationContext?: ValidationContext;\n resolvers?: FormResolvers;\n /**\n * Hide / relabel / reorder sections by section key. `null` hides a section.\n * Forwarded to the internal `usePipeForm` call. For `<PipeForm context={...}>`,\n * pass these to `usePipeForm` directly instead.\n */\n sectionMap?: SectionMap;\n groupMap?: GroupMap;\n pathMap?: PathMap;\n /**\n * Form-level scope tags. Bundled into every `resolvers.getSecrets` call so\n * the backend can return only the secrets allowed in the declared scopes.\n */\n scopes?: string[];\n /**\n * Current team context. Bundled into every `resolvers.getSecrets` call so\n * the backend can restrict team-level secrets to this team only.\n */\n teamId?: string;\n children?: ReactNode;\n}\n\nexport type PipeFormProps = PipeFormInstanceProps | PipeFormZeroConfigProps;\n\n/**\n * Compound root for pipe forms.\n *\n * Two modes:\n * - Compound: `<PipeForm context={ctx} onSubmit={...}>...</PipeForm>` — pass the context from `usePipeForm`.\n * Visibility customization (`sectionMap`/`groupMap`/`pathMap`) lives on the hook in this mode.\n * - Zero-config: `<PipeForm pipeId=\"...\" publicKey=\"...\" onSubmit={...} />` — fresh hook created\n * internally; visibility maps may be passed as props and forward to that hook.\n */\nexport function PipeForm(props: PipeFormProps) {\n if (\"context\" in props) {\n return <PipeFormWithContext {...props} />;\n }\n return <PipeFormZeroConfig {...props} />;\n}\n\nfunction PipeFormZeroConfig({\n pipeId,\n publicKey,\n defaultValues,\n onSubmit,\n resolvers,\n scopes,\n teamId,\n sectionMap,\n groupMap,\n pathMap,\n validationContext = validatePipesOrError({\n config: { environment: \"production\" },\n pipes: [],\n input: [],\n }),\n children,\n classNames,\n adapters,\n components,\n className,\n}: PipeFormZeroConfigProps) {\n const context = usePipeForm({\n pipeId,\n publicKey,\n defaultValues,\n resolvers,\n scopes,\n teamId,\n validationContext,\n sectionMap,\n groupMap,\n pathMap,\n });\n\n return (\n <PipeFormWithContext\n context={context}\n onSubmit={onSubmit}\n className={className}\n classNames={classNames}\n adapters={adapters}\n components={components}\n >\n {children}\n </PipeFormWithContext>\n );\n}\n\nfunction PipeFormWithContext({\n context,\n onSubmit,\n children,\n className,\n classNames,\n adapters,\n components,\n}: PipeFormInstanceProps) {\n const hasLocalOverrides = classNames || adapters || components;\n\n const inner = (\n <PipeFormContext.Provider value={context}>\n <PipeFormShell className={className} onSubmit={onSubmit}>\n {children}\n </PipeFormShell>\n </PipeFormContext.Provider>\n );\n\n if (hasLocalOverrides) {\n return (\n <FormRoot>\n <FormProvider classNames={classNames} adapters={adapters} components={components}>\n {inner}\n </FormProvider>\n </FormRoot>\n );\n }\n\n return <FormRoot>{inner}</FormRoot>;\n}\n\nfunction PipeFormShell({\n children,\n className,\n onSubmit,\n}: {\n children?: ReactNode;\n className?: string;\n onSubmit: PipeFormSubmitHandler;\n}) {\n const context = usePipeFormContext();\n\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n const portalRef = useCallback((node: HTMLElement | null) => {\n setPortalContainer(node);\n }, []);\n\n const body = children ?? (\n <>\n <PipeFormContent />\n <PipeFormSubmitButton />\n </>\n );\n\n const handleFormSubmit = context.form.handleSubmit(async (values) => {\n await onSubmit(values, { form: context.form });\n });\n\n return (\n <DefaultForm\n onSubmit={handleFormSubmit}\n ref={portalRef}\n data-p0=\"form\"\n data-p0-pipe={context.id}\n className={className}\n >\n <PortalContainerContext.Provider value={portalContainer}>\n {body}\n </PortalContainerContext.Provider>\n </DefaultForm>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8EA,SAAgB,SAAS,OAAsB;AAC7C,KAAI,aAAa,MACf,QAAO,oBAAC,qBAAD,EAAqB,GAAI,OAAS;AAE3C,QAAO,oBAAC,oBAAD,EAAoB,GAAI,OAAS;;AAG1C,SAAS,mBAAmB,EAC1B,QACA,WACA,eACA,UACA,WACA,QACA,QACA,YACA,UACA,SACA,oBAAoB,qBAAqB;CACvC,QAAQ,EAAE,aAAa,cAAc;CACrC,OAAO,EAAE;CACT,OAAO,EAAE;CACV,CAAC,EACF,UACA,YACA,UACA,YACA,aAC0B;AAc1B,QACE,oBAAC,qBAAD;EACE,SAfY,YAAY;GAC1B;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;EAKY;EACC;EACC;EACF;EACE;EAEX;EACmB;;AAI1B,SAAS,oBAAoB,EAC3B,SACA,UACA,UACA,WACA,YACA,UACA,cACwB;CACxB,MAAM,oBAAoB,cAAc,YAAY;CAEpD,MAAM,QACJ,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;YAC/B,oBAAC,eAAD;GAA0B;GAAqB;GAC5C;GACa;EACS;AAG7B,KAAI,kBACF,QACE,oBAAC,UAAD,YACE,oBAAC,cAAD;EAA0B;EAAsB;EAAsB;YACnE;EACY,GACN;AAIf,QAAO,oBAAC,UAAD,YAAW,OAAiB;;AAGrC,SAAS,cAAc,EACrB,UACA,WACA,YAKC;CACD,MAAM,UAAU,oBAAoB;CAEpC,MAAM,CAAC,iBAAiB,sBAAsB,SAA6B,KAAK;CAChF,MAAM,YAAY,aAAa,SAA6B;AAC1D,qBAAmB,KAAK;IACvB,EAAE,CAAC;CAEN,MAAM,OAAO,YACX,8CACE,oBAAC,iBAAD,EAAmB,GACnB,oBAAC,sBAAD,EAAwB,EACvB;AAOL,QACE,oBAAC,aAAD;EACE,UANqB,QAAQ,KAAK,aAAa,OAAO,WAAW;AACnE,SAAM,SAAS,QAAQ,EAAE,MAAM,QAAQ,MAAM,CAAC;IAC9C;EAKE,KAAK;EACL,WAAQ;EACR,gBAAc,QAAQ;EACX;YAEX,oBAAC,uBAAuB,UAAxB;GAAiC,OAAO;aACrC;GAC+B;EACtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.mjs";
|
|
2
2
|
import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
|
|
3
|
-
import { DefaultActiveFilterPill } from "../../defaults/catalog/active-filter-pill.mjs";
|
|
4
3
|
import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
|
|
4
|
+
import { DefaultActiveFilterPill } from "../../defaults/catalog/active-filter-pill.mjs";
|
|
5
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -3,8 +3,8 @@ import { DefaultCategoryFilter } from "../../defaults/catalog/category-filter.mj
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { Building2, Database, Table, User, X } from "lucide-react";
|
|
7
6
|
import { getSearchCategoryEntries } from "@pipe0/base";
|
|
7
|
+
import { Building2, Database, Table, User, X } from "lucide-react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/compound/search-catalog/category-filter.tsx
|
|
10
10
|
const SEARCH_CATEGORY_ICONS = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
|
|
2
2
|
import { SearchCatalogColumnFilter } from "./column-filter.mjs";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Building2 } from "lucide-react";
|
|
5
4
|
import { getProviderEntry } from "@pipe0/base";
|
|
5
|
+
import { Building2 } from "lucide-react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/compound/search-catalog/provider-filter.tsx
|
|
8
8
|
const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormHandle, FormSectionHandle } from "../../../types/form-handle.mjs";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import * as _$react from "react";
|
|
4
|
+
import { ReactNode } from "react";
|
|
4
5
|
import { SearchPayload } from "@pipe0/base";
|
|
5
6
|
|
|
6
7
|
//#region src/components/compound/search-form/content.d.ts
|
|
@@ -11,11 +12,15 @@ interface SearchFormContentState {
|
|
|
11
12
|
isFieldLoaderLoading: boolean;
|
|
12
13
|
form: FormHandle<SearchPayload>;
|
|
13
14
|
}
|
|
14
|
-
interface SearchFormContentProps extends useRender.ComponentProps<"div", SearchFormContentState> {
|
|
15
|
+
interface SearchFormContentProps extends useRender.ComponentProps<"div", SearchFormContentState> {
|
|
16
|
+
/** Message shown when the form has no configurable fields. */
|
|
17
|
+
emptyMessage?: ReactNode;
|
|
18
|
+
}
|
|
15
19
|
declare function SearchFormContent({
|
|
16
20
|
children,
|
|
17
21
|
className,
|
|
18
22
|
render,
|
|
23
|
+
emptyMessage,
|
|
19
24
|
...props
|
|
20
25
|
}: SearchFormContentProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
21
26
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"mappings":";;;;;;;UAUiB,sBAAA;EACf,QAAA,EAAU,iBAAA;EACV,UAAA,EAAY,GAAA;EACZ,mBAAA;EACA,oBAAA;EACA,IAAA,EAAM,UAAA,CAAW,aAAA;AAAA;AAAA,UAGF,sBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,sBAAA;EAJvB;EAMjB,YAAA,GAAe,SAAA;AAAA;AAAA,iBAGD,iBAAA,CAAA;EACd,QAAA;EACA,SAAA;EACA,MAAA;EACA,YAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FormEmptyState } from "../../defaults/form/form-empty-state.mjs";
|
|
1
2
|
import { useSearchFormContext } from "../../../context/search-form-context.mjs";
|
|
2
3
|
import { SearchFormErrors } from "./errors.mjs";
|
|
3
4
|
import { SearchFormSection } from "./section.mjs";
|
|
@@ -6,9 +7,9 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
|
|
8
9
|
//#region src/components/compound/search-form/content.tsx
|
|
9
|
-
function SearchFormContent({ children, className, render, ...props }) {
|
|
10
|
+
function SearchFormContent({ children, className, render, emptyMessage, ...props }) {
|
|
10
11
|
const { sections, fieldPaths, hasFieldLoaderError, isFieldLoaderLoading, form } = useSearchFormContext();
|
|
11
|
-
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [sections.map((section, idx) => {
|
|
12
|
+
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [sections.length === 0 ? /* @__PURE__ */ jsx(FormEmptyState, { children: emptyMessage ?? "This search has no config options." }) : sections.map((section, idx) => {
|
|
12
13
|
const prev = idx > 0 ? sections[idx - 1] : null;
|
|
13
14
|
return /* @__PURE__ */ jsx(SearchFormSection, {
|
|
14
15
|
section,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { SearchPayload } from \"@pipe0/base\";\nimport { useSearchFormContext } from \"../../../context/search-form-context.js\";\nimport type { FormHandle, FormSectionHandle } from \"../../../types/form-handle.js\";\nimport { SearchFormErrors } from \"./errors.js\";\nimport { SearchFormSection } from \"./section.js\";\n\nexport interface SearchFormContentState {\n sections: FormSectionHandle[];\n fieldPaths: Set<string>;\n hasFieldLoaderError: boolean;\n isFieldLoaderLoading: boolean;\n form: FormHandle<SearchPayload>;\n}\n\nexport interface SearchFormContentProps\n extends useRender.ComponentProps<\"div\", SearchFormContentState> {}\n\nexport function SearchFormContent({\n children,\n className,\n render,\n ...props\n}: SearchFormContentProps) {\n const { sections, fieldPaths, hasFieldLoaderError, isFieldLoaderLoading, form } =\n useSearchFormContext();\n\n // Sections that share a label render under one umbrella header.\n // Hide the label on every section except the first in each contiguous cluster.\n const defaultBody = (\n <>\n {sections.map((section, idx) => {\n
|
|
1
|
+
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { SearchPayload } from \"@pipe0/base\";\nimport type { ReactNode } from \"react\";\nimport { useSearchFormContext } from \"../../../context/search-form-context.js\";\nimport type { FormHandle, FormSectionHandle } from \"../../../types/form-handle.js\";\nimport { FormEmptyState } from \"../../defaults/form/form-empty-state.js\";\nimport { SearchFormErrors } from \"./errors.js\";\nimport { SearchFormSection } from \"./section.js\";\n\nexport interface SearchFormContentState {\n sections: FormSectionHandle[];\n fieldPaths: Set<string>;\n hasFieldLoaderError: boolean;\n isFieldLoaderLoading: boolean;\n form: FormHandle<SearchPayload>;\n}\n\nexport interface SearchFormContentProps\n extends useRender.ComponentProps<\"div\", SearchFormContentState> {\n /** Message shown when the form has no configurable fields. */\n emptyMessage?: ReactNode;\n}\n\nexport function SearchFormContent({\n children,\n className,\n render,\n emptyMessage,\n ...props\n}: SearchFormContentProps) {\n const { sections, fieldPaths, hasFieldLoaderError, isFieldLoaderLoading, form } =\n useSearchFormContext();\n\n // Sections that share a label render under one umbrella header.\n // Hide the label on every section except the first in each contiguous cluster.\n const defaultBody = (\n <>\n {sections.length === 0 ? (\n <FormEmptyState>{emptyMessage ?? \"This search has no config options.\"}</FormEmptyState>\n ) : (\n sections.map((section, idx) => {\n const prev = idx > 0 ? sections[idx - 1] : null;\n const hideLabel = !!(section.label && prev && prev.label === section.label);\n return <SearchFormSection key={section.key} section={section} hideLabel={hideLabel} />;\n })\n )}\n <SearchFormErrors />\n </>\n );\n\n return useRender({\n defaultTagName: \"div\",\n render,\n state: { sections, fieldPaths, hasFieldLoaderError, isFieldLoaderLoading, form },\n stateAttributesMapping: {\n sections: () => null,\n fieldPaths: () => null,\n form: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"form-content\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;;;AAwBA,SAAgB,kBAAkB,EAChC,UACA,WACA,QACA,cACA,GAAG,SACsB;CACzB,MAAM,EAAE,UAAU,YAAY,qBAAqB,sBAAsB,SACvE,sBAAsB;CAIxB,MAAM,cACJ,4CACG,SAAS,WAAW,IACnB,oBAAC,gBAAD,YAAiB,gBAAgB,sCAAsD,IAEvF,SAAS,KAAK,SAAS,QAAQ;EAC7B,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,KAAK;AAE3C,SAAO,oBAAC,mBAAD;GAA8C;GAAS,WAD5C,CAAC,EAAE,QAAQ,SAAS,QAAQ,KAAK,UAAU,QAAQ;GACiB,EAAvD,QAAQ,IAA+C;GACtF,EAEJ,oBAAC,kBAAD,EAAoB,EACnB;AAGL,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAU;GAAY;GAAqB;GAAsB;GAAM;EAChF,wBAAwB;GACtB,gBAAgB;GAChB,kBAAkB;GAClB,YAAY;GACb;EACD,OAAO,WACL;GACE;GACA,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/errors.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"errors.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/errors.tsx"],"mappings":";;;;;;UASiB,qBAAA;EACf,mBAAA;EACA,UAAA,EAAY,GAAA;EACZ,IAAA,EAAM,UAAA,CAAW,aAAA;AAAA;AAAA,UAGF,qBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,qBAAA;;;;;;;iBAQ1B,gBAAA,CAAA;EAAmB,QAAA;EAAU,SAAA;EAAW,MAAA;EAAA,GAAW;AAAA,GAAS,qBAAA,GAAqB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useFormAlert } from "../../../context/form-context.mjs";
|
|
1
2
|
import { asInternalForm } from "../../../utils/internal-form.mjs";
|
|
2
3
|
import { FormLevelErrors } from "../../internal/form-level-errors.mjs";
|
|
3
4
|
import { useSearchFormContext } from "../../../context/search-form-context.mjs";
|
|
@@ -14,11 +15,11 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
15
|
*/
|
|
15
16
|
function SearchFormErrors({ children, className, render, ...props }) {
|
|
16
17
|
const { hasFieldLoaderError, fieldPaths, form } = useSearchFormContext();
|
|
17
|
-
const
|
|
18
|
+
const Alert = useFormAlert();
|
|
19
|
+
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [hasFieldLoaderError && /* @__PURE__ */ jsx(Alert, {
|
|
20
|
+
variant: "error",
|
|
18
21
|
"data-p0": "store-error",
|
|
19
|
-
|
|
20
|
-
className: "pz:flex pz:flex-col pz:gap-1 pz:rounded-md pz:border pz:border-destructive/50 pz:bg-destructive/5 pz:px-3 pz:py-2 pz:text-destructive pz:text-xs pz:font-medium",
|
|
21
|
-
children: /* @__PURE__ */ jsx("span", { children: "Failed to load options for one or more fields. Check that your connection is valid." })
|
|
22
|
+
children: "Failed to load options for one or more fields. Check that your connection is valid."
|
|
22
23
|
}), /* @__PURE__ */ jsx(FormLevelErrors, {
|
|
23
24
|
control: asInternalForm(form).control,
|
|
24
25
|
fieldPaths
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../../src/components/compound/search-form/errors.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { SearchPayload } from \"@pipe0/base\";\nimport { useSearchFormContext } from \"../../../context/search-form-context.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { asInternalForm } from \"../../../utils/internal-form.js\";\nimport { FormLevelErrors } from \"../../internal/form-level-errors.js\";\n\nexport interface SearchFormErrorsState {\n hasFieldLoaderError: boolean;\n fieldPaths: Set<string>;\n form: FormHandle<SearchPayload>;\n}\n\nexport interface SearchFormErrorsProps\n extends useRender.ComponentProps<\"div\", SearchFormErrorsState> {}\n\n/**\n * Renders form-wide errors that don't belong to a specific visible field:\n * the field-loader banner (when a resolver fails to load options for a\n * field) and form-level validation errors (errors not attached to any\n * rendered field).\n */\nexport function SearchFormErrors({ children, className, render, ...props }: SearchFormErrorsProps) {\n const { hasFieldLoaderError, fieldPaths, form } = useSearchFormContext();\n\n const defaultBody = (\n <>\n {hasFieldLoaderError && (\n <
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../../src/components/compound/search-form/errors.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { SearchPayload } from \"@pipe0/base\";\nimport { useFormAlert } from \"../../../context/form-context.js\";\nimport { useSearchFormContext } from \"../../../context/search-form-context.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { asInternalForm } from \"../../../utils/internal-form.js\";\nimport { FormLevelErrors } from \"../../internal/form-level-errors.js\";\n\nexport interface SearchFormErrorsState {\n hasFieldLoaderError: boolean;\n fieldPaths: Set<string>;\n form: FormHandle<SearchPayload>;\n}\n\nexport interface SearchFormErrorsProps\n extends useRender.ComponentProps<\"div\", SearchFormErrorsState> {}\n\n/**\n * Renders form-wide errors that don't belong to a specific visible field:\n * the field-loader banner (when a resolver fails to load options for a\n * field) and form-level validation errors (errors not attached to any\n * rendered field).\n */\nexport function SearchFormErrors({ children, className, render, ...props }: SearchFormErrorsProps) {\n const { hasFieldLoaderError, fieldPaths, form } = useSearchFormContext();\n const Alert = useFormAlert();\n\n const defaultBody = (\n <>\n {hasFieldLoaderError && (\n <Alert variant=\"error\" data-p0=\"store-error\">\n Failed to load options for one or more fields. Check that your connection is valid.\n </Alert>\n )}\n <FormLevelErrors control={asInternalForm(form).control} fieldPaths={fieldPaths} />\n </>\n );\n\n return useRender({\n defaultTagName: \"div\",\n render,\n state: { hasFieldLoaderError, fieldPaths, form },\n stateAttributesMapping: {\n fieldPaths: () => null,\n form: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"form-errors\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,SAAgB,iBAAiB,EAAE,UAAU,WAAW,QAAQ,GAAG,SAAgC;CACjG,MAAM,EAAE,qBAAqB,YAAY,SAAS,sBAAsB;CACxE,MAAM,QAAQ,cAAc;CAE5B,MAAM,cACJ,4CACG,uBACC,oBAAC,OAAD;EAAO,SAAQ;EAAQ,WAAQ;YAAc;EAErC,GAEV,oBAAC,iBAAD;EAAiB,SAAS,eAAe,KAAK,CAAC;EAAqB;EAAc,EACjF;AAGL,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAqB;GAAY;GAAM;EAChD,wBAAwB;GACtB,kBAAkB;GAClB,YAAY;GACb;EACD,OAAO,WACL;GACE;GACA,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormHandle } from "../../../types/form-handle.mjs";
|
|
2
|
-
import { FieldAdapterMap, FormClassNames } from "../../../types/adapters.mjs";
|
|
2
|
+
import { FieldAdapterMap, FormClassNames, FormComponents } from "../../../types/adapters.mjs";
|
|
3
3
|
import { GroupMap, PathMap, SectionMap } from "../../../types/form-customization.mjs";
|
|
4
4
|
import { SearchFormContext } from "../../../context/search-form-context.mjs";
|
|
5
5
|
import { ReactNode } from "react";
|
|
@@ -13,6 +13,8 @@ type SearchFormSubmitHandler = (payload: SearchPayload, ctx: {
|
|
|
13
13
|
interface RenderingProps {
|
|
14
14
|
classNames?: FormClassNames;
|
|
15
15
|
adapters?: FieldAdapterMap;
|
|
16
|
+
/** Whole-component overrides (e.g. `alert`). Forwarded to `FormProvider`. */
|
|
17
|
+
components?: FormComponents;
|
|
16
18
|
className?: string;
|
|
17
19
|
}
|
|
18
20
|
interface SearchFormInstanceProps extends RenderingProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/root.tsx"],"mappings":";;;;;;;;;KAcY,uBAAA,IACV,OAAA,EAAS,aAAA,EACT,GAAA;EAAO,IAAA,EAAM,UAAA,CAAW,aAAA;AAAA,aACd,OAAA;AAAA,UAEF,cAAA;EACR,UAAA,GAAa,cAAA;EACb,QAAA,GAAW,eAAA;
|
|
1
|
+
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/root.tsx"],"mappings":";;;;;;;;;KAcY,uBAAA,IACV,OAAA,EAAS,aAAA,EACT,GAAA;EAAO,IAAA,EAAM,UAAA,CAAW,aAAA;AAAA,aACd,OAAA;AAAA,UAEF,cAAA;EACR,UAAA,GAAa,cAAA;EACb,QAAA,GAAW,eAAA;EANF;EAQT,UAAA,GAAa,cAAA;EACb,SAAA;AAAA;AAAA,UAGe,uBAAA,SAAgC,cAAA;EAC/C,OAAA,EAAS,iBAAA;EACT,QAAA,EAAU,uBAAA;EACV,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,yBAAA,SAAkC,cAAA;EACjD,QAAA,EAAU,QAAA;EACV,SAAA;EACA,QAAA,EAAU,uBAAA;EACV,aAAA,GAAgB,aAAA;EAChB,SAAA,GAAY,aAAA;EACZ,WAAA,GAAc,gBAAA;EApBQ;;;;;EA0BtB,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,QAAA;EACX,OAAA,GAAU,OAAA;EACV,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,eAAA,GAAkB,uBAAA,GAA0B,yBAAA;;;;;;AAxBxD;;;iBAkCgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -21,7 +21,7 @@ function SearchForm(props) {
|
|
|
21
21
|
if ("context" in props) return /* @__PURE__ */ jsx(SearchFormWithContext, { ...props });
|
|
22
22
|
return /* @__PURE__ */ jsx(SearchFormZeroConfig, { ...props });
|
|
23
23
|
}
|
|
24
|
-
function SearchFormZeroConfig({ searchId, publicKey, defaultValues, onSubmit, resolvers, environment, sectionMap, groupMap, pathMap, children, classNames, adapters, className }) {
|
|
24
|
+
function SearchFormZeroConfig({ searchId, publicKey, defaultValues, onSubmit, resolvers, environment, sectionMap, groupMap, pathMap, children, classNames, adapters, components, className }) {
|
|
25
25
|
return /* @__PURE__ */ jsx(SearchFormWithContext, {
|
|
26
26
|
context: useSearchForm({
|
|
27
27
|
searchId,
|
|
@@ -37,11 +37,12 @@ function SearchFormZeroConfig({ searchId, publicKey, defaultValues, onSubmit, re
|
|
|
37
37
|
className,
|
|
38
38
|
classNames,
|
|
39
39
|
adapters,
|
|
40
|
+
components,
|
|
40
41
|
children
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
|
-
function SearchFormWithContext({ context, onSubmit, children, className, classNames, adapters }) {
|
|
44
|
-
const hasLocalOverrides = classNames || adapters;
|
|
44
|
+
function SearchFormWithContext({ context, onSubmit, children, className, classNames, adapters, components }) {
|
|
45
|
+
const hasLocalOverrides = classNames || adapters || components;
|
|
45
46
|
const inner = /* @__PURE__ */ jsx(SearchFormContext.Provider, {
|
|
46
47
|
value: context,
|
|
47
48
|
children: /* @__PURE__ */ jsx(SearchFormShell, {
|
|
@@ -53,6 +54,7 @@ function SearchFormWithContext({ context, onSubmit, children, className, classNa
|
|
|
53
54
|
if (hasLocalOverrides) return /* @__PURE__ */ jsx(FormRoot, { children: /* @__PURE__ */ jsx(FormProvider, {
|
|
54
55
|
classNames,
|
|
55
56
|
adapters,
|
|
57
|
+
components,
|
|
56
58
|
children: inner
|
|
57
59
|
}) });
|
|
58
60
|
return /* @__PURE__ */ jsx(FormRoot, { children: inner });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/search-form/root.tsx"],"sourcesContent":["import type { FormResolvers, PipesEnvironment, SearchId, SearchPayload } from \"@pipe0/base\";\nimport { type ReactNode, useCallback, useState } from \"react\";\nimport { FormProvider, FormRoot } from \"../../../context/form-provider.js\";\nimport { PortalContainerContext } from \"../../../context/portal-container-context.js\";\nimport type { SearchFormContext as SearchFormContextValue } from \"../../../context/search-form-context.js\";\nimport { SearchFormContext, useSearchFormContext } from \"../../../context/search-form-context.js\";\nimport { useSearchForm } from \"../../../hooks/use-search-form.js\";\nimport type { FieldAdapterMap, FormClassNames } from \"../../../types/adapters.js\";\nimport type { GroupMap, PathMap, SectionMap } from \"../../../types/form-customization.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { DefaultForm } from \"../../defaults/layout/form.js\";\nimport { SearchFormContent } from \"./content.js\";\nimport { SearchFormSubmitButton } from \"./submit-button.js\";\n\nexport type SearchFormSubmitHandler = (\n payload: SearchPayload,\n ctx: { form: FormHandle<SearchPayload> },\n) => void | Promise<void>;\n\ninterface RenderingProps {\n classNames?: FormClassNames;\n adapters?: FieldAdapterMap;\n className?: string;\n}\n\nexport interface SearchFormInstanceProps extends RenderingProps {\n context: SearchFormContextValue;\n onSubmit: SearchFormSubmitHandler;\n children?: ReactNode;\n}\n\nexport interface SearchFormZeroConfigProps extends RenderingProps {\n searchId: SearchId;\n publicKey: string;\n onSubmit: SearchFormSubmitHandler;\n defaultValues?: SearchPayload;\n resolvers?: FormResolvers;\n environment?: PipesEnvironment;\n /**\n * Hide / relabel / reorder sections by section key. `null` hides a section.\n * Forwarded to the internal `useSearchForm` call. For `<SearchForm context={...}>`,\n * pass these to `useSearchForm` directly instead.\n */\n sectionMap?: SectionMap;\n groupMap?: GroupMap;\n pathMap?: PathMap;\n children?: ReactNode;\n}\n\nexport type SearchFormProps = SearchFormInstanceProps | SearchFormZeroConfigProps;\n\n/**\n * Compound root for search forms.\n *\n * - Compound: `<SearchForm context={ctx} onSubmit={...}>...</SearchForm>` — pass the context from\n * `useSearchForm`. Visibility customization lives on the hook in this mode.\n * - Zero-config: `<SearchForm searchId=\"...\" publicKey=\"...\" onSubmit={...} />` — fresh hook\n * created internally; visibility maps may be passed as props and forward to that hook.\n */\nexport function SearchForm(props: SearchFormProps) {\n if (\"context\" in props) {\n return <SearchFormWithContext {...props} />;\n }\n return <SearchFormZeroConfig {...props} />;\n}\n\nfunction SearchFormZeroConfig({\n searchId,\n publicKey,\n defaultValues,\n onSubmit,\n resolvers,\n environment,\n sectionMap,\n groupMap,\n pathMap,\n children,\n classNames,\n adapters,\n className,\n}: SearchFormZeroConfigProps) {\n const context = useSearchForm({\n searchId,\n publicKey,\n defaultValues,\n resolvers,\n environment,\n sectionMap,\n groupMap,\n pathMap,\n });\n\n return (\n <SearchFormWithContext\n context={context}\n onSubmit={onSubmit}\n className={className}\n classNames={classNames}\n adapters={adapters}\n >\n {children}\n </SearchFormWithContext>\n );\n}\n\nfunction SearchFormWithContext({\n context,\n onSubmit,\n children,\n className,\n classNames,\n adapters,\n}: SearchFormInstanceProps) {\n const hasLocalOverrides = classNames || adapters;\n\n const inner = (\n <SearchFormContext.Provider value={context}>\n <SearchFormShell className={className} onSubmit={onSubmit}>\n {children}\n </SearchFormShell>\n </SearchFormContext.Provider>\n );\n\n if (hasLocalOverrides) {\n return (\n <FormRoot>\n <FormProvider classNames={classNames} adapters={adapters}>\n {inner}\n </FormProvider>\n </FormRoot>\n );\n }\n\n return <FormRoot>{inner}</FormRoot>;\n}\n\nfunction SearchFormShell({\n children,\n className,\n onSubmit,\n}: {\n children?: ReactNode;\n className?: string;\n onSubmit: SearchFormSubmitHandler;\n}) {\n const context = useSearchFormContext();\n\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n const portalRef = useCallback((node: HTMLElement | null) => {\n setPortalContainer(node);\n }, []);\n\n const body = children ?? (\n <>\n <SearchFormContent />\n <SearchFormSubmitButton />\n </>\n );\n\n const handleFormSubmit = context.form.handleSubmit(async (values) => {\n await onSubmit(values, { form: context.form });\n });\n\n return (\n <DefaultForm\n onSubmit={handleFormSubmit}\n ref={portalRef}\n data-p0=\"form\"\n data-p0-search={context.id}\n className={className}\n >\n <PortalContainerContext.Provider value={portalContainer}>\n {body}\n </PortalContainerContext.Provider>\n </DefaultForm>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/search-form/root.tsx"],"sourcesContent":["import type { FormResolvers, PipesEnvironment, SearchId, SearchPayload } from \"@pipe0/base\";\nimport { type ReactNode, useCallback, useState } from \"react\";\nimport { FormProvider, FormRoot } from \"../../../context/form-provider.js\";\nimport { PortalContainerContext } from \"../../../context/portal-container-context.js\";\nimport type { SearchFormContext as SearchFormContextValue } from \"../../../context/search-form-context.js\";\nimport { SearchFormContext, useSearchFormContext } from \"../../../context/search-form-context.js\";\nimport { useSearchForm } from \"../../../hooks/use-search-form.js\";\nimport type { FieldAdapterMap, FormClassNames, FormComponents } from \"../../../types/adapters.js\";\nimport type { GroupMap, PathMap, SectionMap } from \"../../../types/form-customization.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { DefaultForm } from \"../../defaults/layout/form.js\";\nimport { SearchFormContent } from \"./content.js\";\nimport { SearchFormSubmitButton } from \"./submit-button.js\";\n\nexport type SearchFormSubmitHandler = (\n payload: SearchPayload,\n ctx: { form: FormHandle<SearchPayload> },\n) => void | Promise<void>;\n\ninterface RenderingProps {\n classNames?: FormClassNames;\n adapters?: FieldAdapterMap;\n /** Whole-component overrides (e.g. `alert`). Forwarded to `FormProvider`. */\n components?: FormComponents;\n className?: string;\n}\n\nexport interface SearchFormInstanceProps extends RenderingProps {\n context: SearchFormContextValue;\n onSubmit: SearchFormSubmitHandler;\n children?: ReactNode;\n}\n\nexport interface SearchFormZeroConfigProps extends RenderingProps {\n searchId: SearchId;\n publicKey: string;\n onSubmit: SearchFormSubmitHandler;\n defaultValues?: SearchPayload;\n resolvers?: FormResolvers;\n environment?: PipesEnvironment;\n /**\n * Hide / relabel / reorder sections by section key. `null` hides a section.\n * Forwarded to the internal `useSearchForm` call. For `<SearchForm context={...}>`,\n * pass these to `useSearchForm` directly instead.\n */\n sectionMap?: SectionMap;\n groupMap?: GroupMap;\n pathMap?: PathMap;\n children?: ReactNode;\n}\n\nexport type SearchFormProps = SearchFormInstanceProps | SearchFormZeroConfigProps;\n\n/**\n * Compound root for search forms.\n *\n * - Compound: `<SearchForm context={ctx} onSubmit={...}>...</SearchForm>` — pass the context from\n * `useSearchForm`. Visibility customization lives on the hook in this mode.\n * - Zero-config: `<SearchForm searchId=\"...\" publicKey=\"...\" onSubmit={...} />` — fresh hook\n * created internally; visibility maps may be passed as props and forward to that hook.\n */\nexport function SearchForm(props: SearchFormProps) {\n if (\"context\" in props) {\n return <SearchFormWithContext {...props} />;\n }\n return <SearchFormZeroConfig {...props} />;\n}\n\nfunction SearchFormZeroConfig({\n searchId,\n publicKey,\n defaultValues,\n onSubmit,\n resolvers,\n environment,\n sectionMap,\n groupMap,\n pathMap,\n children,\n classNames,\n adapters,\n components,\n className,\n}: SearchFormZeroConfigProps) {\n const context = useSearchForm({\n searchId,\n publicKey,\n defaultValues,\n resolvers,\n environment,\n sectionMap,\n groupMap,\n pathMap,\n });\n\n return (\n <SearchFormWithContext\n context={context}\n onSubmit={onSubmit}\n className={className}\n classNames={classNames}\n adapters={adapters}\n components={components}\n >\n {children}\n </SearchFormWithContext>\n );\n}\n\nfunction SearchFormWithContext({\n context,\n onSubmit,\n children,\n className,\n classNames,\n adapters,\n components,\n}: SearchFormInstanceProps) {\n const hasLocalOverrides = classNames || adapters || components;\n\n const inner = (\n <SearchFormContext.Provider value={context}>\n <SearchFormShell className={className} onSubmit={onSubmit}>\n {children}\n </SearchFormShell>\n </SearchFormContext.Provider>\n );\n\n if (hasLocalOverrides) {\n return (\n <FormRoot>\n <FormProvider classNames={classNames} adapters={adapters} components={components}>\n {inner}\n </FormProvider>\n </FormRoot>\n );\n }\n\n return <FormRoot>{inner}</FormRoot>;\n}\n\nfunction SearchFormShell({\n children,\n className,\n onSubmit,\n}: {\n children?: ReactNode;\n className?: string;\n onSubmit: SearchFormSubmitHandler;\n}) {\n const context = useSearchFormContext();\n\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n const portalRef = useCallback((node: HTMLElement | null) => {\n setPortalContainer(node);\n }, []);\n\n const body = children ?? (\n <>\n <SearchFormContent />\n <SearchFormSubmitButton />\n </>\n );\n\n const handleFormSubmit = context.form.handleSubmit(async (values) => {\n await onSubmit(values, { form: context.form });\n });\n\n return (\n <DefaultForm\n onSubmit={handleFormSubmit}\n ref={portalRef}\n data-p0=\"form\"\n data-p0-search={context.id}\n className={className}\n >\n <PortalContainerContext.Provider value={portalContainer}>\n {body}\n </PortalContainerContext.Provider>\n </DefaultForm>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6DA,SAAgB,WAAW,OAAwB;AACjD,KAAI,aAAa,MACf,QAAO,oBAAC,uBAAD,EAAuB,GAAI,OAAS;AAE7C,QAAO,oBAAC,sBAAD,EAAsB,GAAI,OAAS;;AAG5C,SAAS,qBAAqB,EAC5B,UACA,WACA,eACA,UACA,WACA,aACA,YACA,UACA,SACA,UACA,YACA,UACA,YACA,aAC4B;AAY5B,QACE,oBAAC,uBAAD;EACE,SAbY,cAAc;GAC5B;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;EAKY;EACC;EACC;EACF;EACE;EAEX;EACqB;;AAI5B,SAAS,sBAAsB,EAC7B,SACA,UACA,UACA,WACA,YACA,UACA,cAC0B;CAC1B,MAAM,oBAAoB,cAAc,YAAY;CAEpD,MAAM,QACJ,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO;YACjC,oBAAC,iBAAD;GAA4B;GAAqB;GAC9C;GACe;EACS;AAG/B,KAAI,kBACF,QACE,oBAAC,UAAD,YACE,oBAAC,cAAD;EAA0B;EAAsB;EAAsB;YACnE;EACY,GACN;AAIf,QAAO,oBAAC,UAAD,YAAW,OAAiB;;AAGrC,SAAS,gBAAgB,EACvB,UACA,WACA,YAKC;CACD,MAAM,UAAU,sBAAsB;CAEtC,MAAM,CAAC,iBAAiB,sBAAsB,SAA6B,KAAK;CAChF,MAAM,YAAY,aAAa,SAA6B;AAC1D,qBAAmB,KAAK;IACvB,EAAE,CAAC;CAEN,MAAM,OAAO,YACX,8CACE,oBAAC,mBAAD,EAAqB,GACrB,oBAAC,wBAAD,EAA0B,EACzB;AAOL,QACE,oBAAC,aAAD;EACE,UANqB,QAAQ,KAAK,aAAa,OAAO,WAAW;AACnE,SAAM,SAAS,QAAQ,EAAE,MAAM,QAAQ,MAAM,CAAC;IAC9C;EAKE,KAAK;EACL,WAAQ;EACR,kBAAgB,QAAQ;EACb;YAEX,oBAAC,uBAAuB,UAAxB;GAAiC,OAAO;aACrC;GAC+B;EACtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.mjs";
|
|
2
2
|
import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
|
|
3
|
-
import { DefaultActiveFilterPill } from "../../defaults/catalog/active-filter-pill.mjs";
|
|
4
3
|
import { useSearchesCatalogContext } from "../../../context/searches-catalog-context.mjs";
|
|
4
|
+
import { DefaultActiveFilterPill } from "../../defaults/catalog/active-filter-pill.mjs";
|
|
5
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -3,8 +3,8 @@ import { DefaultCategoryFilter } from "../../defaults/catalog/category-filter.mj
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { Building2, Database, Table, User, X } from "lucide-react";
|
|
7
6
|
import { getSearchCategoryEntries } from "@pipe0/base";
|
|
7
|
+
import { Building2, Database, Table, User, X } from "lucide-react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/compound/searches-catalog/category-filter.tsx
|
|
10
10
|
const SEARCH_CATEGORY_ICONS = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useSearchesCatalogContext } from "../../../context/searches-catalog-context.mjs";
|
|
2
2
|
import { SearchesCatalogColumnFilter } from "./column-filter.mjs";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Building2 } from "lucide-react";
|
|
5
4
|
import { getProviderEntry } from "@pipe0/base";
|
|
5
|
+
import { Building2 } from "lucide-react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/compound/searches-catalog/provider-filter.tsx
|
|
8
8
|
const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
|
|
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
function ContextSelectInputAdapter(field) {
|
|
8
8
|
const hasOptions = field.options.length > 0;
|
|
9
9
|
const selectedOption = field.options.find((o) => o.value === field.selectedValue);
|
|
10
|
-
const placeholder = field.pending ? "Loading…" : field.meta.placeholder ??
|
|
10
|
+
const placeholder = field.pending ? "Loading…" : field.meta.placeholder ?? "";
|
|
11
11
|
return /* @__PURE__ */ jsxs("div", {
|
|
12
12
|
"data-p0": "input",
|
|
13
13
|
className: cn("pz:flex pz:flex-col pz:gap-1", field.pending && "pz:opacity-60"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-select-input.mjs","names":[],"sources":["../../../../src/components/defaults/adapters/context-select-input.tsx"],"sourcesContent":["import type { StoreOption } from \"@pipe0/base\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { FieldHandle } from \"../../../types/field-handle.js\";\nimport { WidgetStrip } from \"../../../widgets/widget-strip.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"../../ui/select.js\";\n\nexport function ContextSelectInputAdapter(field: FieldHandle<\"context_select_input\">) {\n const hasOptions = field.options.length > 0;\n const selectedOption = field.options.find((o) => o.value === field.selectedValue);\n\n // ONE always-controlled Select across every state (loading / gated / ready).\n // Rendering a separate <Select> tree per state — or using\n // `value={... || undefined}` — flips Base UI between uncontrolled and\n // controlled, which warns and now actually fires on the loading→ready\n // transition (the field finally re-renders through it). `null` is Base UI's\n // controlled \"no selection\" sentinel (cf. connector-input + the `v === null`\n // guard below), so the value is never `undefined` and the control stays\n // controlled for its whole lifetime. State differences are expressed only via\n // `disabled` / `placeholder` / the helper line below — not via remounting.\n const placeholder = field.pending
|
|
1
|
+
{"version":3,"file":"context-select-input.mjs","names":[],"sources":["../../../../src/components/defaults/adapters/context-select-input.tsx"],"sourcesContent":["import type { StoreOption } from \"@pipe0/base\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { FieldHandle } from \"../../../types/field-handle.js\";\nimport { WidgetStrip } from \"../../../widgets/widget-strip.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"../../ui/select.js\";\n\nexport function ContextSelectInputAdapter(field: FieldHandle<\"context_select_input\">) {\n const hasOptions = field.options.length > 0;\n const selectedOption = field.options.find((o) => o.value === field.selectedValue);\n\n // ONE always-controlled Select across every state (loading / gated / ready).\n // Rendering a separate <Select> tree per state — or using\n // `value={... || undefined}` — flips Base UI between uncontrolled and\n // controlled, which warns and now actually fires on the loading→ready\n // transition (the field finally re-renders through it). `null` is Base UI's\n // controlled \"no selection\" sentinel (cf. connector-input + the `v === null`\n // guard below), so the value is never `undefined` and the control stays\n // controlled for its whole lifetime. State differences are expressed only via\n // `disabled` / `placeholder` / the helper line below — not via remounting.\n const placeholder = field.pending ? \"Loading…\" : (field.meta.placeholder ?? \"\");\n\n return (\n <div\n data-p0=\"input\"\n className={cn(\"pz:flex pz:flex-col pz:gap-1\", field.pending && \"pz:opacity-60\")}\n >\n <Select\n value={field.selectedValue || null}\n onValueChange={(v) => {\n if (v === null) return;\n field.onSelect(v);\n }}\n name={field.path}\n disabled={field.pending || field.suggestionsDisabled || !hasOptions}\n >\n <SelectTrigger id={field.id} aria-invalid={!!field.error} className=\"pz:w-full\">\n <SelectValue placeholder={placeholder}>\n {selectedOption ? (\n <span className=\"pz:flex pz:items-center pz:gap-2\">\n <WidgetStrip widgets={selectedOption.widgets} />\n <span>{selectedOption.label}</span>\n </span>\n ) : undefined}\n </SelectValue>\n </SelectTrigger>\n <SelectContent>\n {field.options.map((opt: StoreOption) => (\n <SelectItem key={opt.value} value={opt.value} label={opt.label}>\n <span className=\"pz:flex pz:items-center pz:gap-2\">\n <WidgetStrip widgets={opt.widgets} />\n <span>{opt.label}</span>\n </span>\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {field.suggestionsDisabled ? (\n <div className=\"pz:text-xs pz:gap-y-1 pz:text-muted-foreground pz:italic\">\n {field.suggestionsDisabledReason ?? \"Suggestions unavailable\"}{\" \"}\n </div>\n ) : !field.pending && !hasOptions ? (\n <span className=\"pz:text-xs pz:text-muted-foreground\">No fields available</span>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;AAMA,SAAgB,0BAA0B,OAA4C;CACpF,MAAM,aAAa,MAAM,QAAQ,SAAS;CAC1C,MAAM,iBAAiB,MAAM,QAAQ,MAAM,MAAM,EAAE,UAAU,MAAM,cAAc;CAWjF,MAAM,cAAc,MAAM,UAAU,aAAc,MAAM,KAAK,eAAe;AAE5E,QACE,qBAAC,OAAD;EACE,WAAQ;EACR,WAAW,GAAG,gCAAgC,MAAM,WAAW,gBAAgB;YAFjF,CAIE,qBAAC,QAAD;GACE,OAAO,MAAM,iBAAiB;GAC9B,gBAAgB,MAAM;AACpB,QAAI,MAAM,KAAM;AAChB,UAAM,SAAS,EAAE;;GAEnB,MAAM,MAAM;GACZ,UAAU,MAAM,WAAW,MAAM,uBAAuB,CAAC;aAP3D,CASE,oBAAC,eAAD;IAAe,IAAI,MAAM;IAAI,gBAAc,CAAC,CAAC,MAAM;IAAO,WAAU;cAClE,oBAAC,aAAD;KAA0B;eACvB,iBACC,qBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,oBAAC,aAAD,EAAa,SAAS,eAAe,SAAW,GAChD,oBAAC,QAAD,YAAO,eAAe,OAAa,EAC9B;UACL;KACQ;IACA,GAChB,oBAAC,eAAD,YACG,MAAM,QAAQ,KAAK,QAClB,oBAAC,YAAD;IAA4B,OAAO,IAAI;IAAO,OAAO,IAAI;cACvD,qBAAC,QAAD;KAAM,WAAU;eAAhB,CACE,oBAAC,aAAD,EAAa,SAAS,IAAI,SAAW,GACrC,oBAAC,QAAD,YAAO,IAAI,OAAa,EACnB;;IACI,EALI,IAAI,MAKR,CACb,EACY,EACT;MACR,MAAM,sBACL,qBAAC,OAAD;GAAK,WAAU;aAAf,CACG,MAAM,6BAA6B,2BAA2B,IAC3D;OACJ,CAAC,MAAM,WAAW,CAAC,aACrB,oBAAC,QAAD;GAAM,WAAU;aAAsC;GAA0B,IAC9E,KACA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../ui/select.mjs";
|
|
2
1
|
import { Input } from "../../ui/input.mjs";
|
|
2
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../ui/select.mjs";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/defaults/adapters/exact-range-input.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/defaults/adapters/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/defaults/adapters/index.ts"],"mappings":";;;;;AAsCA;;cAAa,eAAA,EAoC2B,OAAA,CAAQ,eAAA"}
|