@povio/ui 2.2.9-rc.3 → 2.2.9-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/inputs/Inputs/InputItem.d.ts +3 -9
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -2
- package/dist/helpers/dynamicInputs.d.ts +1 -1
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -11,13 +11,7 @@ declare const componentRegistry: {
|
|
|
11
11
|
readonly passwordInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/PasswordInput/PasswordInput').ControlledPasswordInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
readonly textArea: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/TextArea/TextArea').ControlledTextAreaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
readonly select: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../Selection/shared/select.types').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Select/Select').ControlledSelectProps<TFieldValues, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
readonly querySelect: <TFieldValues extends import('react-hook-form').FieldValues, TQueryFn extends import('../Selection/shared/querySelect.utils').QueryFn, TKey extends import('react-aria').Key = import('react-aria').Key>({ query, queryParams, queryOptions, queryMap, ...props }: import('
|
|
15
|
-
query: TQueryFn;
|
|
16
|
-
queryParams?: Parameters<TQueryFn>[0] | undefined;
|
|
17
|
-
queryOptions?: Parameters<TQueryFn>[1] | undefined;
|
|
18
|
-
queryMap?: ((data: Exclude<ReturnType<TQueryFn>["data"], undefined>) => import('../Selection/shared/select.types').SelectItem<TKey>[]) | undefined;
|
|
19
|
-
isInitialQueryDisabled?: boolean;
|
|
20
|
-
})) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
readonly querySelect: <TFieldValues extends import('react-hook-form').FieldValues, TQueryFn extends import('../Selection/shared/querySelect.utils').QueryFn, TKey extends import('react-aria').Key = import('react-aria').Key>({ query, queryParams, queryOptions, queryMap, ...props }: import('../Selection/Select/QuerySelect.js').QuerySelectProps<TFieldValues, TQueryFn, TKey>) => import("react/jsx-runtime").JSX.Element;
|
|
21
15
|
readonly autocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../Selection/shared/select.types').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Autocomplete/Autocomplete').ControlledAutocompleteProps<TFieldValues, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
|
|
22
16
|
readonly queryAutocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TSelectItem extends import('../Selection/shared/select.types').SelectItem<any>, TQueryFn extends import('../Selection/Autocomplete/queryAutocomplete.types').QueryFn<TSelectItem>>({ query, queryParams, queryOptions, queryMap, ...props }: import('../Selection/Autocomplete/queryAutocomplete.types').QueryAutocompleteProps<TFieldValues, TSelectItem, TQueryFn>) => import("react/jsx-runtime").JSX.Element;
|
|
23
17
|
readonly segment: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key>(props: import('../../..').ControlledSegmentProps<TFieldValues, TKey>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -54,8 +48,8 @@ type TypeBasedInputDef<TSchemaType extends Record<string, any>, T extends InputC
|
|
|
54
48
|
interface RenderBasedInputDef<TSchemaType extends Record<string, any>, K extends keyof TSchemaType> {
|
|
55
49
|
type?: never;
|
|
56
50
|
name: K;
|
|
57
|
-
label?:
|
|
58
|
-
placeholder?:
|
|
51
|
+
label?: string;
|
|
52
|
+
placeholder?: string;
|
|
59
53
|
props?: never;
|
|
60
54
|
inputWrapper?: never;
|
|
61
55
|
render: (formControl: {
|
|
@@ -4,7 +4,7 @@ import { QueryDataType, QueryFn } from '../shared/querySelect.utils';
|
|
|
4
4
|
import { OmitDiscriminatedUnion } from '../../../../types/common';
|
|
5
5
|
import { Key } from 'react-aria-components';
|
|
6
6
|
import { FieldValues } from 'react-hook-form';
|
|
7
|
-
type QuerySelectProps<TFieldValues extends FieldValues, TQueryFn extends QueryFn, TKey extends Key = Key> = OmitDiscriminatedUnion<SelectBaseProps<TKey>, "items" | "isLoading" | keyof GroupedSelectProps> & GroupedSelectControlProps<TFieldValues, TKey> & {
|
|
7
|
+
export type QuerySelectProps<TFieldValues extends FieldValues, TQueryFn extends QueryFn, TKey extends Key = Key> = OmitDiscriminatedUnion<SelectBaseProps<TKey>, "items" | "isLoading" | keyof GroupedSelectProps> & GroupedSelectControlProps<TFieldValues, TKey> & {
|
|
8
8
|
query: TQueryFn;
|
|
9
9
|
queryParams?: Parameters<TQueryFn>[0];
|
|
10
10
|
queryOptions?: Parameters<TQueryFn>[1];
|
|
@@ -12,4 +12,3 @@ type QuerySelectProps<TFieldValues extends FieldValues, TQueryFn extends QueryFn
|
|
|
12
12
|
isInitialQueryDisabled?: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const QuerySelect: <TFieldValues extends FieldValues, TQueryFn extends QueryFn, TKey extends Key = Key>({ query, queryParams, queryOptions, queryMap, ...props }: QuerySelectProps<TFieldValues, TQueryFn, TKey>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -23,7 +23,7 @@ export type AllowedComponentType<TZodType extends z.ZodType> = ZodUtils.ZodTypeS
|
|
|
23
23
|
boolean: "toggle" | "checkbox";
|
|
24
24
|
number: "numberInput" | "slider" | "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
25
25
|
enum: "select" | "querySelect" | "autocomplete" | "segment";
|
|
26
|
-
string: "textInput" | "passwordInput" | "textArea" | "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
26
|
+
string: "textInput" | "passwordInput" | "textArea" | "textEditor" | "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
27
27
|
email: "textInput";
|
|
28
28
|
array: "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
29
29
|
object: InputComponentType;
|
|
@@ -81,6 +81,7 @@ var getDefaultProps = (componentType, keyType) => {
|
|
|
81
81
|
].includes(componentType)) props.items = getDefaultSelectionItems(unwrappedType);
|
|
82
82
|
if ([
|
|
83
83
|
"select",
|
|
84
|
+
"querySelect",
|
|
84
85
|
"autocomplete",
|
|
85
86
|
"queryAutocomplete",
|
|
86
87
|
"segment"
|
|
@@ -146,6 +147,8 @@ var populateInputDef = (schema, schemaKey, value, options) => {
|
|
|
146
147
|
const inputWrapper = value.inputWrapper ?? options.globalInputWrapper;
|
|
147
148
|
if ("render" in value) return {
|
|
148
149
|
name,
|
|
150
|
+
label,
|
|
151
|
+
placeholder,
|
|
149
152
|
render: value.render
|
|
150
153
|
};
|
|
151
154
|
const schemaKeyType = schema.shape[schemaKey];
|
package/dist/index.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ export type { RadioVariantProps } from './components/inputs/RadioGroup/radio.cva
|
|
|
94
94
|
export type { AutocompleteProps, ControlledAutocompleteProps, } from './components/inputs/Selection/Autocomplete/Autocomplete';
|
|
95
95
|
export { Autocomplete } from './components/inputs/Selection/Autocomplete/Autocomplete';
|
|
96
96
|
export { QueryAutocomplete } from './components/inputs/Selection/Autocomplete/QueryAutocomplete';
|
|
97
|
+
export type { QuerySelectProps } from './components/inputs/Selection/Select/QuerySelect';
|
|
98
|
+
export { QuerySelect } from './components/inputs/Selection/Select/QuerySelect';
|
|
97
99
|
export type { ControlledSelectProps, SelectProps } from './components/inputs/Selection/Select/Select';
|
|
98
100
|
export { Select } from './components/inputs/Selection/Select/Select';
|
|
99
101
|
export type { ControlledSliderProps, SliderProps } from './components/inputs/Slider/Slider';
|
package/dist/index.js
CHANGED
|
@@ -92,6 +92,7 @@ import { QueryAutocomplete } from "./components/inputs/Selection/Autocomplete/Qu
|
|
|
92
92
|
import { Slider } from "./components/inputs/Slider/Slider.js";
|
|
93
93
|
import { Toggle } from "./components/inputs/Toggle/Toggle.js";
|
|
94
94
|
import { Segment } from "./components/segment/Segment.js";
|
|
95
|
+
import { QuerySelect } from "./components/inputs/Selection/Select/QuerySelect.js";
|
|
95
96
|
import { ResponsivePopover } from "./components/overlays/ResponsivePopover/ResponsivePopover.js";
|
|
96
97
|
import { StringUtils } from "./utils/string.utils.js";
|
|
97
98
|
import { dynamicInputs } from "./helpers/dynamicInputs.js";
|
|
@@ -135,4 +136,4 @@ import { useTableColumnConfig } from "./hooks/useTableColumnConfig.js";
|
|
|
135
136
|
import { ArrayUtils } from "./utils/array.utils.js";
|
|
136
137
|
import { QueriesUtils } from "./utils/queries.utils.js";
|
|
137
138
|
import { RoutingUtils } from "./utils/routing.utils.js";
|
|
138
|
-
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIRouter, UIStyle, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, compoundMapper, dynamicColumns, dynamicInputs, isEqual, logger, ns, resources, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
|
139
|
+
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIRouter, UIStyle, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, compoundMapper, dynamicColumns, dynamicInputs, isEqual, logger, ns, resources, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|