@pipe0/react 0.0.2
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 +119 -0
- package/README.md +172 -0
- package/dist/components/compound/pipe-catalog/active-filters.d.mts +26 -0
- package/dist/components/compound/pipe-catalog/active-filters.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/active-filters.mjs +47 -0
- package/dist/components/compound/pipe-catalog/active-filters.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/card.d.mts +30 -0
- package/dist/components/compound/pipe-catalog/card.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/card.mjs +77 -0
- package/dist/components/compound/pipe-catalog/card.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/category-filter.d.mts +30 -0
- package/dist/components/compound/pipe-catalog/category-filter.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/category-filter.mjs +56 -0
- package/dist/components/compound/pipe-catalog/category-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/column-filter.d.mts +40 -0
- package/dist/components/compound/pipe-catalog/column-filter.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/column-filter.mjs +66 -0
- package/dist/components/compound/pipe-catalog/column-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/column-filters.d.mts +16 -0
- package/dist/components/compound/pipe-catalog/column-filters.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/column-filters.mjs +21 -0
- package/dist/components/compound/pipe-catalog/column-filters.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/empty.d.mts +22 -0
- package/dist/components/compound/pipe-catalog/empty.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/empty.mjs +31 -0
- package/dist/components/compound/pipe-catalog/empty.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/index.d.mts +13 -0
- package/dist/components/compound/pipe-catalog/index.mjs +15 -0
- package/dist/components/compound/pipe-catalog/input-field-filter.d.mts +22 -0
- package/dist/components/compound/pipe-catalog/input-field-filter.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/input-field-filter.mjs +22 -0
- package/dist/components/compound/pipe-catalog/input-field-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/list.d.mts +34 -0
- package/dist/components/compound/pipe-catalog/list.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/list.mjs +29 -0
- package/dist/components/compound/pipe-catalog/list.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/output-field-filter.d.mts +22 -0
- package/dist/components/compound/pipe-catalog/output-field-filter.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/output-field-filter.mjs +22 -0
- package/dist/components/compound/pipe-catalog/output-field-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/provider-filter.d.mts +22 -0
- package/dist/components/compound/pipe-catalog/provider-filter.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/provider-filter.mjs +29 -0
- package/dist/components/compound/pipe-catalog/provider-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/root.d.mts +47 -0
- package/dist/components/compound/pipe-catalog/root.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/root.mjs +85 -0
- package/dist/components/compound/pipe-catalog/root.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/search-filter.d.mts +24 -0
- package/dist/components/compound/pipe-catalog/search-filter.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/search-filter.mjs +46 -0
- package/dist/components/compound/pipe-catalog/search-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-catalog/tag-filter.d.mts +22 -0
- package/dist/components/compound/pipe-catalog/tag-filter.d.mts.map +1 -0
- package/dist/components/compound/pipe-catalog/tag-filter.mjs +22 -0
- package/dist/components/compound/pipe-catalog/tag-filter.mjs.map +1 -0
- package/dist/components/compound/pipe-form/content.d.mts +18 -0
- package/dist/components/compound/pipe-form/content.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/content.mjs +45 -0
- package/dist/components/compound/pipe-form/content.mjs.map +1 -0
- package/dist/components/compound/pipe-form/field.d.mts +17 -0
- package/dist/components/compound/pipe-form/field.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/field.mjs +21 -0
- package/dist/components/compound/pipe-form/field.mjs.map +1 -0
- package/dist/components/compound/pipe-form/footer.d.mts +14 -0
- package/dist/components/compound/pipe-form/footer.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/footer.mjs +14 -0
- package/dist/components/compound/pipe-form/footer.mjs.map +1 -0
- package/dist/components/compound/pipe-form/group.d.mts +13 -0
- package/dist/components/compound/pipe-form/group.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/group.mjs +17 -0
- package/dist/components/compound/pipe-form/group.mjs.map +1 -0
- package/dist/components/compound/pipe-form/header.d.mts +14 -0
- package/dist/components/compound/pipe-form/header.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/header.mjs +14 -0
- package/dist/components/compound/pipe-form/header.mjs.map +1 -0
- package/dist/components/compound/pipe-form/index.d.mts +9 -0
- package/dist/components/compound/pipe-form/index.mjs +11 -0
- package/dist/components/compound/pipe-form/root.d.mts +56 -0
- package/dist/components/compound/pipe-form/root.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/root.mjs +98 -0
- package/dist/components/compound/pipe-form/root.mjs.map +1 -0
- package/dist/components/compound/pipe-form/section.d.mts +13 -0
- package/dist/components/compound/pipe-form/section.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/section.mjs +17 -0
- package/dist/components/compound/pipe-form/section.mjs.map +1 -0
- package/dist/components/compound/pipe-form/submit-button.d.mts +9 -0
- package/dist/components/compound/pipe-form/submit-button.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/submit-button.mjs +17 -0
- package/dist/components/compound/pipe-form/submit-button.mjs.map +1 -0
- package/dist/components/compound/pipe-form/title.d.mts +16 -0
- package/dist/components/compound/pipe-form/title.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/title.mjs +14 -0
- package/dist/components/compound/pipe-form/title.mjs.map +1 -0
- package/dist/components/compound/search-catalog/active-filters.d.mts +26 -0
- package/dist/components/compound/search-catalog/active-filters.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/active-filters.mjs +46 -0
- package/dist/components/compound/search-catalog/active-filters.mjs.map +1 -0
- package/dist/components/compound/search-catalog/card.d.mts +30 -0
- package/dist/components/compound/search-catalog/card.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/card.mjs +77 -0
- package/dist/components/compound/search-catalog/card.mjs.map +1 -0
- package/dist/components/compound/search-catalog/category-filter.d.mts +29 -0
- package/dist/components/compound/search-catalog/category-filter.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/category-filter.mjs +51 -0
- package/dist/components/compound/search-catalog/category-filter.mjs.map +1 -0
- package/dist/components/compound/search-catalog/column-filter.d.mts +40 -0
- package/dist/components/compound/search-catalog/column-filter.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/column-filter.mjs +63 -0
- package/dist/components/compound/search-catalog/column-filter.mjs.map +1 -0
- package/dist/components/compound/search-catalog/column-filters.d.mts +15 -0
- package/dist/components/compound/search-catalog/column-filters.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/column-filters.mjs +16 -0
- package/dist/components/compound/search-catalog/column-filters.mjs.map +1 -0
- package/dist/components/compound/search-catalog/empty.d.mts +22 -0
- package/dist/components/compound/search-catalog/empty.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/empty.mjs +31 -0
- package/dist/components/compound/search-catalog/empty.mjs.map +1 -0
- package/dist/components/compound/search-catalog/index.d.mts +12 -0
- package/dist/components/compound/search-catalog/index.mjs +14 -0
- package/dist/components/compound/search-catalog/list.d.mts +19 -0
- package/dist/components/compound/search-catalog/list.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/list.mjs +29 -0
- package/dist/components/compound/search-catalog/list.mjs.map +1 -0
- package/dist/components/compound/search-catalog/output-field-filter.d.mts +22 -0
- package/dist/components/compound/search-catalog/output-field-filter.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/output-field-filter.mjs +22 -0
- package/dist/components/compound/search-catalog/output-field-filter.mjs.map +1 -0
- package/dist/components/compound/search-catalog/provider-filter.d.mts +22 -0
- package/dist/components/compound/search-catalog/provider-filter.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/provider-filter.mjs +29 -0
- package/dist/components/compound/search-catalog/provider-filter.mjs.map +1 -0
- package/dist/components/compound/search-catalog/root.d.mts +33 -0
- package/dist/components/compound/search-catalog/root.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/root.mjs +74 -0
- package/dist/components/compound/search-catalog/root.mjs.map +1 -0
- package/dist/components/compound/search-catalog/search-filter.d.mts +24 -0
- package/dist/components/compound/search-catalog/search-filter.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/search-filter.mjs +46 -0
- package/dist/components/compound/search-catalog/search-filter.mjs.map +1 -0
- package/dist/components/compound/search-catalog/tag-filter.d.mts +22 -0
- package/dist/components/compound/search-catalog/tag-filter.d.mts.map +1 -0
- package/dist/components/compound/search-catalog/tag-filter.mjs +22 -0
- package/dist/components/compound/search-catalog/tag-filter.mjs.map +1 -0
- package/dist/components/compound/search-form/content.d.mts +18 -0
- package/dist/components/compound/search-form/content.d.mts.map +1 -0
- package/dist/components/compound/search-form/content.mjs +45 -0
- package/dist/components/compound/search-form/content.mjs.map +1 -0
- package/dist/components/compound/search-form/field.d.mts +17 -0
- package/dist/components/compound/search-form/field.d.mts.map +1 -0
- package/dist/components/compound/search-form/field.mjs +21 -0
- package/dist/components/compound/search-form/field.mjs.map +1 -0
- package/dist/components/compound/search-form/footer.d.mts +14 -0
- package/dist/components/compound/search-form/footer.d.mts.map +1 -0
- package/dist/components/compound/search-form/footer.mjs +14 -0
- package/dist/components/compound/search-form/footer.mjs.map +1 -0
- package/dist/components/compound/search-form/group.d.mts +13 -0
- package/dist/components/compound/search-form/group.d.mts.map +1 -0
- package/dist/components/compound/search-form/group.mjs +17 -0
- package/dist/components/compound/search-form/group.mjs.map +1 -0
- package/dist/components/compound/search-form/header.d.mts +14 -0
- package/dist/components/compound/search-form/header.d.mts.map +1 -0
- package/dist/components/compound/search-form/header.mjs +14 -0
- package/dist/components/compound/search-form/header.mjs.map +1 -0
- package/dist/components/compound/search-form/index.d.mts +9 -0
- package/dist/components/compound/search-form/index.mjs +11 -0
- package/dist/components/compound/search-form/root.d.mts +45 -0
- package/dist/components/compound/search-form/root.d.mts.map +1 -0
- package/dist/components/compound/search-form/root.mjs +90 -0
- package/dist/components/compound/search-form/root.mjs.map +1 -0
- package/dist/components/compound/search-form/section.d.mts +13 -0
- package/dist/components/compound/search-form/section.d.mts.map +1 -0
- package/dist/components/compound/search-form/section.mjs +17 -0
- package/dist/components/compound/search-form/section.mjs.map +1 -0
- package/dist/components/compound/search-form/submit-button.d.mts +9 -0
- package/dist/components/compound/search-form/submit-button.d.mts.map +1 -0
- package/dist/components/compound/search-form/submit-button.mjs +17 -0
- package/dist/components/compound/search-form/submit-button.mjs.map +1 -0
- package/dist/components/compound/search-form/title.d.mts +16 -0
- package/dist/components/compound/search-form/title.d.mts.map +1 -0
- package/dist/components/compound/search-form/title.mjs +14 -0
- package/dist/components/compound/search-form/title.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/active-filters.d.mts +26 -0
- package/dist/components/compound/searches-catalog/active-filters.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/active-filters.mjs +46 -0
- package/dist/components/compound/searches-catalog/active-filters.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/card.d.mts +22 -0
- package/dist/components/compound/searches-catalog/card.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/card.mjs +70 -0
- package/dist/components/compound/searches-catalog/card.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/category-filter.d.mts +29 -0
- package/dist/components/compound/searches-catalog/category-filter.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/category-filter.mjs +51 -0
- package/dist/components/compound/searches-catalog/category-filter.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/column-filter.d.mts +31 -0
- package/dist/components/compound/searches-catalog/column-filter.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/column-filter.mjs +58 -0
- package/dist/components/compound/searches-catalog/column-filter.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/column-filters.d.mts +15 -0
- package/dist/components/compound/searches-catalog/column-filters.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/column-filters.mjs +16 -0
- package/dist/components/compound/searches-catalog/column-filters.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/empty.d.mts +22 -0
- package/dist/components/compound/searches-catalog/empty.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/empty.mjs +31 -0
- package/dist/components/compound/searches-catalog/empty.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/index.d.mts +12 -0
- package/dist/components/compound/searches-catalog/index.mjs +14 -0
- package/dist/components/compound/searches-catalog/list.d.mts +19 -0
- package/dist/components/compound/searches-catalog/list.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/list.mjs +29 -0
- package/dist/components/compound/searches-catalog/list.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/output-field-filter.d.mts +22 -0
- package/dist/components/compound/searches-catalog/output-field-filter.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/output-field-filter.mjs +22 -0
- package/dist/components/compound/searches-catalog/output-field-filter.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/provider-filter.d.mts +22 -0
- package/dist/components/compound/searches-catalog/provider-filter.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/provider-filter.mjs +29 -0
- package/dist/components/compound/searches-catalog/provider-filter.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/root.d.mts +33 -0
- package/dist/components/compound/searches-catalog/root.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/root.mjs +74 -0
- package/dist/components/compound/searches-catalog/root.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/search-filter.d.mts +24 -0
- package/dist/components/compound/searches-catalog/search-filter.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/search-filter.mjs +46 -0
- package/dist/components/compound/searches-catalog/search-filter.mjs.map +1 -0
- package/dist/components/compound/searches-catalog/tag-filter.d.mts +22 -0
- package/dist/components/compound/searches-catalog/tag-filter.d.mts.map +1 -0
- package/dist/components/compound/searches-catalog/tag-filter.mjs +22 -0
- package/dist/components/compound/searches-catalog/tag-filter.mjs.map +1 -0
- package/dist/components/defaults/adapters/async-include-exclude-select-input.mjs +32 -0
- package/dist/components/defaults/adapters/async-include-exclude-select-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/async-multi-select-input.mjs +26 -0
- package/dist/components/defaults/adapters/async-multi-select-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/boolean-input.mjs +82 -0
- package/dist/components/defaults/adapters/boolean-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/connector-input.mjs +94 -0
- package/dist/components/defaults/adapters/connector-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/context-select-input.mjs +74 -0
- package/dist/components/defaults/adapters/context-select-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/cursor-pagination-input.mjs +29 -0
- package/dist/components/defaults/adapters/cursor-pagination-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/date-range-input.mjs +53 -0
- package/dist/components/defaults/adapters/date-range-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/exact-range-input.mjs +75 -0
- package/dist/components/defaults/adapters/exact-range-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/fields-select-input.mjs +25 -0
- package/dist/components/defaults/adapters/fields-select-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/include-exclude-input.mjs +33 -0
- package/dist/components/defaults/adapters/include-exclude-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/include-exclude-select-input.mjs +36 -0
- package/dist/components/defaults/adapters/include-exclude-select-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/index.d.mts +11 -0
- package/dist/components/defaults/adapters/index.d.mts.map +1 -0
- package/dist/components/defaults/adapters/index.mjs +73 -0
- package/dist/components/defaults/adapters/index.mjs.map +1 -0
- package/dist/components/defaults/adapters/int-input.mjs +16 -0
- package/dist/components/defaults/adapters/int-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/json-extraction-input.mjs +333 -0
- package/dist/components/defaults/adapters/json-extraction-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/json-schema-input.mjs +30 -0
- package/dist/components/defaults/adapters/json-schema-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/key-value-list-input.mjs +100 -0
- package/dist/components/defaults/adapters/key-value-list-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/min-max-int-input.mjs +65 -0
- package/dist/components/defaults/adapters/min-max-int-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/multi-create-input.mjs +32 -0
- package/dist/components/defaults/adapters/multi-create-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/multi-select-input.mjs +26 -0
- package/dist/components/defaults/adapters/multi-select-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/number-input.mjs +15 -0
- package/dist/components/defaults/adapters/number-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/ordered-multi-create-input.mjs +43 -0
- package/dist/components/defaults/adapters/ordered-multi-create-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/output-field-input.mjs +37 -0
- package/dist/components/defaults/adapters/output-field-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/pipes-trigger-input.mjs +381 -0
- package/dist/components/defaults/adapters/pipes-trigger-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/prompt-input.mjs +208 -0
- package/dist/components/defaults/adapters/prompt-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/providers-input.mjs +23 -0
- package/dist/components/defaults/adapters/providers-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/range-input.mjs +61 -0
- package/dist/components/defaults/adapters/range-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/select-input.mjs +54 -0
- package/dist/components/defaults/adapters/select-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/tagged-text-input.mjs +154 -0
- package/dist/components/defaults/adapters/tagged-text-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/template-input.mjs +34 -0
- package/dist/components/defaults/adapters/template-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/text-input.mjs +18 -0
- package/dist/components/defaults/adapters/text-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/textarea-input.mjs +17 -0
- package/dist/components/defaults/adapters/textarea-input.mjs.map +1 -0
- package/dist/components/defaults/catalog/active-filter-pill.mjs +30 -0
- package/dist/components/defaults/catalog/active-filter-pill.mjs.map +1 -0
- package/dist/components/defaults/catalog/card-derived.d.mts +98 -0
- package/dist/components/defaults/catalog/card-derived.d.mts.map +1 -0
- package/dist/components/defaults/catalog/card-derived.mjs +172 -0
- package/dist/components/defaults/catalog/card-derived.mjs.map +1 -0
- package/dist/components/defaults/catalog/card-primitives.d.mts +81 -0
- package/dist/components/defaults/catalog/card-primitives.d.mts.map +1 -0
- package/dist/components/defaults/catalog/card-primitives.mjs +108 -0
- package/dist/components/defaults/catalog/card-primitives.mjs.map +1 -0
- package/dist/components/defaults/catalog/category-filter.d.mts +13 -0
- package/dist/components/defaults/catalog/category-filter.d.mts.map +1 -0
- package/dist/components/defaults/catalog/category-filter.mjs +28 -0
- package/dist/components/defaults/catalog/category-filter.mjs.map +1 -0
- package/dist/components/defaults/catalog/category-section.d.mts +39 -0
- package/dist/components/defaults/catalog/category-section.d.mts.map +1 -0
- package/dist/components/defaults/catalog/category-section.mjs +59 -0
- package/dist/components/defaults/catalog/category-section.mjs.map +1 -0
- package/dist/components/defaults/catalog/empty-state.mjs +20 -0
- package/dist/components/defaults/catalog/empty-state.mjs.map +1 -0
- package/dist/components/defaults/catalog/filter-select.d.mts +13 -0
- package/dist/components/defaults/catalog/filter-select.d.mts.map +1 -0
- package/dist/components/defaults/catalog/filter-select.mjs +45 -0
- package/dist/components/defaults/catalog/filter-select.mjs.map +1 -0
- package/dist/components/defaults/catalog/layout.mjs +53 -0
- package/dist/components/defaults/catalog/layout.mjs.map +1 -0
- package/dist/components/defaults/catalog/provider-avatars.d.mts +37 -0
- package/dist/components/defaults/catalog/provider-avatars.d.mts.map +1 -0
- package/dist/components/defaults/catalog/provider-avatars.mjs +98 -0
- package/dist/components/defaults/catalog/provider-avatars.mjs.map +1 -0
- package/dist/components/defaults/field-section-enumeration.mjs +32 -0
- package/dist/components/defaults/field-section-enumeration.mjs.map +1 -0
- package/dist/components/defaults/layout/field-wrapper.d.mts +13 -0
- package/dist/components/defaults/layout/field-wrapper.d.mts.map +1 -0
- package/dist/components/defaults/layout/field-wrapper.mjs +67 -0
- package/dist/components/defaults/layout/field-wrapper.mjs.map +1 -0
- package/dist/components/defaults/layout/form.mjs +21 -0
- package/dist/components/defaults/layout/form.mjs.map +1 -0
- package/dist/components/defaults/layout/group.d.mts +16 -0
- package/dist/components/defaults/layout/group.d.mts.map +1 -0
- package/dist/components/defaults/layout/group.mjs +87 -0
- package/dist/components/defaults/layout/group.mjs.map +1 -0
- package/dist/components/defaults/layout/section.d.mts +14 -0
- package/dist/components/defaults/layout/section.d.mts.map +1 -0
- package/dist/components/defaults/layout/section.mjs +39 -0
- package/dist/components/defaults/layout/section.mjs.map +1 -0
- package/dist/components/defaults/layout/submit-button.d.mts +9 -0
- package/dist/components/defaults/layout/submit-button.d.mts.map +1 -0
- package/dist/components/defaults/layout/submit-button.mjs +23 -0
- package/dist/components/defaults/layout/submit-button.mjs.map +1 -0
- package/dist/components/defaults/toggle-advanced-button.mjs +29 -0
- package/dist/components/defaults/toggle-advanced-button.mjs.map +1 -0
- package/dist/components/field-renderer.d.mts +14 -0
- package/dist/components/field-renderer.d.mts.map +1 -0
- package/dist/components/field-renderer.mjs +21 -0
- package/dist/components/field-renderer.mjs.map +1 -0
- package/dist/components/hover-info.mjs +30 -0
- package/dist/components/hover-info.mjs.map +1 -0
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs +319 -0
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs.map +1 -0
- package/dist/components/internal/LiquidEditor/LiquidEditor.mjs +208 -0
- package/dist/components/internal/LiquidEditor/LiquidEditor.mjs.map +1 -0
- package/dist/components/internal/LiquidEditor/UnifiedReferencePicker.mjs +240 -0
- package/dist/components/internal/LiquidEditor/UnifiedReferencePicker.mjs.map +1 -0
- package/dist/components/internal/combobox/include-exclude-combobox.mjs +368 -0
- package/dist/components/internal/combobox/include-exclude-combobox.mjs.map +1 -0
- package/dist/components/internal/combobox/suggest-combobox.mjs +294 -0
- package/dist/components/internal/combobox/suggest-combobox.mjs.map +1 -0
- package/dist/components/internal/field-legend.mjs +37 -0
- package/dist/components/internal/field-legend.mjs.map +1 -0
- package/dist/components/internal/form-level-errors.mjs +71 -0
- package/dist/components/internal/form-level-errors.mjs.map +1 -0
- package/dist/components/internal/icons.mjs +131 -0
- package/dist/components/internal/icons.mjs.map +1 -0
- package/dist/components/internal/multi-select-popover-trigger.mjs +26 -0
- package/dist/components/internal/multi-select-popover-trigger.mjs.map +1 -0
- package/dist/components/internal/schema-editor/SchemaEditor.mjs +468 -0
- package/dist/components/internal/schema-editor/SchemaEditor.mjs.map +1 -0
- package/dist/components/internal/schema-editor/generate-schema-rows.mjs +374 -0
- package/dist/components/internal/schema-editor/generate-schema-rows.mjs.map +1 -0
- package/dist/components/internal/schema-editor/schema-editor-context.mjs +32 -0
- package/dist/components/internal/schema-editor/schema-editor-context.mjs.map +1 -0
- package/dist/components/internal/schema-editor/schema-utils.mjs +249 -0
- package/dist/components/internal/schema-editor/schema-utils.mjs.map +1 -0
- package/dist/components/internal/suggestion-menu/suggestion-menu-utils.mjs +12 -0
- package/dist/components/internal/suggestion-menu/suggestion-menu-utils.mjs.map +1 -0
- package/dist/components/internal/suggestion-menu/suggestion-menu.mjs +151 -0
- package/dist/components/internal/suggestion-menu/suggestion-menu.mjs.map +1 -0
- package/dist/components/internal/tag-chip-decoration.mjs +180 -0
- package/dist/components/internal/tag-chip-decoration.mjs.map +1 -0
- package/dist/components/rich-text.mjs +42 -0
- package/dist/components/rich-text.mjs.map +1 -0
- package/dist/components/ui/badge.mjs +32 -0
- package/dist/components/ui/badge.mjs.map +1 -0
- package/dist/components/ui/button.d.mts +19 -0
- package/dist/components/ui/button.d.mts.map +1 -0
- package/dist/components/ui/button.mjs +47 -0
- package/dist/components/ui/button.mjs.map +1 -0
- package/dist/components/ui/combobox.mjs +103 -0
- package/dist/components/ui/combobox.mjs.map +1 -0
- package/dist/components/ui/input-group.mjs +30 -0
- package/dist/components/ui/input-group.mjs.map +1 -0
- package/dist/components/ui/input.mjs +17 -0
- package/dist/components/ui/input.mjs.map +1 -0
- package/dist/components/ui/label.mjs +17 -0
- package/dist/components/ui/label.mjs.map +1 -0
- package/dist/components/ui/popover.mjs +40 -0
- package/dist/components/ui/popover.mjs.map +1 -0
- package/dist/components/ui/select.mjs +92 -0
- package/dist/components/ui/select.mjs.map +1 -0
- package/dist/components/ui/switch.mjs +21 -0
- package/dist/components/ui/switch.mjs.map +1 -0
- package/dist/components/ui/table.mjs +56 -0
- package/dist/components/ui/table.mjs.map +1 -0
- package/dist/components/ui/textarea.mjs +15 -0
- package/dist/components/ui/textarea.mjs.map +1 -0
- package/dist/components/ui/tooltip.mjs +48 -0
- package/dist/components/ui/tooltip.mjs.map +1 -0
- package/dist/context/catalog-card-context.mjs +31 -0
- package/dist/context/catalog-card-context.mjs.map +1 -0
- package/dist/context/catalog-config-context.d.mts +43 -0
- package/dist/context/catalog-config-context.d.mts.map +1 -0
- package/dist/context/catalog-config-context.mjs +48 -0
- package/dist/context/catalog-config-context.mjs.map +1 -0
- package/dist/context/form-context.mjs +11 -0
- package/dist/context/form-context.mjs.map +1 -0
- package/dist/context/form-customization-context.d.mts +71 -0
- package/dist/context/form-customization-context.d.mts.map +1 -0
- package/dist/context/form-customization-context.mjs +114 -0
- package/dist/context/form-customization-context.mjs.map +1 -0
- package/dist/context/form-provider.d.mts +41 -0
- package/dist/context/form-provider.d.mts.map +1 -0
- package/dist/context/form-provider.mjs +53 -0
- package/dist/context/form-provider.mjs.map +1 -0
- package/dist/context/pipe-catalog-card-context.d.mts +17 -0
- package/dist/context/pipe-catalog-card-context.d.mts.map +1 -0
- package/dist/context/pipe-catalog-card-context.mjs +13 -0
- package/dist/context/pipe-catalog-card-context.mjs.map +1 -0
- package/dist/context/pipe-catalog-context.d.mts +26 -0
- package/dist/context/pipe-catalog-context.d.mts.map +1 -0
- package/dist/context/pipe-catalog-context.mjs +13 -0
- package/dist/context/pipe-catalog-context.mjs.map +1 -0
- package/dist/context/pipe-form-context.d.mts +25 -0
- package/dist/context/pipe-form-context.d.mts.map +1 -0
- package/dist/context/pipe-form-context.mjs +13 -0
- package/dist/context/pipe-form-context.mjs.map +1 -0
- package/dist/context/portal-container-context.d.mts +5 -0
- package/dist/context/portal-container-context.d.mts.map +1 -0
- package/dist/context/portal-container-context.mjs +15 -0
- package/dist/context/portal-container-context.mjs.map +1 -0
- package/dist/context/search-catalog-card-context.d.mts +16 -0
- package/dist/context/search-catalog-card-context.d.mts.map +1 -0
- package/dist/context/search-catalog-card-context.mjs +13 -0
- package/dist/context/search-catalog-card-context.mjs.map +1 -0
- package/dist/context/search-catalog-context.d.mts +20 -0
- package/dist/context/search-catalog-context.d.mts.map +1 -0
- package/dist/context/search-catalog-context.mjs +13 -0
- package/dist/context/search-catalog-context.mjs.map +1 -0
- package/dist/context/search-form-context.d.mts +25 -0
- package/dist/context/search-form-context.d.mts.map +1 -0
- package/dist/context/search-form-context.mjs +13 -0
- package/dist/context/search-form-context.mjs.map +1 -0
- package/dist/context/searches-catalog-card-context.d.mts +16 -0
- package/dist/context/searches-catalog-card-context.d.mts.map +1 -0
- package/dist/context/searches-catalog-card-context.mjs +13 -0
- package/dist/context/searches-catalog-card-context.mjs.map +1 -0
- package/dist/context/searches-catalog-context.d.mts +20 -0
- package/dist/context/searches-catalog-context.d.mts.map +1 -0
- package/dist/context/searches-catalog-context.mjs +13 -0
- package/dist/context/searches-catalog-context.mjs.map +1 -0
- package/dist/hooks/use-debounce.mjs +28 -0
- package/dist/hooks/use-debounce.mjs.map +1 -0
- package/dist/hooks/use-debounced-fn.mjs +47 -0
- package/dist/hooks/use-debounced-fn.mjs.map +1 -0
- package/dist/hooks/use-disclosure.mjs +35 -0
- package/dist/hooks/use-disclosure.mjs.map +1 -0
- package/dist/hooks/use-field-error.d.mts +11 -0
- package/dist/hooks/use-field-error.d.mts.map +1 -0
- package/dist/hooks/use-field-error.mjs +23 -0
- package/dist/hooks/use-field-error.mjs.map +1 -0
- package/dist/hooks/use-floating-element.mjs +45 -0
- package/dist/hooks/use-floating-element.mjs.map +1 -0
- package/dist/hooks/use-form-core.d.mts +16 -0
- package/dist/hooks/use-form-core.d.mts.map +1 -0
- package/dist/hooks/use-form-core.mjs +241 -0
- package/dist/hooks/use-form-core.mjs.map +1 -0
- package/dist/hooks/use-jsonata-preview.mjs +38 -0
- package/dist/hooks/use-jsonata-preview.mjs.map +1 -0
- package/dist/hooks/use-menu-navigation.mjs +86 -0
- package/dist/hooks/use-menu-navigation.mjs.map +1 -0
- package/dist/hooks/use-pipe-catalog-table.d.mts +47 -0
- package/dist/hooks/use-pipe-catalog-table.d.mts.map +1 -0
- package/dist/hooks/use-pipe-catalog-table.mjs +170 -0
- package/dist/hooks/use-pipe-catalog-table.mjs.map +1 -0
- package/dist/hooks/use-pipe-form.d.mts +31 -0
- package/dist/hooks/use-pipe-form.d.mts.map +1 -0
- package/dist/hooks/use-pipe-form.mjs +65 -0
- package/dist/hooks/use-pipe-form.mjs.map +1 -0
- package/dist/hooks/use-search-catalog-table.d.mts +40 -0
- package/dist/hooks/use-search-catalog-table.d.mts.map +1 -0
- package/dist/hooks/use-search-catalog-table.mjs +161 -0
- package/dist/hooks/use-search-catalog-table.mjs.map +1 -0
- package/dist/hooks/use-search-form.d.mts +17 -0
- package/dist/hooks/use-search-form.d.mts.map +1 -0
- package/dist/hooks/use-search-form.mjs +58 -0
- package/dist/hooks/use-search-form.mjs.map +1 -0
- package/dist/hooks/use-searches-catalog-table.d.mts +40 -0
- package/dist/hooks/use-searches-catalog-table.d.mts.map +1 -0
- package/dist/hooks/use-searches-catalog-table.mjs +161 -0
- package/dist/hooks/use-searches-catalog-table.mjs.map +1 -0
- package/dist/index.d.mts +96 -0
- package/dist/index.mjs +98 -0
- package/dist/lib/utils.mjs +11 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/styles/pipe0-form.css +3785 -0
- package/dist/types/adapters.d.mts +107 -0
- package/dist/types/adapters.d.mts.map +1 -0
- package/dist/types/catalog-adapters.d.mts +122 -0
- package/dist/types/catalog-adapters.d.mts.map +1 -0
- package/dist/types/field-handle.d.mts +3 -0
- package/dist/types/field-props.d.mts +285 -0
- package/dist/types/field-props.d.mts.map +1 -0
- package/dist/types/form-customization.d.mts +25 -0
- package/dist/types/form-customization.d.mts.map +1 -0
- package/dist/types/form-handle.d.mts +23 -0
- package/dist/types/form-handle.d.mts.map +1 -0
- package/dist/utils/build-section-handlers.mjs +419 -0
- package/dist/utils/build-section-handlers.mjs.map +1 -0
- package/dist/utils/catalog-helpers.d.mts +12 -0
- package/dist/utils/catalog-helpers.d.mts.map +1 -0
- package/dist/utils/catalog-helpers.mjs +35 -0
- package/dist/utils/catalog-helpers.mjs.map +1 -0
- package/dist/utils/generate-random-string.mjs +11 -0
- package/dist/utils/generate-random-string.mjs.map +1 -0
- package/dist/utils/merge-form-stores.mjs +14 -0
- package/dist/utils/merge-form-stores.mjs.map +1 -0
- package/dist/utils/object-path.mjs +72 -0
- package/dist/utils/object-path.mjs.map +1 -0
- package/dist/utils/render-slot.d.mts +44 -0
- package/dist/utils/render-slot.d.mts.map +1 -0
- package/dist/utils/render-slot.mjs +30 -0
- package/dist/utils/render-slot.mjs.map +1 -0
- package/dist/widgets/avatar-group.d.mts +36 -0
- package/dist/widgets/avatar-group.d.mts.map +1 -0
- package/dist/widgets/avatar-group.mjs +114 -0
- package/dist/widgets/avatar-group.mjs.map +1 -0
- package/dist/widgets/emoji-glyph.d.mts +11 -0
- package/dist/widgets/emoji-glyph.d.mts.map +1 -0
- package/dist/widgets/emoji-glyph.mjs +13 -0
- package/dist/widgets/emoji-glyph.mjs.map +1 -0
- package/dist/widgets/field-type-badge.d.mts +13 -0
- package/dist/widgets/field-type-badge.d.mts.map +1 -0
- package/dist/widgets/field-type-badge.mjs +30 -0
- package/dist/widgets/field-type-badge.mjs.map +1 -0
- package/dist/widgets/icon-glyph.d.mts +16 -0
- package/dist/widgets/icon-glyph.d.mts.map +1 -0
- package/dist/widgets/icon-glyph.mjs +59 -0
- package/dist/widgets/icon-glyph.mjs.map +1 -0
- package/dist/widgets/index.d.mts +9 -0
- package/dist/widgets/index.mjs +11 -0
- package/dist/widgets/logo-url.d.mts +17 -0
- package/dist/widgets/logo-url.d.mts.map +1 -0
- package/dist/widgets/logo-url.mjs +17 -0
- package/dist/widgets/logo-url.mjs.map +1 -0
- package/dist/widgets/pricing-badge.d.mts +11 -0
- package/dist/widgets/pricing-badge.d.mts.map +1 -0
- package/dist/widgets/pricing-badge.mjs +13 -0
- package/dist/widgets/pricing-badge.mjs.map +1 -0
- package/dist/widgets/provider-logo.d.mts +16 -0
- package/dist/widgets/provider-logo.d.mts.map +1 -0
- package/dist/widgets/provider-logo.mjs +20 -0
- package/dist/widgets/provider-logo.mjs.map +1 -0
- package/dist/widgets/widget-strip.d.mts +16 -0
- package/dist/widgets/widget-strip.d.mts.map +1 -0
- package/dist/widgets/widget-strip.mjs +42 -0
- package/dist/widgets/widget-strip.mjs.map +1 -0
- package/dist/widgets/widget-view.d.mts +14 -0
- package/dist/widgets/widget-view.d.mts.map +1 -0
- package/dist/widgets/widget-view.mjs +36 -0
- package/dist/widgets/widget-view.mjs.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/root.tsx"],"sourcesContent":["import type { CatalogFilter } from \"@pipe0/base\";\nimport type { ColumnFilter } from \"@tanstack/react-table\";\nimport type { ComponentProps, ReactNode, SyntheticEvent } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport {\n CatalogProvider,\n CatalogRoot,\n useCatalogConfig,\n} from \"../../../context/catalog-config-context.js\";\nimport {\n PipeCatalogContext,\n type PipeCatalogContextValue,\n} from \"../../../context/pipe-catalog-context.js\";\nimport {\n type UsePipeCatalogTableReturn,\n usePipeCatalogTable,\n} from \"../../../hooks/use-pipe-catalog-table.js\";\nimport type {\n CatalogClassNames,\n CatalogComponentOverrides,\n PipeCardData,\n} from \"../../../types/catalog-adapters.js\";\nimport { type RenderProp, renderSlot } from \"../../../utils/render-slot.js\";\nimport { DefaultCatalogRoot } from \"../../defaults/catalog/layout.js\";\nimport { PipeCatalogActiveFilters } from \"./active-filters.js\";\nimport { PipeCatalogCategoryFilter } from \"./category-filter.js\";\nimport { PipeCatalogColumnFilters } from \"./column-filters.js\";\nimport { PipeCatalogEmpty } from \"./empty.js\";\nimport { PipeCatalogList } from \"./list.js\";\nimport { PipeCatalogSearchFilter } from \"./search-filter.js\";\n\ninterface CustomizationProps {\n classNames?: CatalogClassNames;\n components?: CatalogComponentOverrides;\n className?: string;\n /** Render slot for the outer wrapper. */\n render?: RenderProp<ComponentProps<\"div\">, Record<never, never>>;\n}\n\ninterface SelectionProps {\n /** Fires on click / keyboard activation of any `<PipeCatalogCard>`. */\n onSelectPipe?: (pipe: PipeCardData, e: SyntheticEvent) => void;\n}\n\nexport interface PipeCatalogInstanceProps extends CustomizationProps, SelectionProps {\n /** Caller-owned hook return — pass when you need to read state outside the tree. */\n context: UsePipeCatalogTableReturn;\n children?: ReactNode;\n}\n\nexport interface PipeCatalogLegacyProps extends CustomizationProps, SelectionProps {\n /** Optional whitelist/blacklist applied before the user-facing filters. */\n filter?: CatalogFilter;\n initialColumnFilters?: ColumnFilter[];\n children?: ReactNode;\n}\n\nexport type PipeCatalogProps = PipeCatalogInstanceProps | PipeCatalogLegacyProps;\n\n/**\n * Compound root for the pipe catalog.\n *\n * Two modes:\n * - Caller-owned: `<PipeCatalog context={usePipeCatalogTable()}>...</PipeCatalog>`\n * - Zero-config: `<PipeCatalog filter={...} />` — a fresh hook is created internally.\n *\n * Children are optional. With no children, the default tree renders a\n * functional, neutrally-styled catalog: search filter, category filter,\n * column filters, active-filter pills, list, empty state.\n */\nexport function PipeCatalog(props: PipeCatalogProps) {\n if (\"context\" in props) {\n return <PipeCatalogWithContext {...props} />;\n }\n return <PipeCatalogLegacy {...props} />;\n}\n\nfunction PipeCatalogLegacy({ filter, initialColumnFilters, ...rest }: PipeCatalogLegacyProps) {\n const context = usePipeCatalogTable({ filter, initialColumnFilters });\n return <PipeCatalogWithContext context={context} {...rest} />;\n}\n\nfunction PipeCatalogWithContext({\n context,\n children,\n className,\n classNames,\n components,\n onSelectPipe,\n render,\n}: PipeCatalogInstanceProps) {\n const hasLocalOverrides = classNames || components;\n const [expandedCardId, setExpandedCardId] = useState<string | null>(null);\n\n const value = useMemo<PipeCatalogContextValue>(\n () => ({\n ...context,\n onSelectCard: onSelectPipe,\n expandedCardId,\n setExpandedCardId,\n }),\n [context, onSelectPipe, expandedCardId],\n );\n\n const inner = (\n <PipeCatalogContext.Provider value={value}>\n <PipeCatalogShell className={className} render={render}>\n {children}\n </PipeCatalogShell>\n </PipeCatalogContext.Provider>\n );\n\n if (hasLocalOverrides) {\n return (\n <CatalogRoot>\n <CatalogProvider classNames={classNames} components={components}>\n {inner}\n </CatalogProvider>\n </CatalogRoot>\n );\n }\n return <CatalogRoot>{inner}</CatalogRoot>;\n}\n\nfunction PipeCatalogShell({\n children,\n className,\n render,\n}: {\n children?: ReactNode;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, Record<never, never>>;\n}) {\n useCatalogConfig();\n const body =\n children !== undefined ? (\n children\n ) : (\n <>\n <PipeCatalogSearchFilter />\n <PipeCatalogCategoryFilter />\n <PipeCatalogColumnFilters />\n <PipeCatalogActiveFilters />\n <PipeCatalogList />\n <PipeCatalogEmpty />\n </>\n );\n return (\n <DefaultCatalogRoot className={className} render={render}>\n {body}\n </DefaultCatalogRoot>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,SAAgB,YAAY,OAAyB;AACnD,KAAI,aAAa,MACf,QAAO,oBAAC,wBAAD,EAAwB,GAAI,OAAS;AAE9C,QAAO,oBAAC,mBAAD,EAAmB,GAAI,OAAS;;AAGzC,SAAS,kBAAkB,EAAE,QAAQ,sBAAsB,GAAG,QAAgC;AAE5F,QAAO,oBAAC,wBAAD;EAAwB,SADf,oBAAoB;GAAE;GAAQ;GAAsB,CAAC;EACpB,GAAI;EAAQ;;AAG/D,SAAS,uBAAuB,EAC9B,SACA,UACA,WACA,YACA,YACA,cACA,UAC2B;CAC3B,MAAM,oBAAoB,cAAc;CACxC,MAAM,CAAC,gBAAgB,qBAAqB,SAAwB,KAAK;CAEzE,MAAM,QAAQ,eACL;EACL,GAAG;EACH,cAAc;EACd;EACA;EACD,GACD;EAAC;EAAS;EAAc;EAAe,CACxC;CAED,MAAM,QACJ,oBAAC,mBAAmB,UAApB;EAAoC;YAClC,oBAAC,kBAAD;GAA6B;GAAmB;GAC7C;GACgB;EACS;AAGhC,KAAI,kBACF,QACE,oBAAC,aAAD,YACE,oBAAC,iBAAD;EAA6B;EAAwB;YAClD;EACe,GACN;AAGlB,QAAO,oBAAC,aAAD,YAAc,OAAoB;;AAG3C,SAAS,iBAAiB,EACxB,UACA,WACA,UAKC;AACD,mBAAkB;AAclB,QACE,oBAAC,oBAAD;EAA+B;EAAmB;YAblD,aAAa,SACX,WAEA;GACE,oBAAC,yBAAD,EAA2B;GAC3B,oBAAC,2BAAD,EAA6B;GAC7B,oBAAC,0BAAD,EAA4B;GAC5B,oBAAC,0BAAD,EAA4B;GAC5B,oBAAC,iBAAD,EAAmB;GACnB,oBAAC,kBAAD,EAAoB;GACnB;EAKgB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/compound/pipe-catalog/search-filter.d.ts
|
|
7
|
+
interface PipeCatalogSearchFilterState {
|
|
8
|
+
value: string;
|
|
9
|
+
setValue: (v: string) => void;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface PipeCatalogSearchFilterProps {
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
render?: RenderProp<ComponentProps<"input">, PipeCatalogSearchFilterState>;
|
|
16
|
+
}
|
|
17
|
+
declare function PipeCatalogSearchFilter({
|
|
18
|
+
placeholder,
|
|
19
|
+
className,
|
|
20
|
+
render
|
|
21
|
+
}: PipeCatalogSearchFilterProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<_$react.ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | null | undefined> | null | undefined;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { PipeCatalogSearchFilter, PipeCatalogSearchFilterProps, PipeCatalogSearchFilterState };
|
|
24
|
+
//# sourceMappingURL=search-filter.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"mappings":";;;;;;UAQiB,4BAAA;EACf,KAAA;EACA,QAAA,GAAW,CAAA;EACX,QAAA;AAAA;AAAA,UAGe,4BAAA;EACf,WAAA;EACA,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,WAAyB,4BAAA;AAAA;AAAA,iBAG/B,uBAAA,CAAA;EACd,WAAA;EACA,SAAA;EACA;AAAA,GACC,4BAAA,wCAA4B,oBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,QAAA,CAAA,OAAA,CAAA,SAAA,IAAA,OAAA,sCAAA,OAAA,CAAA,WAAA,GAAA,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA,SAAA,QAAA,CAAA,OAAA,CAAA,SAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "../../../lib/utils.mjs";
|
|
2
|
+
import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
|
|
3
|
+
import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
|
|
4
|
+
import { renderSlot } from "../../../utils/render-slot.mjs";
|
|
5
|
+
import { Input } from "../../ui/input.mjs";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Search } from "lucide-react";
|
|
8
|
+
|
|
9
|
+
//#region src/components/compound/pipe-catalog/search-filter.tsx
|
|
10
|
+
function PipeCatalogSearchFilter({ placeholder = "Search pipes...", className, render }) {
|
|
11
|
+
const { globalFilterInput, setGlobalFilterInput } = usePipeCatalogContext();
|
|
12
|
+
const { classNames } = useCatalogConfig();
|
|
13
|
+
const isActive = !!globalFilterInput;
|
|
14
|
+
if (render) return renderSlot({
|
|
15
|
+
defaultTagName: "input",
|
|
16
|
+
render,
|
|
17
|
+
state: {
|
|
18
|
+
value: globalFilterInput,
|
|
19
|
+
setValue: setGlobalFilterInput,
|
|
20
|
+
isActive
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
type: "search",
|
|
24
|
+
placeholder,
|
|
25
|
+
value: globalFilterInput,
|
|
26
|
+
onChange: (e) => setGlobalFilterInput(e.target.value),
|
|
27
|
+
"data-active": isActive ? "" : void 0,
|
|
28
|
+
className: cn(classNames?.searchInput, className)
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
32
|
+
"data-p0": "catalog-search",
|
|
33
|
+
className: cn("pz:relative", classNames?.searchInputContainer),
|
|
34
|
+
children: [/* @__PURE__ */ jsx(Search, { className: "pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none" }), /* @__PURE__ */ jsx(Input, {
|
|
35
|
+
type: "search",
|
|
36
|
+
placeholder,
|
|
37
|
+
value: globalFilterInput,
|
|
38
|
+
onChange: (e) => setGlobalFilterInput(e.target.value),
|
|
39
|
+
className: cn("pz:pl-8", classNames?.searchInput, className)
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { PipeCatalogSearchFilter };
|
|
46
|
+
//# sourceMappingURL=search-filter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"sourcesContent":["import { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent, ComponentProps } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { type RenderProp, renderSlot } from \"../../../utils/render-slot.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface PipeCatalogSearchFilterState {\n value: string;\n setValue: (v: string) => void;\n isActive: boolean;\n}\n\nexport interface PipeCatalogSearchFilterProps {\n placeholder?: string;\n className?: string;\n render?: RenderProp<ComponentProps<\"input\">, PipeCatalogSearchFilterState>;\n}\n\nexport function PipeCatalogSearchFilter({\n placeholder = \"Search pipes...\",\n className,\n render,\n}: PipeCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = usePipeCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n if (render) {\n return renderSlot({\n defaultTagName: \"input\",\n render,\n state: {\n value: globalFilterInput,\n setValue: setGlobalFilterInput,\n isActive,\n },\n props: {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n \"data-active\": isActive ? \"\" : undefined,\n className: cn(classNames?.searchInput, className),\n } as ComponentProps<\"input\">,\n });\n }\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,wBAAwB,EACtC,cAAc,mBACd,WACA,UAC+B;CAC/B,MAAM,EAAE,mBAAmB,yBAAyB,uBAAuB;CAC3E,MAAM,EAAE,eAAe,kBAAkB;CACzC,MAAM,WAAW,CAAC,CAAC;AAEnB,KAAI,OACF,QAAO,WAAW;EAChB,gBAAgB;EAChB;EACA,OAAO;GACL,OAAO;GACP,UAAU;GACV;GACD;EACD,OAAO;GACL,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,eAAe,WAAW,KAAK;GAC/B,WAAW,GAAG,YAAY,aAAa,UAAU;GAClD;EACF,CAAC;AAGJ,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
|
+
import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
|
|
3
|
+
import { ColumnFilterState } from "./column-filter.mjs";
|
|
4
|
+
import { ComponentProps, ReactNode } from "react";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/compound/pipe-catalog/tag-filter.d.ts
|
|
8
|
+
interface PipeCatalogTagFilterProps {
|
|
9
|
+
options?: ReadonlyArray<FilterSelectOption>;
|
|
10
|
+
placeholder?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
render?: RenderProp<ComponentProps<"div">, ColumnFilterState>;
|
|
13
|
+
}
|
|
14
|
+
declare function PipeCatalogTagFilter({
|
|
15
|
+
options,
|
|
16
|
+
placeholder,
|
|
17
|
+
className,
|
|
18
|
+
render
|
|
19
|
+
}: PipeCatalogTagFilterProps): _$react_jsx_runtime0.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PipeCatalogTagFilter, PipeCatalogTagFilterProps };
|
|
22
|
+
//# sourceMappingURL=tag-filter.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"mappings":";;;;;;;UAMiB,yBAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,SAAuB,iBAAA;AAAA;AAAA,iBAS7B,oBAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,yBAAA,GAAyB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PipeCatalogColumnFilter } from "./column-filter.mjs";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tag } from "lucide-react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/compound/pipe-catalog/tag-filter.tsx
|
|
6
|
+
const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
|
|
7
|
+
className: "pz:inline-flex pz:items-center pz:gap-1.5",
|
|
8
|
+
children: [/* @__PURE__ */ jsx(Tag, { className: "pz:size-4" }), " Tag"]
|
|
9
|
+
});
|
|
10
|
+
function PipeCatalogTagFilter({ options, placeholder = DEFAULT_PLACEHOLDER, className, render }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(PipeCatalogColumnFilter, {
|
|
12
|
+
id: "tags",
|
|
13
|
+
placeholder,
|
|
14
|
+
options,
|
|
15
|
+
className,
|
|
16
|
+
render
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PipeCatalogTagFilter };
|
|
22
|
+
//# sourceMappingURL=tag-filter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"sourcesContent":["import { Tag } from \"lucide-react\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport type { RenderProp } from \"../../../utils/render-slot.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, ColumnFilterState>;\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function PipeCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogTagFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,qBAAqB,EACnC,SACA,cAAc,qBACd,WACA,UAC4B;AAC5B,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormSectionHandle } from "../../../types/form-handle.mjs";
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
|
|
5
|
+
//#region src/components/compound/pipe-form/content.d.ts
|
|
6
|
+
interface PipeFormContentState {
|
|
7
|
+
sections: FormSectionHandle[];
|
|
8
|
+
}
|
|
9
|
+
interface PipeFormContentProps extends useRender.ComponentProps<"div", PipeFormContentState> {}
|
|
10
|
+
declare function PipeFormContent({
|
|
11
|
+
children,
|
|
12
|
+
className,
|
|
13
|
+
render,
|
|
14
|
+
...props
|
|
15
|
+
}: PipeFormContentProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { PipeFormContent };
|
|
18
|
+
//# sourceMappingURL=content.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/content.tsx"],"mappings":";;;;;UAUiB,oBAAA;EACf,QAAA,EAAU,iBAAA;AAAA;AAAA,UAGK,oBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,oBAAA;AAAA,iBAE1B,eAAA,CAAA;EAAkB,QAAA;EAAU,SAAA;EAAW,MAAA;EAAA,GAAW;AAAA,GAAS,oBAAA,GAAoB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useFormCustomization } from "../../../context/form-customization-context.mjs";
|
|
2
|
+
import { usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
3
|
+
import { applyFormCustomization } from "../../../utils/build-section-handlers.mjs";
|
|
4
|
+
import { FormLevelErrors } from "../../internal/form-level-errors.mjs";
|
|
5
|
+
import { PipeFormSection } from "./section.mjs";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
9
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
10
|
+
|
|
11
|
+
//#region src/components/compound/pipe-form/content.tsx
|
|
12
|
+
function PipeFormContent({ children, className, render, ...props }) {
|
|
13
|
+
const context = usePipeFormContext();
|
|
14
|
+
const [customization] = useFormCustomization();
|
|
15
|
+
const filteredSections = useMemo(() => applyFormCustomization(context.sections, customization), [context.sections, customization]);
|
|
16
|
+
const fieldPaths = useMemo(() => new Set(filteredSections.flatMap((s) => s.groups.flatMap((g) => g.fields.map((f) => f.path)))), [filteredSections]);
|
|
17
|
+
const anyFieldError = Object.values(context.fieldLoadStates).some((s) => s.status === "error");
|
|
18
|
+
const defaultChildren = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
19
|
+
filteredSections.map((section) => /* @__PURE__ */ jsx(PipeFormSection, { section }, section.key)),
|
|
20
|
+
anyFieldError && /* @__PURE__ */ jsx("div", {
|
|
21
|
+
"data-p0": "store-error",
|
|
22
|
+
role: "alert",
|
|
23
|
+
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",
|
|
24
|
+
children: /* @__PURE__ */ jsx("span", { children: "Failed to load options for one or more fields. Check that your connection is valid." })
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx(FormLevelErrors, {
|
|
27
|
+
control: context.form.control,
|
|
28
|
+
fieldPaths
|
|
29
|
+
})
|
|
30
|
+
] });
|
|
31
|
+
return useRender({
|
|
32
|
+
defaultTagName: "div",
|
|
33
|
+
render,
|
|
34
|
+
state: { sections: filteredSections },
|
|
35
|
+
props: mergeProps({
|
|
36
|
+
className,
|
|
37
|
+
children: children ?? defaultChildren,
|
|
38
|
+
"data-p0": "form-content"
|
|
39
|
+
}, props)
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { PipeFormContent };
|
|
45
|
+
//# sourceMappingURL=content.mjs.map
|
|
@@ -0,0 +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 { useMemo } from \"react\";\nimport { useFormCustomization } from \"../../../context/form-customization-context.js\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport type { FormSectionHandle } from \"../../../types/form-handle.js\";\nimport { applyFormCustomization } from \"../../../utils/build-section-handlers.js\";\nimport { FormLevelErrors } from \"../../internal/form-level-errors.js\";\nimport { PipeFormSection } from \"./section.js\";\n\nexport interface PipeFormContentState {\n sections: FormSectionHandle[];\n}\n\nexport interface PipeFormContentProps\n extends useRender.ComponentProps<\"div\", PipeFormContentState> {}\n\nexport function PipeFormContent({ children, className, render, ...props }: PipeFormContentProps) {\n const context = usePipeFormContext();\n const [customization] = useFormCustomization();\n\n const filteredSections = useMemo(\n () => applyFormCustomization(context.sections, customization),\n [context.sections, customization],\n );\n\n const fieldPaths = useMemo(\n () =>\n new Set(\n filteredSections.flatMap((s) => s.groups.flatMap((g) => g.fields.map((f) => f.path))),\n ),\n [filteredSections],\n );\n\n const anyFieldError = Object.values(context.fieldLoadStates).some((s) => s.status === \"error\");\n\n const defaultChildren = (\n <>\n {filteredSections.map((section) => (\n <PipeFormSection key={section.key} section={section} />\n ))}\n {anyFieldError && (\n <div\n data-p0=\"store-error\"\n role=\"alert\"\n 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\"\n >\n <span>\n Failed to load options for one or more fields. Check that your connection is valid.\n </span>\n </div>\n )}\n <FormLevelErrors control={context.form.control} fieldPaths={fieldPaths} />\n </>\n );\n\n return useRender({\n defaultTagName: \"div\",\n render,\n state: { sections: filteredSections },\n props: mergeProps<\"div\">(\n {\n className,\n children: children ?? defaultChildren,\n ...({ \"data-p0\": \"form-content\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;;;;;AAiBA,SAAgB,gBAAgB,EAAE,UAAU,WAAW,QAAQ,GAAG,SAA+B;CAC/F,MAAM,UAAU,oBAAoB;CACpC,MAAM,CAAC,iBAAiB,sBAAsB;CAE9C,MAAM,mBAAmB,cACjB,uBAAuB,QAAQ,UAAU,cAAc,EAC7D,CAAC,QAAQ,UAAU,cAAc,CAClC;CAED,MAAM,aAAa,cAEf,IAAI,IACF,iBAAiB,SAAS,MAAM,EAAE,OAAO,SAAS,MAAM,EAAE,OAAO,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,CACtF,EACH,CAAC,iBAAiB,CACnB;CAED,MAAM,gBAAgB,OAAO,OAAO,QAAQ,gBAAgB,CAAC,MAAM,MAAM,EAAE,WAAW,QAAQ;CAE9F,MAAM,kBACJ;EACG,iBAAiB,KAAK,YACrB,oBAAC,iBAAD,EAA4C,SAAW,EAAjC,QAAQ,IAAyB,CACvD;EACD,iBACC,oBAAC,OAAD;GACE,WAAQ;GACR,MAAK;GACL,WAAU;aAEV,oBAAC,QAAD,YAAM,uFAEC;GACH;EAER,oBAAC,iBAAD;GAAiB,SAAS,QAAQ,KAAK;GAAqB;GAAc;EACzE;AAGL,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,EAAE,UAAU,kBAAkB;EACrC,OAAO,WACL;GACE;GACA,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnyFieldProps } from "../../../types/field-props.mjs";
|
|
2
|
+
import { DefaultFieldWrapperProps } from "../../defaults/layout/field-wrapper.mjs";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/compound/pipe-form/field.d.ts
|
|
6
|
+
type PipeFormFieldWrapperProps = Omit<DefaultFieldWrapperProps, "field" | "children">;
|
|
7
|
+
type PipeFormFieldProps = ({
|
|
8
|
+
field: AnyFieldProps;
|
|
9
|
+
path?: never;
|
|
10
|
+
} & PipeFormFieldWrapperProps) | ({
|
|
11
|
+
path: string;
|
|
12
|
+
field?: never;
|
|
13
|
+
} & PipeFormFieldWrapperProps);
|
|
14
|
+
declare function PipeFormField(props: PipeFormFieldProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PipeFormField };
|
|
17
|
+
//# sourceMappingURL=field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/field.tsx"],"mappings":";;;;;KAQK,yBAAA,GAA4B,IAAA,CAAK,wBAAA;AAAA,KAE1B,kBAAA;EACL,KAAA,EAAO,aAAA;EAAe,IAAA;AAAA,IAAiB,yBAAA;EACvC,IAAA;EAAc,KAAA;AAAA,IAAkB,yBAAA;AAAA,iBAEvB,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
2
|
+
import { DefaultFieldWrapper } from "../../defaults/layout/field-wrapper.mjs";
|
|
3
|
+
import { FieldRenderer } from "../../field-renderer.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/compound/pipe-form/field.tsx
|
|
7
|
+
function PipeFormField(props) {
|
|
8
|
+
const { fields } = usePipeFormContext();
|
|
9
|
+
const field = "field" in props && props.field ? props.field : fields.find((f) => f.path === props.path);
|
|
10
|
+
if (!field) return null;
|
|
11
|
+
const { field: _f, path: _p, ...rest } = props;
|
|
12
|
+
return /* @__PURE__ */ jsx(DefaultFieldWrapper, {
|
|
13
|
+
field,
|
|
14
|
+
...rest,
|
|
15
|
+
children: /* @__PURE__ */ jsx(FieldRenderer, { field })
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { PipeFormField };
|
|
21
|
+
//# sourceMappingURL=field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/field.tsx"],"sourcesContent":["import { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport type { AnyFieldProps } from \"../../../types/field-props.js\";\nimport {\n DefaultFieldWrapper,\n type DefaultFieldWrapperProps,\n} from \"../../defaults/layout/field-wrapper.js\";\nimport { FieldRenderer } from \"../../field-renderer.js\";\n\ntype PipeFormFieldWrapperProps = Omit<DefaultFieldWrapperProps, \"field\" | \"children\">;\n\nexport type PipeFormFieldProps =\n | ({ field: AnyFieldProps; path?: never } & PipeFormFieldWrapperProps)\n | ({ path: string; field?: never } & PipeFormFieldWrapperProps);\n\nexport function PipeFormField(props: PipeFormFieldProps) {\n const { fields } = usePipeFormContext();\n\n const field =\n \"field\" in props && props.field\n ? props.field\n : fields.find((f) => f.path === (props as { path: string }).path);\n\n if (!field) return null;\n\n const {\n field: _f,\n path: _p,\n ...rest\n } = props as {\n field?: AnyFieldProps;\n path?: string;\n } & PipeFormFieldWrapperProps;\n\n return (\n <DefaultFieldWrapper field={field} {...rest}>\n <FieldRenderer field={field} />\n </DefaultFieldWrapper>\n );\n}\n"],"mappings":";;;;;;AAcA,SAAgB,cAAc,OAA2B;CACvD,MAAM,EAAE,WAAW,oBAAoB;CAEvC,MAAM,QACJ,WAAW,SAAS,MAAM,QACtB,MAAM,QACN,OAAO,MAAM,MAAM,EAAE,SAAU,MAA2B,KAAK;AAErE,KAAI,CAAC,MAAO,QAAO;CAEnB,MAAM,EACJ,OAAO,IACP,MAAM,IACN,GAAG,SACD;AAKJ,QACE,oBAAC,qBAAD;EAA4B;EAAO,GAAI;YACrC,oBAAC,eAAD,EAAsB,OAAS;EACX"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/compound/pipe-form/footer.d.ts
|
|
5
|
+
declare function PipeFormFooter({
|
|
6
|
+
children,
|
|
7
|
+
className
|
|
8
|
+
}: {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { PipeFormFooter };
|
|
14
|
+
//# sourceMappingURL=footer.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/footer.tsx"],"mappings":";;;;iBAEgB,cAAA,CAAA;EACd,QAAA;EACA;AAAA;EAEA,QAAA,GAAW,SAAA;EACX,SAAA;AAAA,IACD,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/compound/pipe-form/footer.tsx
|
|
4
|
+
function PipeFormFooter({ children, className }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
"data-p0": "form-footer",
|
|
7
|
+
className,
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { PipeFormFooter };
|
|
14
|
+
//# sourceMappingURL=footer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/footer.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nexport function PipeFormFooter({\n children,\n className,\n}: {\n children?: ReactNode;\n className?: string;\n}) {\n return (\n <div data-p0=\"form-footer\" className={className}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;AAEA,SAAgB,eAAe,EAC7B,UACA,aAIC;AACD,QACE,oBAAC,OAAD;EAAK,WAAQ;EAAyB;EACnC;EACG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DefaultGroupProps } from "../../defaults/layout/group.mjs";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/compound/pipe-form/group.d.ts
|
|
5
|
+
type PipeFormGroupProps = DefaultGroupProps;
|
|
6
|
+
declare function PipeFormGroup({
|
|
7
|
+
group,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: PipeFormGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PipeFormGroup };
|
|
13
|
+
//# sourceMappingURL=group.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/group.tsx"],"mappings":";;;;KAGY,kBAAA,GAAqB,iBAAA;AAAA,iBAEjB,aAAA,CAAA;EAAgB,KAAA;EAAO,QAAA;EAAA,GAAa;AAAA,GAAS,kBAAA,GAAkB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DefaultGroup } from "../../defaults/layout/group.mjs";
|
|
2
|
+
import { PipeFormField } from "./field.mjs";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/compound/pipe-form/group.tsx
|
|
6
|
+
function PipeFormGroup({ group, children, ...props }) {
|
|
7
|
+
const body = children ?? group.fields.map((field) => /* @__PURE__ */ jsx(PipeFormField, { field }, field.path));
|
|
8
|
+
return /* @__PURE__ */ jsx(DefaultGroup, {
|
|
9
|
+
group,
|
|
10
|
+
...props,
|
|
11
|
+
children: body
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PipeFormGroup };
|
|
17
|
+
//# sourceMappingURL=group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/group.tsx"],"sourcesContent":["import { DefaultGroup, type DefaultGroupProps } from \"../../defaults/layout/group.js\";\nimport { PipeFormField } from \"./field.js\";\n\nexport type PipeFormGroupProps = DefaultGroupProps;\n\nexport function PipeFormGroup({ group, children, ...props }: PipeFormGroupProps) {\n const body =\n children ?? group.fields.map((field) => <PipeFormField key={field.path} field={field} />);\n\n return (\n <DefaultGroup group={group} {...props}>\n {body}\n </DefaultGroup>\n );\n}\n"],"mappings":";;;;;AAKA,SAAgB,cAAc,EAAE,OAAO,UAAU,GAAG,SAA6B;CAC/E,MAAM,OACJ,YAAY,MAAM,OAAO,KAAK,UAAU,oBAAC,eAAD,EAAuC,OAAS,EAA5B,MAAM,KAAsB,CAAC;AAE3F,QACE,oBAAC,cAAD;EAAqB;EAAO,GAAI;YAC7B;EACY"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/compound/pipe-form/header.d.ts
|
|
5
|
+
declare function PipeFormHeader({
|
|
6
|
+
children,
|
|
7
|
+
className
|
|
8
|
+
}: {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { PipeFormHeader };
|
|
14
|
+
//# sourceMappingURL=header.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/header.tsx"],"mappings":";;;;iBAEgB,cAAA,CAAA;EACd,QAAA;EACA;AAAA;EAEA,QAAA,GAAW,SAAA;EACX,SAAA;AAAA,IACD,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/compound/pipe-form/header.tsx
|
|
4
|
+
function PipeFormHeader({ children, className }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
"data-p0": "form-header",
|
|
7
|
+
className,
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { PipeFormHeader };
|
|
14
|
+
//# sourceMappingURL=header.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/header.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nexport function PipeFormHeader({\n children,\n className,\n}: {\n children?: ReactNode;\n className?: string;\n}) {\n return (\n <div data-p0=\"form-header\" className={className}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;AAEA,SAAgB,eAAe,EAC7B,UACA,aAIC;AACD,QACE,oBAAC,OAAD;EAAK,WAAQ;EAAyB;EACnC;EACG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeFormContent } from "./content.mjs";
|
|
2
|
+
import { PipeFormField } from "./field.mjs";
|
|
3
|
+
import { PipeFormFooter } from "./footer.mjs";
|
|
4
|
+
import { PipeFormGroup } from "./group.mjs";
|
|
5
|
+
import { PipeFormHeader } from "./header.mjs";
|
|
6
|
+
import { PipeForm, PipeFormInstanceProps, PipeFormLegacyProps, PipeFormProps } from "./root.mjs";
|
|
7
|
+
import { PipeFormSection } from "./section.mjs";
|
|
8
|
+
import { PipeFormSubmitButton } from "./submit-button.mjs";
|
|
9
|
+
import { PipeFormTitle } from "./title.mjs";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PipeFormField } from "./field.mjs";
|
|
2
|
+
import { PipeFormGroup } from "./group.mjs";
|
|
3
|
+
import { PipeFormSection } from "./section.mjs";
|
|
4
|
+
import { PipeFormContent } from "./content.mjs";
|
|
5
|
+
import { PipeFormFooter } from "./footer.mjs";
|
|
6
|
+
import { PipeFormHeader } from "./header.mjs";
|
|
7
|
+
import { PipeFormSubmitButton } from "./submit-button.mjs";
|
|
8
|
+
import { PipeForm } from "./root.mjs";
|
|
9
|
+
import { PipeFormTitle } from "./title.mjs";
|
|
10
|
+
|
|
11
|
+
export { };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
2
|
+
import { FieldAdapterMap, FormClassNames } from "../../../types/adapters.mjs";
|
|
3
|
+
import { GroupMap, PathMap, SectionMap } from "../../../types/form-customization.mjs";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import { FormResolvers, PipeId, PipePayload, ValidationContext } from "@pipe0/base";
|
|
7
|
+
import { UseFormReturn } from "react-hook-form";
|
|
8
|
+
|
|
9
|
+
//#region src/components/compound/pipe-form/root.d.ts
|
|
10
|
+
type PipeFormSubmitHandler = (payload: PipePayload, ctx: {
|
|
11
|
+
form: UseFormReturn<PipePayload>;
|
|
12
|
+
}) => void | Promise<void>;
|
|
13
|
+
interface CustomizationProps {
|
|
14
|
+
sectionMap?: SectionMap;
|
|
15
|
+
groupMap?: GroupMap;
|
|
16
|
+
pathMap?: PathMap;
|
|
17
|
+
classNames?: FormClassNames;
|
|
18
|
+
adapters?: FieldAdapterMap;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
interface PipeFormInstanceProps extends CustomizationProps {
|
|
22
|
+
context: PipeFormContext;
|
|
23
|
+
onSubmit: PipeFormSubmitHandler;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
interface PipeFormLegacyProps extends CustomizationProps {
|
|
27
|
+
pipeId: PipeId;
|
|
28
|
+
publicKey: string;
|
|
29
|
+
onSubmit: PipeFormSubmitHandler;
|
|
30
|
+
defaultValues?: PipePayload;
|
|
31
|
+
validationContext?: ValidationContext;
|
|
32
|
+
resolvers?: FormResolvers;
|
|
33
|
+
/**
|
|
34
|
+
* Form-level scope tags. Bundled into every `resolvers.getSecrets` call so
|
|
35
|
+
* the backend can return only the secrets allowed in the declared scopes.
|
|
36
|
+
*/
|
|
37
|
+
scopes?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Current team context. Bundled into every `resolvers.getSecrets` call so
|
|
40
|
+
* the backend can restrict team-level secrets to this team only.
|
|
41
|
+
*/
|
|
42
|
+
teamId?: string;
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
type PipeFormProps = PipeFormInstanceProps | PipeFormLegacyProps;
|
|
46
|
+
/**
|
|
47
|
+
* Compound root for pipe forms.
|
|
48
|
+
*
|
|
49
|
+
* Two modes:
|
|
50
|
+
* - Compound: `<PipeForm context={ctx} onSubmit={...}>...</PipeForm>` — pass the context from `usePipeForm`.
|
|
51
|
+
* - Zero-config: `<PipeForm pipeId="..." publicKey="..." onSubmit={...} />` — legacy API.
|
|
52
|
+
*/
|
|
53
|
+
declare function PipeForm(props: PipeFormProps): _$react_jsx_runtime0.JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { PipeForm, PipeFormInstanceProps, PipeFormLegacyProps, PipeFormProps };
|
|
56
|
+
//# sourceMappingURL=root.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"mappings":";;;;;;;;;KAuBY,qBAAA,IACV,OAAA,EAAS,WAAA,EACT,GAAA;EAAO,IAAA,EAAM,aAAA,CAAc,WAAA;AAAA,aACjB,OAAA;AAAA,UAEF,kBAAA;EACR,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,QAAA;EACX,OAAA,GAAU,OAAA;EACV,UAAA,GAAa,cAAA;EACb,QAAA,GAAW,eAAA;EACX,SAAA;AAAA;AAAA,UAGe,qBAAA,SAA8B,kBAAA;EAC7C,OAAA,EAAS,eAAA;EACT,QAAA,EAAU,qBAAA;EACV,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,mBAAA,SAA4B,kBAAA;EAC3C,MAAA,EAAQ,MAAA;EACR,SAAA;EACA,QAAA,EAAU,qBAAA;EACV,aAAA,GAAgB,WAAA;EAChB,iBAAA,GAAoB,iBAAA;EACpB,SAAA,GAAY,aAAA;;;;;EAKZ,MAAA;EArBW;;;;EA0BX,MAAA;EACA,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,aAAA,GAAgB,qBAAA,GAAwB,mBAAA;;;;;;;;iBASpC,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { PortalContainerContext } from "../../../context/portal-container-context.mjs";
|
|
2
|
+
import { FormCustomizationProvider, useFormCustomization } from "../../../context/form-customization-context.mjs";
|
|
3
|
+
import { PipeFormContext, usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
4
|
+
import { PipeFormContent } from "./content.mjs";
|
|
5
|
+
import { FormProvider, FormRoot } from "../../../context/form-provider.mjs";
|
|
6
|
+
import { usePipeForm } from "../../../hooks/use-pipe-form.mjs";
|
|
7
|
+
import { DefaultForm } from "../../defaults/layout/form.mjs";
|
|
8
|
+
import { PipeFormSubmitButton } from "./submit-button.mjs";
|
|
9
|
+
import { useCallback, useEffect, useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { validatePipesOrError } from "@pipe0/base";
|
|
12
|
+
|
|
13
|
+
//#region src/components/compound/pipe-form/root.tsx
|
|
14
|
+
/**
|
|
15
|
+
* Compound root for pipe forms.
|
|
16
|
+
*
|
|
17
|
+
* Two modes:
|
|
18
|
+
* - Compound: `<PipeForm context={ctx} onSubmit={...}>...</PipeForm>` — pass the context from `usePipeForm`.
|
|
19
|
+
* - Zero-config: `<PipeForm pipeId="..." publicKey="..." onSubmit={...} />` — legacy API.
|
|
20
|
+
*/
|
|
21
|
+
function PipeForm(props) {
|
|
22
|
+
if ("context" in props) return /* @__PURE__ */ jsx(PipeFormWithContext, { ...props });
|
|
23
|
+
return /* @__PURE__ */ jsx(PipeFormLegacy, { ...props });
|
|
24
|
+
}
|
|
25
|
+
function PipeFormLegacy({ pipeId, publicKey, defaultValues, onSubmit, resolvers, scopes, teamId, validationContext = validatePipesOrError({
|
|
26
|
+
config: { environment: "production" },
|
|
27
|
+
pipes: [],
|
|
28
|
+
input: []
|
|
29
|
+
}), children, ...customization }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(PipeFormWithContext, {
|
|
31
|
+
context: usePipeForm({
|
|
32
|
+
pipeId,
|
|
33
|
+
publicKey,
|
|
34
|
+
defaultValues,
|
|
35
|
+
resolvers,
|
|
36
|
+
scopes,
|
|
37
|
+
teamId,
|
|
38
|
+
validationContext
|
|
39
|
+
}),
|
|
40
|
+
onSubmit,
|
|
41
|
+
...customization,
|
|
42
|
+
children
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function PipeFormWithContext({ context, onSubmit, children, className, sectionMap, groupMap, pathMap, classNames, adapters }) {
|
|
46
|
+
const hasLocalOverrides = classNames || adapters;
|
|
47
|
+
const inner = /* @__PURE__ */ jsx(FormCustomizationProvider, {
|
|
48
|
+
sectionMap,
|
|
49
|
+
groupMap,
|
|
50
|
+
pathMap,
|
|
51
|
+
children: /* @__PURE__ */ jsx(PipeFormContext.Provider, {
|
|
52
|
+
value: context,
|
|
53
|
+
children: /* @__PURE__ */ jsx(PipeFormShell, {
|
|
54
|
+
className,
|
|
55
|
+
onSubmit,
|
|
56
|
+
children
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
if (hasLocalOverrides) return /* @__PURE__ */ jsx(FormRoot, { children: /* @__PURE__ */ jsx(FormProvider, {
|
|
61
|
+
classNames,
|
|
62
|
+
adapters,
|
|
63
|
+
children: inner
|
|
64
|
+
}) });
|
|
65
|
+
return /* @__PURE__ */ jsx(FormRoot, { children: inner });
|
|
66
|
+
}
|
|
67
|
+
function PipeFormShell({ children, className, onSubmit }) {
|
|
68
|
+
const [, dispatch] = useFormCustomization();
|
|
69
|
+
const context = usePipeFormContext();
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (!context.resolvers?.getConnections) dispatch({
|
|
72
|
+
type: "HIDE_SECTION",
|
|
73
|
+
payload: "connector"
|
|
74
|
+
});
|
|
75
|
+
}, [context.resolvers, dispatch]);
|
|
76
|
+
const [portalContainer, setPortalContainer] = useState(null);
|
|
77
|
+
const portalRef = useCallback((node) => {
|
|
78
|
+
setPortalContainer(node);
|
|
79
|
+
}, []);
|
|
80
|
+
const body = children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(PipeFormContent, {}), /* @__PURE__ */ jsx(PipeFormSubmitButton, {})] });
|
|
81
|
+
return /* @__PURE__ */ jsx(DefaultForm, {
|
|
82
|
+
onSubmit: context.form.handleSubmit(async (values) => {
|
|
83
|
+
await onSubmit(values, { form: context.form });
|
|
84
|
+
}),
|
|
85
|
+
ref: portalRef,
|
|
86
|
+
"data-p0": "form",
|
|
87
|
+
"data-p0-pipe": context.id,
|
|
88
|
+
className,
|
|
89
|
+
children: /* @__PURE__ */ jsx(PortalContainerContext.Provider, {
|
|
90
|
+
value: portalContainer,
|
|
91
|
+
children: body
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
export { PipeForm };
|
|
98
|
+
//# sourceMappingURL=root.mjs.map
|
|
@@ -0,0 +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, useEffect, useState } from \"react\";\nimport type { UseFormReturn } from \"react-hook-form\";\nimport {\n FormCustomizationProvider,\n useFormCustomization,\n} from \"../../../context/form-customization-context.js\";\nimport { FormProvider, FormRoot } from \"../../../context/form-provider.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 { 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: UseFormReturn<PipePayload> },\n) => void | Promise<void>;\n\ninterface CustomizationProps {\n sectionMap?: SectionMap;\n groupMap?: GroupMap;\n pathMap?: PathMap;\n classNames?: FormClassNames;\n adapters?: FieldAdapterMap;\n className?: string;\n}\n\nexport interface PipeFormInstanceProps extends CustomizationProps {\n context: PipeFormContext;\n onSubmit: PipeFormSubmitHandler;\n children?: ReactNode;\n}\n\nexport interface PipeFormLegacyProps extends CustomizationProps {\n pipeId: PipeId;\n publicKey: string;\n onSubmit: PipeFormSubmitHandler;\n defaultValues?: PipePayload;\n validationContext?: ValidationContext;\n resolvers?: FormResolvers;\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 | PipeFormLegacyProps;\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 * - Zero-config: `<PipeForm pipeId=\"...\" publicKey=\"...\" onSubmit={...} />` — legacy API.\n */\nexport function PipeForm(props: PipeFormProps) {\n if (\"context\" in props) {\n return <PipeFormWithContext {...props} />;\n }\n return <PipeFormLegacy {...props} />;\n}\n\nfunction PipeFormLegacy({\n pipeId,\n publicKey,\n defaultValues,\n onSubmit,\n resolvers,\n scopes,\n teamId,\n validationContext = validatePipesOrError({\n config: { environment: \"production\" },\n pipes: [],\n input: [],\n }),\n children,\n ...customization\n}: PipeFormLegacyProps) {\n const context = usePipeForm({\n pipeId,\n publicKey,\n defaultValues,\n resolvers,\n scopes,\n teamId,\n validationContext,\n });\n\n return (\n <PipeFormWithContext context={context} onSubmit={onSubmit} {...customization}>\n {children}\n </PipeFormWithContext>\n );\n}\n\nfunction PipeFormWithContext({\n context,\n onSubmit,\n children,\n className,\n sectionMap,\n groupMap,\n pathMap,\n classNames,\n adapters,\n}: PipeFormInstanceProps) {\n const hasLocalOverrides = classNames || adapters;\n\n const inner = (\n <FormCustomizationProvider sectionMap={sectionMap} groupMap={groupMap} pathMap={pathMap}>\n <PipeFormContext.Provider value={context}>\n <PipeFormShell className={className} onSubmit={onSubmit}>\n {children}\n </PipeFormShell>\n </PipeFormContext.Provider>\n </FormCustomizationProvider>\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 [, dispatch] = useFormCustomization();\n const context = usePipeFormContext();\n\n useEffect(() => {\n if (!context.resolvers?.getConnections) {\n dispatch({ type: \"HIDE_SECTION\", payload: \"connector\" });\n }\n }, [context.resolvers, dispatch]);\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":";;;;;;;;;;;;;;;;;;;;AAwEA,SAAgB,SAAS,OAAsB;AAC7C,KAAI,aAAa,MACf,QAAO,oBAAC,qBAAD,EAAqB,GAAI,OAAS;AAE3C,QAAO,oBAAC,gBAAD,EAAgB,GAAI,OAAS;;AAGtC,SAAS,eAAe,EACtB,QACA,WACA,eACA,UACA,WACA,QACA,QACA,oBAAoB,qBAAqB;CACvC,QAAQ,EAAE,aAAa,cAAc;CACrC,OAAO,EAAE;CACT,OAAO,EAAE;CACV,CAAC,EACF,UACA,GAAG,iBACmB;AAWtB,QACE,oBAAC,qBAAD;EAAqB,SAXP,YAAY;GAC1B;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;EAGiD;EAAU,GAAI;EAC5D;EACmB;;AAI1B,SAAS,oBAAoB,EAC3B,SACA,UACA,UACA,WACA,YACA,UACA,SACA,YACA,YACwB;CACxB,MAAM,oBAAoB,cAAc;CAExC,MAAM,QACJ,oBAAC,2BAAD;EAAuC;EAAsB;EAAmB;YAC9E,oBAAC,gBAAgB,UAAjB;GAA0B,OAAO;aAC/B,oBAAC,eAAD;IAA0B;IAAqB;IAC5C;IACa;GACS;EACD;AAG9B,KAAI,kBACF,QACE,oBAAC,UAAD,YACE,oBAAC,cAAD;EAA0B;EAAsB;YAC7C;EACY,GACN;AAIf,QAAO,oBAAC,UAAD,YAAW,OAAiB;;AAGrC,SAAS,cAAc,EACrB,UACA,WACA,YAKC;CACD,MAAM,GAAG,YAAY,sBAAsB;CAC3C,MAAM,UAAU,oBAAoB;AAEpC,iBAAgB;AACd,MAAI,CAAC,QAAQ,WAAW,eACtB,UAAS;GAAE,MAAM;GAAgB,SAAS;GAAa,CAAC;IAEzD,CAAC,QAAQ,WAAW,SAAS,CAAC;CAEjC,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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DefaultSectionProps } from "../../defaults/layout/section.mjs";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/compound/pipe-form/section.d.ts
|
|
5
|
+
type PipeFormSectionProps = DefaultSectionProps;
|
|
6
|
+
declare function PipeFormSection({
|
|
7
|
+
section,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: PipeFormSectionProps): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PipeFormSection };
|
|
13
|
+
//# sourceMappingURL=section.d.mts.map
|